Security is a prime concern in our day-today life. Everyone wants to be as much secure as possible. An access control for doors forms a vital link in a security chain. The microcontroller based digital lock access control system that allows only authorized persons to access Doors. It is a low cost so that the concept is implemented by

using an MCS 51 series micro controller
The system is fully controlled by the 8051microcontroller which has a 4Kbytes of ROM for the program memory.. The system has a Keypad by which the password can be entered through it. When the entered password equals with the password stored in the memory then the relay gets on and so that the lock is opened. If we entered a wrong password for more than three times then the Alarm is switched on. Entering password should be displayed on the liquid crystal display. The system uses a compact circuitry built around 8051 microcontroller Programs are developed in Embedded C. Flash magic is used for loading programs into Microcontroller. Software: Embedded ‘C’ Tools: Small Device C Compiler & Keil uvision. Target Device: 8051 Microcontroller Applications: banks, house hold applications. Advantages: Low Power consumption.


INDEX 1. Introduction to Embedded Systems 2. 8051 Microcontrollers 3. GSM Technologies & LCD 4. Working flow of the project Block diagram 5. Keil software 6. Source code 7. Conclusion 8. Bibliography



In general. embedded systems range from portable devices such as digital watches and MP3 players. reducing the size and cost of the product. automobiles. Handheld computers share some elements with embedded systems — such as the operating systems and microprocessors which power them — but are not truly embedded systems. because they allow different applications to be loaded and peripherals to be connected. benefiting from economies of scale. can do many different tasks depending on programming. either fixed in capability or programmable. to large stationary installations like traffic lights. such as a personal computer. Since the embedded system is dedicated to specific tasks. Embedded systems have become very important today as they control many of the common devices we use. a general-purpose computer. with a single microcontroller chip. Complexity varies from low. It is usually embedded as part of a complete device including hardware and mechanical parts. sometimes with real-time computing constraints. airplanes. peripherals and networks mounted inside a large chassis or enclosure. cameras.INTRODUCTION TO EMBEDDED SYSTEM EMBEDDED SYSTEM An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions. factory controllers. that is specifically designed for a particular kind of application device. household appliances. design engineers can optimize it. to very high with multiple units. or the systems controlling nuclear power plants. For example. or increasing the reliability and performance. and toys (as well as the more obvious cellular phone and PDA) are among the myriad possible hosts of an 5 . "embedded system" is not an exactly defined term. Physically. vending machines. Some embedded systems are mass-produced. In contrast. An embedded system is some combination of computer hardware and software. as many systems have some element of programmability. medical equipment. Industrial machines.

APPLICATIONS OF EMBEDDED SYSTEM We are living in the Embedded World. many controllers embedded in your car take care of car operations between the bumpers and most of the times you tend to ignore all these controllers. Access Controllers. These desktop computers are manufactured to serve many purposes and applications. You need to install the relevant software to get the required processing facility. rather than being loaded into RAM (random access memory). fast applications which make you believe that your basic survival is controlled by these embedded products. Palm devices of your work space enable you to do many of your tasks very effectively. new devices. and embedded systems programming is a specialized occupation. In recent days. such as Embedded Java and Windows XP Embedded. Radio. All kinds of magazines and journals regularly dish out details about latest technologies. So. You are surrounded with many embedded products and your daily life largely depends on the proper functioning of these gadgets. Card readers. CD player of your living room. Apart from all these. However. you are showered with variety of information about these embedded controllers in many places. Washing Machine or Microwave Oven in your kitchen. The program is written permanently into the system's memory in this case. or create a document or analyze the database is known as the standard desktop computer. with the application and operating system both part of a single program. these desktop computers can do many things. as programs on a personal computer are. some low-end consumer products use very inexpensive microprocessors and limited storage. In contrast. Now you can agree to the fact that these embedded products have successfully invaded into our world. embedded controllers 6 .embedded system. Certain operating systems or language platforms are tailored for the embedded market. Television. You must be wondering about these embedded controllers or systems. Embedded systems that are programmable are provided with a programming interface. What is this Embedded System? The computer you use to compose your mails.

and safety-critical systems. and high-availability facilities consistently turn to the LynxOS® RTOS and the LynxOS-178 RTOS for software certification to DO-178B. So these controllers cannot be used in any other place. Rich in system resources and networking services. 7 . scalability. The LynxOS-178 RTOS for software certification. Even after 25 years of existence. LynxOS provides an off-the-shelf software platform with hard real-time response backed by powerful distributed computing (CORBA). Most of the time. Market acceptance of this particular family has driven many semiconductor manufacturers to develop something new based on this particular architecture. Real-time systems programmers get a boost with LynuxWorks' DO-178B RTOS training courses. In the 8 bit segment. These days designers have many choices in microprocessors/microcontrollers. and long-term support options. Selecting a right microprocessor may turn out as a most difficult first step and it is getting complicated as new devices continue to pop-up very often. based on the RTCA DO-178B standard. an embedded controller is a combination of a piece of microprocessor based hardware and the suitable software to undertake a specific task. the available variety really may overwhelm even an experienced designer. semiconductor manufacturers still come out with some kind of device using this 8031 core. the most popular and used architecture is Intel's 8031. software certification.  Military and aerospace software applications From in-orbit embedded systems to jumbo jets to vital battlefield networks. in 8 bit and 32 bit. Theoretically. engineers design these embedded controllers with a specific goal in mind. assists developers in gaining certification for their mission.carryout a specific work for which they are designed. designers of mission-critical aerospace and defense systems requiring real-time performance. high reliability. Especially.

with pre-integrated. 8 . phones and PDAs all benefit from the costeffective dependability. CompactPCI hot swap support. Scalable for kernel configurations. the BlueCat® Linux® operating system provides a highly reliable and royalty-free option for systems designers. web-enabled navigation systems. and fault-management facilities make LynxOS the ideal choice companies operating system telecommunications applications—from complex central controllers to simple line/trunk cards. BlueCat has teamed up with industry leaders to make it easier to build Linux mobile phones with Java integration. looking for a distributed single computing capabilities. and hard real-time response —LynxOS delivers on these key requirements and more for today's carrier-class systems. personal communication devices. data networking and porting software components—including source code for easy customization.  Electronics applications and consumer devices As the number of powerful embedded processors in consumer devices continues to rise.  Communications applications "Five-nines" availability. The Lynx Certifiable Stack (LCS) is a secure TCP/IP protocol stack designed especially for applications where standards certification is required. POSIX®compatible RTOS solution. for all integrated embedded communications stacks. LynuxWorks Jumpstart for Communications package enables OEMs to rapidly develop mission-critical communications equipment. proven stability and full product life-cycle support opportunities associated with BlueCat embedded Linux. And as the wireless appliance revolution rolls on. state-of-the-art.LynxOS-178 is the first DO-178B and EUROCAE/ED-12B certifiable. radios.

Take advantage of our 20 years of experience. the processor. the 9 . 68010. This is not the case with Microcontrollers. I/O ports. I/O ports. For this reason. MICROCONTROLLER VERSUS MICROPROCESSOR What is the difference between a Microprocessor and Microcontroller? By microprocessor is meant the general purpose Microprocessors such as Intel's X86 family (8086. we offer special MSRP-based pricing to reduce royalty fees to a negligible portion of the device's MSRP. A Microcontroller has a CPU (a microprocessor) in addition to a fixed amount of RAM. they have the advantage of versatility such that the designer can decide on the amount of RAM. A system designer using a general-purpose microprocessor such as the Pentium or the 68040 must add RAM. and timers externally to make them functional. 68020. ROM and I/O ports needed to fit the task at hand.For makers of low-cost consumer electronic devices who wish to integrate the LynxOS real-time operating system into their products. From ISO 9001 certification to fault-tolerance. no ROM. and no I/O ports on the chip itself. ROM. ROM. In other words. 80286. POSIX conformance. secure partitioning and high availability. 68040. These microprocessors contain no RAM. 80386. and a timer all on a single chip. 80486. 68030. Although the addition of external RAM. we've got it all.  Industrial automation and process control software Designers of industrial and process control systems know from experience that LynuxWorks operating systems provide the security and reliability that their industrial applications require. they are commonly referred to as general-purpose Microprocessors. and I/O ports makes these systems bulkier and much more expensive. and the Pentium) or Motorola's 680X0 family (68000. ROM. etc).

10 .RAM. or timer to it. I/O ports and the timer are all embedded together on one chip. and number of I/O ports in Microcontrollers makes them ideal for many applications in which cost and space are critical. The fixed amount of on-chip ROM. therefore. ROM. there is no need for the computing power of a 486 or even an 8086 microprocessor. In many applications. the designer cannot add any external memory. These applications most often require some I/O operations to read signals and turn on and off certain bits. for example a TV remote control. I/O ports. RAM.

we often see the term Embedded System. Each one of these peripherals has a Microcontroller inside it that performs only one task. In an Embedded system. namely getting the data and printing it. A printer is an example of embedded system since the processor inside it performs one task only. Microprocessors and Microcontrollers are widely used in embedded system products. Of course the reason a pc can perform myriad tasks is that it has RAM memory and an operating system that loads the application software into RAM memory and lets the CPU run it. print-server. or Internet terminal. bank teller terminal. disk controller. Video game. An x86 PC contains or is connected to various embedded products such as keyboard. inside every mouse there is a Microcontroller to perform the task of finding the mouse position and sending it to the PC. Contrast this with a Pentium based PC. An embedded system product uses a microprocessor (or Microcontroller) to do one task only. CD-ROM drives. sound card. network server.MICROCONTROLLERS FOR EMBEDDED SYSTEMS In the Literature discussing microprocessors. Table 1-1 lists some embedded products. and so on. there is only one application software that is typically burned into ROM. 11 . mouse. modem. Software for a variety of applications can be loaded and run. A PC can be used for any number of applications such as word processor. For example. printer.

CHAPTER 2 8051 Architecture & Programming 12 .

So.8051 ARCHITECTURE The generic 8051 architecture supports a Harvard architecture.  128 bytes of on chip Data Memory. It distinctive memory spaces of 64K X 8 size for both programmed and is based on an 8 bit central processing unit with an 8 bit Accumulator and another 8 bit B register as main processing blocks.  Full Duplex UART.  Two 16 bit timer/counters. This bus architecture is supported with on-chip peripheral functions like I/O ports.  32 Bi-directional and individually addressable I/O lines. Other portions of the architecture include few 8 bit and 16 bit registers and 8 bit memory locations. which contains two separate buses for both program and data. timers/counters. versatile serial communication port. Each 8051 device has some amount of data RAM built in the device for internal processing.  64K Data Memory address space. FEATURES OF 8051 ARCHITECTURE  Optimized 8 bit CPU for control applications and extensive Boolean processing capabilities. This area is used for stack operations and temporary storage of data. it has two data. So it is clear that this 8051 architecture was designed to cater many real time embedded needs. 13 .  64K Program Memory address space.

customers couldn’t change any thing in their program code. Originally this 8051 architecture was introduced Intel delivered all ‘one time programmable’ version of Program Memory of size 4K X 8. which was already made available inside during device fabrication. 6-source / 5-vector interrupt structure with priority levels. controller. 14 . But. The memory portion was Program Memory area. the most important part of any embedded with on-chip. after getting devices.  On chip clock oscillator. Now we may be wondering about the non-mentioning of memory space meant for the program storage. these microcontrollers (8051) with user’s program fused mapped at the lower end of the inside the device.

BLOCK DIAGRAM OF 8051 Figure 4. Like a regular EPROM. Later on Intel started manufacturing these 8031 devices without any on chip Program Memory.1 .Block Diagram of the 8051 Core So. 15 . this memory can be re-programmed many times. very soon Intel introduced the 8051 devices with re-programmable type of Program Memory using built-in EPROM of size 4K X 8.

) This pin is also the program pulse input (PROG) during EPROM programming. PSEN is activated twice each machine cycle (except that two PSEN activations are skipped during accesses to external Data Memory). for external timing or clocking purposes. In the 80C31. even when there are no accesses to external memory. PSEN is not activated when the device is executing out of internal Program Memory. When the device is executing out of external Program Memory. Holding EA low forces the CPU to execute out of external memory regardless of the Program Counter value. one ALE pulse is skipped during each access to external Data Memory. PSEN : Program Store Enable is the read strobe to external Program Memory. (However.MICROCONTROLLER LOGIC SYMBOL ALE/PROG: Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. ALE is emitted at a constant rate of 1/6 of the oscillator frequency. In the EPROM 16 . EA must be externally wired low. EA/VPP: When EA is held high the CPU executes out of internal Program Memory (unless the Program Counter exceeds 0FFFH in the 80C51).

At the beginning of an external memory cycle. but also serve the functions of various special features as listed below: 17 . Instructions. But all the 8 serial port’s two control. All the Port 3 pins are multifunctional. you can use corresponding port lines as a standard I/O.devices. These I/O pins can be accessed directly by memory instructions support special functions: Two external interrupt lines. P1 lines of P3 and P3 are available for standard I/O functions. I/O operations may be combined in many ways. Different pins can be configured as input or outputs independent of each other or the same pin can be used as an input or as output at different times. These port lines can be operated in different modes and all the pins can be made to do many different tasks apart from their regular I/O use port function executions. Remaining ports. You can comfortably combine I/O operations and special operations for Port 3 lines. When you don’t use these special functions. any instruction that accesses external Program Memory will output the higher order byte on P2 during read cycle. P1. The 8051’s I/O port structure is extremely versatile and flexible. this pin also receives the programming supply voltage (VPP) during EPROM programming. P0 as a multiplexed address/data bus. Also. They are not only port pins. data lines and two timing control strobe lines are Even within a single designed to use P3 port lines. XTAL1: Input to the inverting oscillator amplifier. port. The same pins transfer data byte at the later stage of the instruction execution. Each pin can be used as an input or as an output during program execution to get required flexibility. The device has 32 I/O pins configured as four eight bit parallel ports (P0. P2 and under the software P3). two counter inputs. XTAL2: Output from the inverting oscillator amplifier. low order 8 bits of the address bus are output on P0. which access external memory.

EPROM) can only be read. In the 80C51.Port Pin Alternate Function P3.1 TxD (serial output port) MEMORY ORGANISATION The alternate functions can only be activated if the corresponding bit latch in the port SFR contains a 1. RD and WR. Data Memory (RAM) occupies a separate address space from Program Memory. as shown in Figures 1 and 2. 18 .0 RxD (serial input port) P3. Otherwise the port pin remains at 0. as needed during external Data Memory accesses. The read strobe for external program memory is the PSEN (program store enable). all program memory is external.All 80C51 devices have separate address spaces for program and data memory. BASIC REGISTERS A number of 8052 registers can be considered "basic. The CPU generates read and write signals. In the ROM less version. the lowest 128 bytes of data memory are on-chip. which can be quickly stored and manipulated by an 8-bit CPU. Program memory (ROM. the lowest 4k bytes of program are on-chip. There can be up to 64k bytes of program memory. In the 80C51. 16-bit data memory addresses can also be generated through the DPTR register. The logical separation of program and data memory allows the data memory to be accessed by 8-bit addresses. the lowest 128 bytes are on-chip. Up to 64k bytes of external RAM can be addressed in the external Data Memory space. not written to. External Program Memory and external Data Memory may be combined if desired by applying the RD and PSEN signals to the inputs of an AND gate and using the output of the gate as the read strobe to the external Program/Data memory. In the ROM less versions." Very little can be done without them and a detailed explanation of each one is warranted to make sure the reader understands these registers before getting into more complicated areas of development. Nevertheless.

The "R" Registers: The "R" registers are sets of eight registers that are named R0. It can hold an 8-bit (1byte) value and is the most versatile register the 8052 has due to the sheer number of instructions that make use of the accumulator. perhaps you are adding 10 and 20. if you want to add the number 10 and 20. register R4. through R7. One way to do this would be: MOV A. registers. Once you have a value in the Accumulator you may continue processing the value or you may store it in another register or in memory. A MOV A. add the value of R4 . Move the value of R3 to accumulator . The original number 10 may be stored in the Accumulator whereas the value 20 may be stored in. as its name suggests. R3 ADD A. The "R" registers are also used to store values temporarily. You may think of the "R" registers as very important auxiliary.The Accumulator: If you've worked with any other assembly language you will be familiar with the concept of an accumulator register. let’s say you want to add the values in R1 and R2 together and then subtract the values of R3 and R4. the resulting 30 will be stored in the Accumulator. To continue with the above example. Store the result in R5 . Move the value of R1 to Acc 19 . More than half of the 8052's 255 instructions manipulate or use the Accumulator in some way. The Accumulator alone would not be very useful if it were not for these "R" registers. R4 MOV R5. For example. For example. These registers are used as auxiliary registers in many operations. or "helper". say. is used as a general register to accumulate the results of a large number of instructions. R1 . The Accumulator. To process the addition you would execute the command: ADD A. R1. R4 After executing this instruction the Accumulator will contain the value 30.

register bank 0 (addresses 00h through 07h) is used by default. When the 8052 is first powered up. The "B" register is only used implicitly by two 8052 instructions: MUL AB and DIV AB. for example. Thus. R5 .ADD A. 2. In this case. It is important to note that PC isn't always incremented by 20 . there are four sets of "R" registers-register bank 0. R2 SUBB A. i. the "B" register are often used as yet another temporary storage register much like a ninth "R" register. register banks 1. 2. this isn't the most efficient way to calculate (R1+R2) . Of course. In this case. R4 will no longer be the same as Internal RAM address 04h. Aside from the MUL and DIV instructions. and if you select register bank 3 it is synonymous with address 1Ch. add the value of R2 with A . As mentioned earlier.e. if your program instructs the 8052 to use register bank 1. you may store the other number in "B" and make use of these two instructions. and 3. if you want to quickly and easily multiply or divide A by another number. 1. However. If you select register bank 2. The Program Counter The Program Counter (PC) is a 2-byte address that tells the 8052 where the next instruction to execute is found in memory. register R4 will now be synonymous with Internal RAM address 0Ch. The concept of register banks adds a great level of flexibility to the 8052. However. especially when dealing with interrupts (we'll talk about interrupts later). we used R5 to temporarily hold the sum of R3 and R4.. always remember that the register banks really reside in the first 32 bytes of Internal RAM. R4 is the same as Internal RAM address 04h. The B Register The "B" register is very similar to the Accumulator in the sense that it may hold an 8-bit (1-byte) value.(R3 +R4) but it does illustrate the use of the "R" registers as a way to store values temporarily. your program may instruct the 8052 to use one of the alternate register banks. For example. or 3. When the 8052 is initialized PC always starts at 0000h and is incremented each time an instruction is executed. R4 is synonymous with 14h. Subtract the R5 (which has R3+R4) As you can see.

is used to point to data. and "B" register are all 1byte values. The PC just described is a 16-bit value but isn't directly useraccessible as a working register. It is also interesting to note that while you may change the value of PC (by executing a jump instruction. may hold an 8-bit (1-byte) value. When you push a value onto the stack. like all registers except DPTR and PC. It is used by a number of commands that allow the 8052 to access external memory.) there is no way to read the value of PC.one. as the name suggests. The Data Pointer: The Data Pointer (DPTR) is the 8052ís only user-accessible 16bit (2-byte) register. When the 8052 accesses external memory it accesses the memory at the address indicated by DPTR. That is to say. this is not completely true: There is one trick that may be used to determine the current value of PC. 21 . there is no way to ask the 8052 "What address are you about to execute?" As it turns out. On the other hand. the 8052 returns the value from the memory location indicated by SP and then decrements the value of SP. "R" registers. The Stack Pointer is used to indicate where the next value to be removed from the stack should be taken from. the 8052 first increments the value of SP and then stores the value at the resulting memory location. The Program Counter is special in that there is no way to directly modify its value. many developers take advantage of the fact that it's the only true 16-bit register available. Since some instructions are 2 or 3 bytes in length the PC will be incremented by 2 or 3 in these cases. you can't do something like PC=2430h. When you pop a value off the stack. That is to say. if you execute LJMP 2430h you've effectively accomplished the same thing. While DPTR is most often used to point to data in external memory or code memory. The Stack Pointer: The Stack Pointer. The Accumulator. etc. This trick will be covered in a later chapter. It is often used to store 2-byte values that have nothing to do with memory locations. DPTR.

Register-Specific Instructions Some instructions are specific to a certain register.This order of operation is important. When the 8052 is initialized SP will be initialized to 07h. Instructions that refer to the Accumulator as A assemble as accumulator specific opcodes. or Data Pointer. the value will be stored in Internal RAM address 08h. Only internal Data RAM and SFRs can be directly addressed. One of four banks is selected at execution time by the two bank select bits in the PSW. since this mode eliminates an address byte. For example. The address register for 8-bit addresses can be R0 or R1 of the selected bank. Immediate Constants The value of a constant can follow the opcode in Program Memory. Register Instructions The register banks. containing registers R0 through R7. For example. Both internal and external RAM can be indirectly addressed. ADDRESSING MODES The addressing modes in the 80C51 instruction set are as follows: Direct Addressing: In direct addressing the operand is specified by an 8-bit address field in the instruction. DPTR. so no address byte is needed to point to it. Indirect Addressing: In indirect addressing the instruction specifies a register which contains the address of the operand. Instructions that access the registers this way are code efficient.. The address register for 16-bit addresses can only be the 16-bit “data pointer” register. can be accessed by certain instructions which carry a 3-bit register specification within the opcode of the instruction. one of the eight registers in the selected bank is accessed. some instructions always operate on the Accumulator. 22 . etc. or the Stack Pointer. This makes sense taking into account what was mentioned two paragraphs above: First the 8051 will increment the value of SP (from 07h to 08h) and then will store the pushed value at that memory address (08h). The opcode itself does that. When the instruction is executed. If you immediately push a value onto the stack.

The ALU (Acc) performs arithmetic and logic functions on 8 bit input variables. Indexed Addressing Only program Memory can be accessed with indexed addressing. 23 . 8 bit Arithmetic Logic Unit Accumulator (Acc ) . ALU is responsible in conditional branching decisions. and provides a temporary place in data transfer operations within the device. Program Counter (PC) and Data Pointer Register (DPTR). complement and etc. OR as well as rotate. Another type of indexed addressing is used in the “case jump” instruction. Exclusive and multiplication and division. clear.MOV A. subtraction. B register. few more 8 bit registers . OR. The address of the table entry in Program Memory is formed by adding the Accumulator data to the base pointer. CENTRAL PROCESSING UNIT The CPU is the brain of the microcontrollers reading user’s programs and executing the expected task primary elements are an as per instructions stored there in. and it can only be read. Arithmetic operations include basic addition. The same number could be specified in hex digits as 64H. and the Accumulator is set up with the table entry number. This addressing mode is intended for reading look-up tables in Program Memory A 16-bit base register (either DPTR or the Program Counter) points to the base of the table. In this case the destination address of a jump instruction is computed as the sum of the base pointer and the Accumulator data. Program Status Word (PSW) and 16 bit registers. Logical operations are AND. Apart from all the above. #100 loads the Accumulator with the decimal number 100. Its (ALU ) . Stack Pointer (SP ) .

But normally SP is initialized to 07H after a device reset and grows up from the location 08H.B-register is mainly used in multiply and divides operations. These timers can be used to measure time intervals. they can accumulate 24 . Working as counter. Program Counter (PC) is the 16 bit register giving address of next Data Pointer (DPTR) is another 16 bit the data instruction to be executed during program execution and it always points to the Program Memory space. The Stack Pointer is automatically incremented or decremented for all PUSH or POP instructions and for all subroutine calls and returns. B register either keeps general purpose register. During execution. it can be used as two eight bit registers. This pointer keeps track of memory space where the important when the program flow gets into executing a subroutine. it can be used as another different bits. Stack Pointer (SP) is an 8 bit register. Program Status Word (PSW) keeps the current status of the ALU in register information is stored one of the two inputs or then retains a portion of the result. 536 counts). When it is not being used for this purpose. addressing register that can be used to fetch any 8 bit data from memory space. TIMERS/COUNTERS 8051 has two 16 bit Timers/Counters capable of working in different modes. Use software to get longer delays. The stack portion may be placed in any where in the on-chip RAM. For other instructions. There is a mode control register and a control register to configure these timers/counters in number of ways. Each consists of a ‘High’ byte and a ‘Low’ byte which can be accessed under software. determine pulse widths or initiate events with one microsecond resolution up to a maximum of 65 millisecond (corresponding to 65.

For the standard serial communication facility. Getting this facility is made very simple using simple elect even or odd parity. 8051 can be programmed for UART operations and can be connected with regular personal bauds and computers. program counter. The key term in describing the design of the microprocessor is “general purpose”. some working registers. modem at data rates between 122 routines with option to UART. you can also get super fast I/O lines using low cost simple TTL or CMOS shift registers. teletype writers. an oscillator and number of I/O devices such as parallel and serial data ports in addition special purpose devices such as interrupt handlers and counters. The hardware design of a microprocessor CPU is arranged so that a 25 microprocessor as a term has come to be known is a general-purpose digital computer central processing unit. Apart from all above. clock timing circuit and interrupt circuits. inter processor Communications link or as shift 31 kilo bauds. memory decoders. You can also establish a kind of Inter processor communication facility among many microcomputers in a distributed environment with automatic recognition of address/data. SERIAL PORTS Each 8051 microcomputer contains a high speed full duplex (means you can simultaneously use the same port for both transmitting and receiving basic modes: 8 bit purposes) serial port which is software configurable in 4 register I/O expander. MICROPROCESSOR A on a chip.occurrences of external events (from DC to 500 KHz) with 16 bit precision. The microprocessor contains arithmetic and logic unit. Stack pointer. To make a complete computer one must add memory usually RAM & ROM. 9 bit UART. Although popularly known as a computer .

The prime use of microprocessor is to read data.small or very large system can be configured around the CPU as the application demands. perform extensive calculations on that data and store those calculations in a mass storage device. The ROM based programs are primarily are small fixed programs that operate on peripherals and other fixed device that are connected to the system BLOCK DIAGRAM OF MICROPROCESSOR MICROCONTROLLER 26 . The programs used by the microprocessor are stored in the mass storage device and loaded in the RAM as the user directs. A few microprocessor programs are stored in the ROM.

Many instructions are coupled with pins on the IC package. ROM.Micro controller is a true computer on a chip the design incorporates all of the features found in a microprocessor CPU: arithmetic and logic unit. The design approach of a microcontroller uses a more limited set of single byte and double byte instructions that are used to move code and data from internal memory to ALU. 27 . The microcontroller is concerned with getting the data from and on to its own pins. Like the microprocessor. a microcontroller is a general purpose device. but one that is meant to read data. perform limited calculations on that data and control it’s environment based on those calculations. The prime use of a microcontroller is to control the operation of a machine using a fixed program that is stored in ROM and that does not change over the lifetime of the system. the architecture and instruction set are optimized to handle data in bit and byte size. It has also had added additional features like RAM. program counter and registers. counters and clock circuit. the pins are capable of having several different functions depending on the wishes of the programmer. serial I/O. stack pointer.


debugger. The other considerations in this category are: (a) Speed: The highest speed that the microcontroller supports (b) Packaging: Is it 40-pin DIP or QPF or some other packaging format? This is important in terms of space. Currently. 2. By suppliers meant a producer besides the 29 . The first and foremost criterion for choosing a microcontroller is that it must meet task at hands efficiently and cost effectively. (d) The amount of RAM and ROM on chip (e) The number of I/O pins and timers on the chip. assembling and prototyping the End product. technical support and both in house and outside expertise. The third criteria in choosing a microcontroller is it readily available in needed quantities both now and in future. a code efficient ‘C’ language compiler. In many cases third party vendor support for chip is required.CRITERIA FOR CHOOSING A MICROCONTROLLER 1. the 89C51 family has the largest number of diversified (multiple source) suppliers. In analyzing the needs of a microcontroller based project we must first see whether it is an 8-bit. emulator. of leading 8–bit microcontrollers. The second criteria in choosing a microcontroller are how easy it is to develop products around it. (f) Cost per unit: This is important in terms of final product in which a microcontroller is used. Key considerations include the availability of an assembler. For some designers this is even more important than first two criteria’s. 16-bit or 32-bit microcontroller and how best it can handle the computing needs of the task most effectively. (c) Power Consumption: This is especially critical for battery-powered Products. 3.

30 .originator of microcontroller in the case of the 89C51. These companies include PHILIPS. Viz: INTEL. Zilog and Microchip Technologies have all dedicated massive resource as to ensure wide and timely availability of their product since their product is stable. SIEMENS. PHILIPS. It should be noted that Motorola. several companies are also currently producing the 89C51. mature and single sourced. and DALLAS-SEMICONDUCTOR. In recent years they also have begun to sell the ASIC library cell of the microcontroller. which was originated by Intel.


[2][3] Its ubiquity makes international roaming very common between mobile phone operators.[5] This makes it easier for international travellers to connect to emergency services without knowing the local emergency number. enabling subscribers to use their phones in many parts of the world. Another advantage is that the standard includes one worldwide emergency telephone number. 32 . GSM also pioneered a low-cost (to the network carrier) alternative to voice calls.GSM GSM:- GSM (Global System for Mobile communications: originally from Groupe Spécial Mobile) is the most popular standard for mobile phones in the world. which is now supported on other mobile standards as well. the GSM Association.[1] GSM is used by over 3 billion people across more than 212 countries and territories. This has also meant that data communication was easy to build into the system. the short message service (SMS. Newer versions of the standard were backward-compatible with the original GSM phones. The ubiquity of the GSM standard has been an advantage to both consumers (who benefit from the ability to roam and switch carriers without switching phones) and also to network operators (who can choose equipment from any of the many vendors implementing GSM[4]). by means of General Packet Radio Service (GPRS). and thus is considered a second generation (2G) mobile phone system. Its promoter. GSM differs from its predecessors in that both signaling and speech channels are digital. Release '99 introduced higher speed data transmission using Enhanced Data Rates for GSM Evolution (EDGE). Release '97 of the standard added packet data capabilities. For example. GSM EDGE is a 3G version of the protocol. estimates that 80% of the global mobile market uses the standard. also called "text messaging"). 112.

femto and umbrella cells. There are also several implementations of the concept of an extended cell[12]. pico. micro. The coverage area of each cell varies according to the implementation environment. depending on the antenna system. to deliver the radio signals from an antenna outdoors 33 .Technical details:Cellular radio network GSM is a cellular network. they are mainly used indoors. Macro cells can be regarded as cells where the base station antenna is installed on a mast or a building above average roof top level. where the cell radius could be double or even more. or an indoor repeater with distributed indoor antennas fed through power splitters. Picocells are small cells whose coverage diameter is a few dozen metres. they are typically used in urban areas. Umbrella cells are used to cover shadowed regions of smaller cells and fill in gaps in coverage between those cells. There are five different cell sizes in a GSM network—macro. Indoor coverage is also supported by GSM and may be achieved by using an indoor picocell base station. Femtocells are cells designed for use in residential or small business environments and connect to the service provider’s network via a broadband internet connection. which means that mobile phones connect to it by searching for cells in the immediate vicinity. Micro cells are cells whose antenna height is under average roof top level. Cell horizontal radius varies depending on antenna height. The longest distance the GSM specification supports in practical use is 35 kilometres (22 mi). the type of terrain and the timing advance. antenna gain and propagation conditions from a couple of hundred meters to several tens of kilometres.

Some countries in the Americas (including Canada and the United States) use the 850 MHz and 1900 MHz bands because the 900 and 1800 MHz frequency bands were already allocated. which greatly reduces the interference to neighboring channels (adjacent-channel interference). in shopping centers or airports. the signal to be modulated onto the carrier is first smoothed with a Gaussian low-pass filter prior to being fed to a frequency modulator. uses 880–915 MHz (uplink) and 34 . E-GSM. for example. a kind of continuous-phase frequency shift keying. since indoor coverage is also provided by in-building penetration of the radio signals from any nearby cell.to the separate indoor distributed antenna system. Most 3G GSM networks in Europe operate in the 2100 MHz frequency band. In GMSK. This 'extended GSM'. this is not a prerequisite. However. In some countries the GSM-900 band has been extended to cover a larger frequency range. Most 2G GSM networks operate in the 900 MHz or 1800 MHz bands. The rarer 400 and 450 MHz frequency bands are assigned in some countries where these frequencies were previously used for first-generation systems. The modulation used in GSM is Gaussian minimum-shift keying (GMSK). providing 124 RF channels (channel numbers 1 to 124) spaced at 200 kHz. GSM-900 uses 890–915 MHz to send information from the mobile station to the base station (uplink) and 935–960 MHz for the other direction (downlink). GSM frequencies GSM networks operate in a number of different frequency ranges (separated into GSM frequency ranges for 2G and UMTS frequency bands for 3G). Duplex spacing of 45 MHz is used. These are typically deployed when a lot of call capacity is needed indoors.

The channel data rate for all 8 channels is 270. Originally.615 ms. EFR was refactored into a variable-rate codec called AMR-Narrowband.925–960 MHz (downlink). a 12. two codecs. which is high quality and robust against interference when used on full rate channels. These used a system based upon linear predictive coding (LPC). these codecs also made it easier to identify more important parts of the audio.5 and 13 kbit/s.833 kbit/s.2 kbit/s codec that uses a full rate channel. There are eight radio timeslots (giving eight burst periods) grouped into what is called a TDMA frame. named after the types of data channel they were allocated. Time division multiplexing is used to allow eight full-rate or sixteen half-rate speech channels per radio frequency channel. Voice codecs GSM has used a variety of voice codecs to squeeze 3. 35 . allowing the air interface layer to prioritize and better protect these parts of the signal. and the frame duration is 4.5 kbit/s) and Full Rate (13 kbit/s). were used. GSM was further enhanced in 1997[13] with the Enhanced Full Rate (EFR) codec. Half rate channels use alternate frames in the same timeslot. The transmission power in the handset is limited to a maximum of 2 watts in GSM850/900 and 1 watt in GSM1800/1900. adding 50 channels (channel numbers 975 to 1023 and 0) to the original GSM-900 band. In addition to being efficient with bitrates. called Half Rate (6. and less robust but still relatively high quality when used in good radio conditions on half-rate channels.1 kHz audio into between 6. with the development of UMTS. Finally.

• Subscriber Identity Module (SIM) One of the key features of GSM is the Subscriber Identity Module.Network structure The structure of a GSM network The network behind the GSM seen by the customer is large and complicated in order to provide all of the services which are required. The SIM is a detachable smart card containing the user's 36 . This is sometimes also just called the core network. • the GPRS Core Network (the optional part which allows packet based Internet connections). commonly known as a SIM card. It is divided into a number of sections and these are each covered in separate articles. • • the Base Station Subsystem (the base stations and their controllers). all of the elements in the system combine to produce many GSM services such as voice calls and SMS. the Network and Switching Subsystem (the part of the network most similar to a fixed network).

The locking applies to the handset not to SIM card. Finland. Pakistan and others) all phones are sold unlocked. Some operators will block this by allowing the phone to use only a single SIM. Communications between the subscriber and the base station can be encrypted. New Zealand and others) it is unlawful for operators to offer any form of subsidy on the phone's price. as well as mutually authenticating the network and the user .g. and operators want to try to recoup this investment before a subscriber leaves for another operator. or make use of software and websites available on the Internet to unlock the handset themselves. that uses a longer authentication key to give greater security. Belgium. Hong Kong. Phone locking Sometimes mobile phone operators lock mobiles which they sell to their own network.subscription information and phone book. In others (e. In some territories (e. The system was designed to authenticate the subscriber using a pre-shared key and challenge-response.whereas GSM only authenticates the user to the network 37 . or only a SIM issued by them. A subscriber can usually contact the provider to remove the lock for a fee. the user can also change operators while retaining the handset simply by changing the SIM. Bangladesh. and is illegal in some countries. This is done because the price of the mobile phone is typically subsidised with revenue from subscriptions.g. GSM security GSM was designed with a moderate level of security. utilize private services to remove the lock. this practice is known as SIM locking. some do it for free. This allows the user to retain his or her information after switching handsets. The development of UMTS introduces an optional USIM. Alternatively. While most web sites offer the unlocking for a fee.

On 28 December 2009 German computer engineer Karsten Nohl announced that he had cracked the A5/1 cipher. He also said that it is possible to build "a full GSM interceptor ... but limited authorization capabilities. and in February 2008. Inc revealed its ability and plans to commercialize FPGAs that allow A5/1 to be broken with a rainbow table attack. The security model therefore offers confidentiality and authentication. Serious weaknesses have been found in both algorithms: it is possible to break A5/2 in real-time with a ciphertext-only attack. he developed a number of rainbow tables (static values which reduce the time needed to carry out an attack) and have found new sources for known plaintext attacks. The system supports multiple algorithms so operators may replace that cipher with a stronger one.(and not vice versa). but experts say it is not the end of the world for Kasumi. RS-232 (Recommended Standard . It supplies the roadmap for the way devices 38 . Pico Computing. A5/1 was developed first and is a stronger algorithm used within Europe and the United States. the encryption algorithm used to secure traffic on 3G GSM wireless networks.com reported that "A group of cryptographers has developed a new attack that has broken Kasumi. The technique enables them to recover a full key by using a tactic known as a related-key attack.232) is a telecommunications standard for binary serial communications between devices. used to secure most 3g GSM traffic. RS232 (serial port). The A5/1 and A5/2 stream ciphers are used for ensuring over-the-air voice privacy. According to Nohl. and no non-repudiation. from open source components" but that they had not done so because of legal concerns. threatpost. A5/2 is weaker and used in other countries. In 2010. GSM uses several cryptographic algorithms for security." Kasumi is the name for the A5/3 algorithm.

You need a female connector on your communication from Host to Guest computer.. we have chosen the new RS232D Standard. which are male connectors on the back of the PC. which was recently released. a computer and modem.. The devices are commonly referred to as a DTE (data terminal equipment) and DCE (data communications equipment). The pin outs of both D9 & D-25 are show below 39 . he electrical characteristics of the serial port as per the EIA (Electronics Industry Association) RS232C Standard specifies a maximum baud rate of 20. respectively. RS232 is the most known serial port used in transmitting the data in communication and interface. RI. The ‘1’ and ‘0’ are the data which defines a voltage level of 3V to 25V and -3V to -25V respectively. this is the most effective method in which the data transmission requires less wires that yields to the less cost. the data is transmitted serially. The ‘transmit’ and ‘receive’ line on this connecter send and receive data between the computers. which is slow compared to today’s standard speed. CTS. Even though serial port is harder to program than the parallel port. for example. The RS232 is the communication line which enables the data transmission by only using three wire links. The two pins are TXD & RXD.e. i.. and RTS. As the name indicates. For this reason. D-TYPE 25 pin connector and D-TYPE 9 pin connector. DSR. ‘receive’ and common ground.speak to each other using serial ports.000bps. The RS-232D has existed in two types. The three links provides ‘transmit’. DTR. There are other lines on this port as RTS.

. modem is ready to exchange data) Data ready state (UART establishes a link) Signal ground Data Carrier detect (This line is active when modem detects a carrier Data Terminal Ready. 3 2 7 8 6 5 1 4 9 pin no.D-Type-9 pinD-Type-25 no.e.3 or 5. Ring Indicator (Becomes active when modem detects ringing signal from PSTN Rs232 When communicating with various micro processors one needs to convert the RS232 levels down to lower levels. 2 3 4 5 6 7 8 20 22 Pin outs Function RD TD RTS CTS DSR SG DCD DTR RI Receive Data (Serial data input) Transmit Data (Serial data output) Request to send (acknowledge to modem that UART is ready to exchange data Clear to send (i. typically 3.0 Volts. Here is a cheap and simple way to 40 .

MAX 232 PIN DIAGRAM +---\/---+ 1 -|C1+ Vcc|.15 3 -|C1. This level converter uses a Max232 and five capacitors.T1I|.9 +--------+ RS232 INTERFACED TO MAX 232 41 . On the other hand.10 8 -|R2I R2O|. To receive serial data from an RS-232 interface the voltage has to be reduced.3V) and generates the necessary RS-232 voltage levels.8V Low Thus the RS-232 signal levels are far too high TTL electronics. Serial RS-232 (V. and the negative RS232 voltage for high can’t be handled at all by computer logic. because it just needs one voltage (+5V or +3.do that. RS-232 TTL Logic -15V … -3V +2V … +5V High +3V … +15V 0V … +0. The MAX232 from Maxim was the first IC which in one package contains the necessary drivers and receivers to adapt the RS-232 signal voltage levels to TTL logic.14 4 -|C2+ R1I|. It became popular.3V or even lower. Modern low power consumption logic operates in the range of 0V and +3.T1O|.24) communication works with voltages -15V to +15V for high and low. Also the low and high voltage level has to be inverted. The max232 is quite cheap (less than 5 dollars) or if youre lucky you can get a free sample from Maxim.13 5 -|C2. TTL logic operates between 0V and +5V .16 2 -|V+ gnd|.R1O|.11 7 -|T2O T2I|.12 6 -|V.

3. X0 D O U T 1 2 VCC C 0 6 .J 9 8 7 6 2 5 4 3 2 1 16 U T 1 O U T T 5 V 1 8 3 R R 3 C 1 IR N 1 IR N 2 1 O9 O 2 U U T T P u 1 f 3R . 12 pin are connected to the 10 and 11 pin ie transmit and receive pin of microcontroller 42 . 1 1 T 2 I TN 1 T 1 I TN 2 C 4 1 1 + 3 C 1 C .5 the transmit pin of rs232 is connected to rx pin of microcontroller Max232 interfaced to microcontroller MAX232 is connected to the microcontroller as shown in the figure above 11. 1 u f C 0 u2 f 6 V V 7 M . only three pins of this are used ie 2. 51 u 4 f C 0 2 + 5 C C 2 GND 0 . 1 1 0 X P D 3 1. 1 + - 1 4 O 7 U O U T 1 T T A X u f 15 3 2 3 2 Rs232 is 9 pin db connector.

43 .

5 Pin no. Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED connections). 2 Pin no. Pin no. 14 Name VSS VCC VEE RS R/W EN D0 D1 D2 D3 D4 D5 D6 D7 Description Power supply (GND) Power supply (+5V) Contrast adjust 0 = Instruction input 1 = Data input 0 = Write to LCD module 1 = Read from LCD module Enable signal Data bus line 0 (LSB) Data bus line 1 Data bus line 2 Data bus line 3 Data bus line 4 Data bus line 5 Data bus line 6 Data bus line 7 (MSB) 44 . 7 Pin no. programming. 11 Pin no. 1 Pin no. their interfacing with various microcontrollers.LCD INTERFACING Introduction The most commonly used Character based LCDs are based on Hitachi's HD44780 controller or other which are compatible with HD44580. Pin Description The most commonly used LCD’s found in the market today are 1 Line. 10 Pin no. various interfaces (8-bit/4-bit). 6 Pin no. In this tutorial. special stuff and tricks you can do with these simple looking LCDs which can give a new look to your application. 8 Pin no. 12 Pin no. whereas LCDs supporting more than 80 characters make use of 2 HD44780 controllers. we will discuss about character based LCDs. 4 Pin no. Pin description is shown in the table below. 3 Pin no. 13 Pin no. Pin No. 2 Line or 4 Line LCDs which have only 1 controller and support at most of 80 characters. 9 Pin no.

so whatever you write after 16 chars is written in DDRAM but is not visible to the user. The character generator ROM generates 5 x 8 dot or 5 x 10 dot character patterns from 8-bit character codes (see Figure 5 and Figure 6 for more details). CGRAM area is used to create custom characters in LCD. the user can rewrite character patterns by program. For LCDs like 1x16. When we send a command or data to the LCD for processing. BF =1) and as soon as the instruction is executed 45 . BF . and for 5 x 10 dots. The area in display data RAM (DDRAM) that is not used for display can be used as general data RAM. how the character is displayed on LCD? So the answer is CGROM.Display Data RAM Display data RAM (DDRAM) stores display data represented in 8-bit character codes. It can generate 208 5 x 8 dot character patterns and 32 5 x 10 dot character patterns.e. User defined character patterns are also available by maskprogrammed ROM.Character Generator ROM Now you might be thinking that when you send an ASCII value to DDRAM. So whatever you send on the DDRAM is actually displayed on the LCD. If user wants to display the fourth custom character then the code to display it is 0x03 i. or 80 characters. CGRAM . four character patterns can be written.Character Generator RAM As clear from the name.DDRAM . eight character patterns can be written. this flag is set (i. As you can see in both the code maps. the character code from 0x00 to 0x07 is occupied by the CGRAM characters or the user defined characters. Its extended capacity is 80 X 8 bits. For 5 x 8 dots. CGROM .e. only 16 characters are visible.Busy Flag Busy Flag is a status indicator flag for LCD. In the character generator RAM. when user sends 0x03 code to the LCD DDRAM then the fourth user created character or pattern will be displayed on the LCD.

LCD shift command. we need to follow special sequence of initialization that tells the LCD controller that user has selected 4-bit mode of operation. LCD address etc.successfully this flag is cleared (BF = 0).        Wait for about 20mS Send the first init value (0x30) Wait for about 10mS Send second init value (0x30) Wait for about 1mS Send third init value (0x30) Wait for 1mS 46 . is decided by the instruction you send to LCD. and Data register is used for storing data which is to be displayed on LCD. 4-bit programming of LCD In 4-bit mode the data is sent in nibbles. the condition RS = 0 and R/W = 1 must be met and The MSB of the LCD data bus (D7) act as busy flag. To read Busy Flag. We call this special sequence as resetting the LCD. Instruction Register (IR) and Data Register (DR) There are two 8-bit registers in HD44780 controller Instruction and Data register. When BF = 1 means LCD is busy and will not accept next command or data and BF = 0 means LCD is ready for the next command or data to process. Instruction register corresponds to the register where you send commands to LCD e. LCD clear. first we send the higher nibble and then the lower nibble. the address where you want to send the data. To enable the 4-bit mode of LCD. This is helpful in producing and exact amount of delay for the LCD processing. Following is the reset sequence of LCD. the data on the pins is latched in to the data register and data is then moved automatically to the DDRAM and hence is displayed on the LCD. When send the enable signal of the LCD is asserted.g. Data Register is not only used for sending data to DDRAM but also for CGRAM.

This means in both command and data sending function we need to separate the higher 4-bits and lower 4-bits. Instead we simply put a certain amount of delay usually 300 to 600uS.for 8-bit and 0x20 for 4-bit) Wait for 1mS The busy flag will only be valid after the above reset sequence. The common steps are:      Mask lower 4-bits Send to the LCD port Send enable signal Mask higher 4-bits Send to LCD port 47 . first we send higher nibble and then lower nibble.e. then you may connect it on your controller but that will only increase another pin and does not make any big difference. D4-D7 are the data pins connection and Enable and Register select are for LCD control pins. We are not using Read/Write (RW) Pin of the LCD. Potentiometer RV1 is used to control the LCD contrast. If you want to use it. as you might have a different crystal frequency on which LCD controller is running.  Select bus width (0x30 . In 4-bit mode. In 4-bit mode data is sent nibble by nibble. Usually we do not use busy flag in 4-bit mode as we have to write code for reading two nibbles from the LCD. The unwanted data pins of LCD i. D0-D3 are connected to ground. as we are only writing on the LCD so we have made it grounded permanently. we only need 6 pins to interface an LCD. So it actually depends on the LCD module you are using. Sending data/command in 4-bit Mode We will now look into the common steps to send data/command to LCD when working in 4-bit mode. This delay might vary depending on the LCD you are using.

Send enable signal








GSM modem


Here we are the adjusting the output voltage to our required amount. capacitive filters . To connect the LCD to the 80517 it contains four data pins for getting data from the micro controller and to display data on LCD. 51 . Here we are using LCD as the output to display the data.BLOCK DAIGRAM EXPLANATION: Mainly the block diagram consists of following parts: • • • • Power supply circuit 8051 controller GSM LCD Generally we get 230v of power supply but we need only 5v to generate the micro controller so before giving the power supply directly to it we will use transformer. Here we are using 8051 micro controller so it requires only 5v so we use another module to get 5v supply to the 8051 micro controller. We connect four data pins to port0 as shown below which is used to transfer the data and to display it on the LCD. generators to convert 230v of power supply to the required amount to provide required supply to the micro controller.

12. 15. If adequate heat 52 . thermal shut down and safe operating area protection.Hardware connection & Schematic Explanation:REGULATED POWER SUPPLY LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator Features • Output Current up to 1A • Output Voltages of 5. 24 • Thermal Overload Protection • Short Circuit Protection • Output Transistor Safe Operating Area Protection Ordering Information Product Number Output Voltage Tolerance Package Operating Temperature LM7805CT ±4% TO-220 -40°C to +125°C LM7806CT LM7808CT LM7809CT LM7810CT LM7812CT LM7815CT LM7818CT LM7824CT LM7805ACT ±2% 0°C to +125°C LM7806ACT LM7808ACT LM7809ACT LM7810ACT LM7812ACT LM7815ACT LM7818ACT LM7824ACT General Description The LM78XX series of three terminal positive regulators are available in the TO-220 package and with several fixed output voltages. making it essentially indestructible. 8. 18. 6. Each type employs internal current limiting. 9. 10. making them useful in a wide range of applications.

BLOCK DIAGRAM BLOCK DIAGRAM 53 . Although designed primarily as fixed voltage regulators. these devices can be used with external components to obtain adjustable voltages and currents. they can deliver over 1A output current.sinking is provided.


Desktop compilers produce an output object code for the underlying microprocessor. After then we shall learn how to work with keil. For example compilers for Dos platform is different from the Compilers for Unix platform So if one wants to define a compiler then compiler is a program that translates source code into object code. I. However compilers require some time before an executable program emerges. See there is a bit little difference between compiler and an interpreter. So first we have to understand the concept of compilers and cross compilers. without looking at the entire program. Concept of compiler: Compilers are programs used to convert a High Level Language to object code.E the programs written in one of the HLL like ‘C’ will compile the code to run on the system for a particular processor like x86 (underlying microprocessor in the computer). but not for other microprocessors. Interpreter just interprets whole program at a time while compiler analyzes and execute each line of source code in succession. Secondly programs produced by compilers run much faster than the same programs executed by an interpreter. The advantage of interpreters is that they can execute a program immediately.Introduction to Micro vision Keil (IDE) Keil is a cross compiler. Now as compilers translate source code into object 55 . looking at the entire piece of source code and collecting and reorganizing the instruction. The compiler derives its name from the way it works.

And the compiler used for cross development is called cross compiler So the definition of cross compiler is a compiler that runs on one computer but produces object code for a different type of computer. many compilers are available for the same language. Code can be edited and compiled on a fast host machine (such as a PC or Unix workstation) and the resulting executable code can then be downloaded to the target to be tested. where the target probably couldn't run a compiler. It supports as a target to 8 bit microcontrollers like Atmel and Motorola etc. Keil C Compiler is one such compiler that supports a huge number of host and target combinations. Some of them are described as follows • By using this compilers not only can development of complex embedded systems be completed in a fraction of the time. no hard disk. 56 . and maintenance is easy. Why do we need cross compiler? There are several advantages of using cross compiler. I/O etc) than the target. disk. Cross compilers are beneficial whenever the host machine has more resources (memory. Cross compilers are used to generate software that can run on computers with a new architecture or on specialpurpose devices that cannot host their own compilers. Typically an embedded platform has restricted RAM. and limited I/O capability. but reliability is improved. which is unique for each type of computer. Concept of cross compiler: A cross compiler is similar to the compilers but we write a program for the target processor (like 8051 and its derivatives) on the host processors (like computer of x86) It means being in one environment you are writing a code for another environment is called cross development. • Knowledge of the processor instruction set is not required. Cross compilers are very popular for embedded development.code.

• • • • • • A rudimentary knowledge of the 8051’s memory architecture is desirable but not necessary. It provides several development tools like • • • • • IDE (Integrated Development environment) Project Manager Simulator Debugger C Cross Compiler. Keil C cross compiler: Keil is a German based Software development company. The C language is very portable and very popular. The ability to combine variable selection with specific operations improves program readability. you can generate embedded applications for 57 . Program development and debugging times are dramatically reduced when compared to assembly language programming. With these tools. Cross Assembler. and floating-point arithmetic) that may be incorporated into your application. • • Existing routine can be reused in new programs by utilizing the modular programming techniques available with C. Now after going through the concept of compiler and cross compilers lets we start with Keil C cross compiler. C compilers are available for almost all target systems. Keywords and operational functions that more nearly resemble the human thought process can be used. data conversions. Locator/Linker Keil Software provides you with software development tools for the 8051 microcontrollers. Register allocation and addressing mode details are managed by the compiler. The library files that are supplied provide many standard routines (such as formatted output. Existing software investments can be quickly and easily converted from or adapted to other processors or environments.

5. Macro Assembler. compiler and linker. Source-Level Debugger/Simulator. 8051 Utilities (linker. Correct errors in source files. 8051 Optimizing C Cross Compiler. 3. Test linked application. 2. 5. Link object files from compiler and assembler. object file converter. 2. Keil provides following tools for 8051 development 1. 3. 4. 4. assembler. 58 . Compile or assemble source files.the multitude of 8051 derivatives. µVision for Windows Integrated Development Environment. Create source files in C or assembly. The keil 8051 tool kit includes three main tools. 8051 project development cycle: These are the steps to develop 8051 project using keil 1. library manager). An assembler is used to assemble your 8051 assembly program A compiler is used to compile your C source code into an object file A linker is used to create an absolute object module suitable for your in-circuit emulator.



using highly advanced IC’s and with the help of growing technology the project has been successfully implemented. 61 .CONCLUSSION The project “ELECTRONIC CODE LOCKING USING GSM” has been successfully designed and tested. Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit. It has been developed by integrating features of all the hardware components used. Secondly.


national.Ram Micro processor Architecture. Rappaport Mobile Tele Communications .Ayala Fundamentals Of Micro processors and Micro computers -B.microsoftsearch. Programming & Applications -Ramesh S.com www.William C.8052.Theodore S. Lee References on the Web: www.com 63 .Y.nxp. Programming & Applications -Kenneth J.Gaonkar Electronic Components -D.BIBLIOGRAPHY The 8051 Micro controller and Embedded Systems -Muhammad Ali Mazidi -Janice Gillispie Mazidi The 8051 Micro controller Architecture.com www.V.Prasad Wireless Communications .com www.com www.geocities.