You are on page 1of 90

CELLPHONE OPERATED ROBOT

A Project Report Submitted by B.VINOD KUMAR (2210409106) G.PRATAP VAMSI (2210409143) At ECIL-ECIT (Electronic Corporation of India Limited) Under the esteemed guidance of Mr.P.B.RAMAKRISNA (SDGM, CED) ELECTRONICS AND COMMUNICATIONS DEPARTMENT At GITAM UNIVERSITY

DECLARATION
I hereby declare that the project entitled CELLPHONE OPERATED ROBOT submitted for the ELECTRONICS AND COMMUNICATION DEPARTMENT. This dissertation is our original work and the project has not formed the basis for the award of any degree, associate ship, fellowship or any other similar titles and no part of it has been published or sent for publication at the time of submission.

By

B.VINOD KUMAR (2210409106) G.PRATAP VAMSI (2210409143)

ECIL PROFILE
ECIL was setup under the Department of Atomic Energy on 11th April, 1967 with a view to generate a strong indigenous capability in the field of professional grade electronics. The initial accent was on total self-reliance and ECIL was engaged in the design development, Manufacture and Marketing of several products with emphasis on three technology lines viz. Computers, Control Systems and Communications. Over the years, ECIL pioneered the development of various complex electronics products without any external technology help and scored several firsts in this fields prominent among them being countrys

First Digital Computer First Solid State TV First Control & Instrumentation of Nuclear Power Plants First Earth Station Antenna First Computerized Operator Information System First radiation Monitoring & Detection System First Automatic Message Switching System First Operation & Maintenance Center for E-108 Exchange First Programmable Logic Controller First Solid state Cockpit Voice Recorder First Electronics Voting Machines

The company played a very significant role in the training and growth of high caliber technical and managerial man power especially in the fields of Computer and Information Technology. Though the initial thrust was on meeting the Control & Instrumentation requirements of the Nuclear Power Program, the expand scope of self-reliance pursued by ECIL enabled the company to develop various products to cater to the needs of Defense, Civil Aviation, Information & Broadcasting, Telecommunications, Insurance, banking, Police and Para-Military Forces, Oil & Gas, Power, Space Education, Health, Agriculture Steel and Coal Sectors and various user departments in the Government domain. ECIL thus evolved as multiproduct company serving multiple sectors of Indian economy with emphasis on import of country substitution and development of products & services that are of economic and strategic significance to the country.

Established: 1967 Location: Hyderabad, India


In addition to its primary focus on chosen areas like Strategic Electronics and IT, the Company took upon itself certain areas with a view to sub serve certain obligations of enterprises. Mostly, they are confined to the societal and rural sectors focusing on the health care, education, agriculture and such related areas.

ABSTRACT
Most of Artificial Intelligence will eventually lead to robotics. Most neural networking, natural language processing, image recognition, speech recognition/synthesis research aims at eventually incorporating their technology into the epitome of robotics the creation of a fully humanoid robot.

The field of robotics has been around nearly as long as Artificial Intelligence but the field has made little progress. This is only natural, since the field not only attempts to conquer intelligence, but also the body that embodies it a formidable task. Robotics, though, is not just about humanoid robots; but also about their commercial applications in manufacturing, safety and hundreds of other fields. It is only relatively recently that robots have started to employ a degree of Artificial Intelligence in their work many robots required human operators, or precise guidance throughout their missions. Slowly, robots are becoming more and more autonomous. Robotics is an absolutely fascinating field that interests most people. Robot is a system that contains sensors, control systems, manipulators, power supplies and software all working together to perform a task. Robot should have Sensing, Movement, Energy and Intelligence characteristics. This project deals with one of the application of robotics. In this project one moving object is developed such that it is moved as per commands given by master through Mobile phone and that command is received by mobile phone which is placed on the robot and give information to the DTMF IC which is connected to the microcontroller. This project is equipped with DC motor GSM mobile phone, DTMF IC, Micro controller along with the Power supply unit. Robot finds it applications in the real time in Defense applications, Satellite system, Flight tracking system, car race and Cerebella control.

TOPICS INDEX
1. INTRODUCTION 1.1. How to build Cell phone Operated Robot 1.2. Block Diagram

2. INTRODUCTION TO MICROCONTROLLER 2.1. Major features of Microcontrollers 2.1.1. Why AT89S52? 2.2. AT89S52 Microcontroller Architecture 2.3. Pin Description 2.3.1. AT89S52 Oscillator and Clock 2.4. Special Function Registers 2.4.1. SFR Types 2.4.2. SFR Descriptions 2.5. Conclusion 3. LIQUID CRYSTAL DISPLAY 3.1. Specifications of LCD 3.1.1.16*2 Alphanumeric LCD module features 3.2. Types of LCDs 3.3. Interfacing LCD to 8051 Microcontroller 3.4. Schematic Diagram of LCD 3.5. Circuit Description 4. INTRODUCTION TO EMBEDDED SYSTEMS 4.1. Introduction 4.1.1. Definition of Embedded system 4.1.2. Features of Embedded system 4.1.3. Characteristics of Embedded system 4.1.4. Overview of Embedded system Architecture 4.1.5. Applications of Embedded system 4.2. Types of Embedded system 4.2.1. Standalone Embedded system

4.2.2. Real time embedded system 4.2.3. Networked information appliances 4.2.4. Mobile devices 4.3. Programming Language 5. HARDWARE DESCRIPTION 5.1. Schematic Block diagram 5.2. DTMF (Dual Tone Multi frequency) 5.2.1. Introduction 5.2.2. HT917D/B features 5.2.3. Pin Description 5.2.4. Circuit Diagram 5.3. Motor Driver (L293D) 5.3.1. Introduction 5.3.2. Pin Description 5.3.3. Circuit description 5.4. DC Motor 5.4.1. DC motor features 6. REGULATED POWER SUPPLY 6.1. Introduction 6.1.1. Transformer 6.1.2. Rectifier 6.1.3. Filter 6.1.4. Regulator 7. KEIL SOFTWARE 7.1. Introduction 7.1.1. Keil Software Program Procedure

8. FUTURE SCOPE 9. CONCLUSION 10. REFERENCES

FIGURES INDEX
2.1. Functional Block Diagram of AT89S52 2.2. Pin Diagram of AT89S52 2.3. Oscillator & Timing Circuit

2.4. Special Function Register Address Range 2.5.16-bit Registers 2.6. Special Function Registers 2.6.1. PCON Register 2.6.2. TCON Register 2.6.3. TMOD Register 2.6.4. SCON Register 2.6.5. IE Register 2.6.6. IP Register 3.1. Interfacing LCD to 8051 Microcontroller 3.2. Schematic Diagram of LCD 3.3.2*16 Character LCD with Backlighting 3.4. Typical pin out on a display with 1*16 pin connector 3.5. Circuit Diagram of LCD 4.1. Overview of an embedded system Architecture 4.2. Basic form of ALP 5.1. Schematic Block Diagram 5.2. General Block Diagram 5.3. Pin Diagram of HT9170D/B 5.4. Circuit diagram of HT9170d/B 5.5. Pin Diagram of L293D 5.6. Robot Directions 5.7. Circuit Diagram of L293D 5.8. Figure of DC motor 6.1. Circuit Diagram of Power Supply 6.2. Electrical Transformer

6.3. Bridge Rectifier Circuit 6.4. Positive half cycle operation 6.5. Negative half cycle operation 6.6. Three Terminal Voltage Regulator 78xx

TABLE INDEX
2.1. Port pins and their alternate functions 2.2. SFRs 2.2.1. TCON Register

2.2.2. TMOD Register 2.2.3. SCON Register 3.1. Pin Description of LCD 5.1. Pin Description of HT9170D/B 5.2. Pin Description of L293D

1. INTRODUCTION

In this project the robot, is controlled by a mobile phone that makes call to the mobile phone attached to the robot in the course of the call, if any button is pressed control corresponding to the button pressed is heard at the other end of the call. This tone is called dual

tone multi frequency tome (DTMF) robot receives this DTMF tone with the help of phone stacked in the robot The received tone is processed by the atmega16 microcontroller with the help of DTMF decoder MT8870 the decoder decodes the DTMF tone in to its equivalent binary digit and this binary number is send to the microcontroller, the microcontroller is preprogrammed to take a decision for any give input and outputs its decision to motor drivers in order to drive the motors for forward or backward motion or a turn. The mobile that makes a call to the mobile phone stacked in the robot acts as a remote. So this simple robotic project does not require the construction of receiver and transmitter units. DTMF signaling is used for telephone signaling over the line in the voice frequency band to the call switching center. The version of DTMF used for telephone dialing is known as touch tone. DTMF assigns a specific frequency (consisting of two separate tones) to each key s that it can easily be identified by the electronic circuit. The signal generated by the DTMF encoder is the direct al-gebric submission, in real time of the amplitudes of two sine (cosine) waves of different frequencies, i.e. ,pressing 5 will send a tone made by adding 1336hz and 770hz to the other end of the mobile.

1.1.How to build cell phone operated Robot ?


Robot, is controlled by a mobile phone that makes call to the mobile phone attached to the robot in the course of the call, if any button is pressed control corresponding to the button pressed is heard at the other end of the call. This tone is called dual tone multi frequency tome (DTMF) robot receives this DTMF tone with the help of phone stacked in the robot, The received tone is processed by the Arduino with the help of DTMF decoder HT7190D the

decoder decodes the DTMF tone in to its equivalent binary digit and this binary number is send to the Arduino, the Arduino is preprogrammed to take a decision for any give input and outputs its decision to motor drivers in order to drive the motors for forward or backward motion or a turn. The mobile that makes a call to the mobile phone stacked in the robot acts as a remote. So you do not require the construction of receiver and transmitter units. DTMF signaling is used for telephone signaling over the line in the voice frequency band to the call switching center. The version of DTMF used for telephone dialing is known as touch tone. DTMF assigns a specific frequency to each keys that it can easily be identified by the electronic circuit. The signal generated by the DTMF encoder is the direct al-gebric submission, in real time of the amplitudes of two sine waves of different frequencies, i.e., pressing 5 will send a tone made by adding 1336 Hz and 770 Hz to the other end of the mobile.

This output is connected to the second port of the Microcontroller. With the help of port3 special function pins, to which motor driver L293D is connected will drive the motors and move the Robot in indicated direction.

1.2. BLOCK DIAGRAM


Power Supply: The power supply unit is used to provide a constant 5V supply to different ICs this is a standard circuits using external 12VDC adapter and fixed 3-pin voltage regulator. Diode is added in series to avoid Reverse voltage. Micro controller:

The 89C51 is a low cost Micro controller from either ATMEL or PHILIPS. It has a 40pin configuration and other components are interfaced to its ports. The entire functionality of the CLIP device is under the control of Micro controller. The Micro controller takes input from the external sources and routes them to the appropriate devices as programmed in it to Controls the direction of the robot.

GSM:

GSM (Global System for Mobile communication) is a digital mobile telephone system that is widely used in Europe and other parts of the world. GSM uses a variation of time division multiple access (TDMA) and is the most widely used of the three digital wireless telephone technologies (TDMA, GSM, and CDMA). GSM digitizes and compresses data, then sends it down a channel with two other streams of user data, each in its own time slot. It operates at either the 900 MHz or 1800 MHz frequency band.

DTMF transceiver:

The MT8888C/C-1 is a monolithic DTMF transceiver with call progress filter. The transceiver consists of transmitter and receiver. The DTMF signals are transmitted through

transmitter over the telephone lines and can be received and decoded using a DTMF receiver/decoder ICs.

Motors: By far the vast majority of robots use electric motors, of which there are several kinds. DC motors, which are familiar to many people, spin rapidly when electric current is passed through them. They will spin backwards if the current is made to flow in the opposite direction.

2. INTRODUCTION TO MICRO CONTROLLER


Introduction to Microcontroller 89S52:
A Micro controller consists of a powerful CPU tightly coupled with memory, various I/O interfaces such as serial port, parallel port timer or counter, interrupt controller, data acquisition interfaces-Analog to Digital converter, Digital to Analog converter, integrated on to a single silicon chip.

If a system is developed with a microprocessor, the designer has to go for external memory such as RAM, ROM, EPROM and peripherals. But controller is provided all these facilities on a single chip. Development of a Micro controller reduces PCB size and cost of design. One of the major differences between a Microprocessor and a Micro controller is that a controller often deals with bits not bytes as in the real world application. Intel has introduced a family of Micro controllers called the MCS-51.

Criteria for Choosing Microcontroller:


The first and foremost criterion for choosing a Microcontroller is that if Microcontroller based project we must first see whether an 8-bit, 16-bit or 32-bit. Microcontroller can best handle the computing needs of the task most effectively. Among other consideration in this category are: Cost: The cost of the part, Microcontrollers are usually very cheap, sometimes even less than $1 each. Speed: The frequency clock often stated in megahertz or gigahertz. Microcontrollers are typically slow, less than 20MHz. Bits: This usually means the number of bits that can be processed at one time by each instruction. Microcontrollers are almost always 8 bit or maybe 16 bit devices. The second criterion in choosing a Microcontroller is how easy it is to develop products around it. Key considerations include the availability of an assembler, debugger, a code efficient C language complier, emulator, technical support and both in hose and outside expertise. The third criterion in choosing Microcontrollers is its ready availability in needed qualities both now and in future. For some designers this is even more important that first two criteria. Currently, of leading 8 bit Microcontrollers, the MS-51 family has the largest number of diversified suppliers. By Suppliers meant a producer besides the originator of Microcontroller in the case of the MS- 51, which was originator by INTEL; several companies are also currently producing the MS-51: INTEL, ATMEL.

2.1. THE MAJOR FEATURES OF MICRO CONTROLLER:


Compatible with MCS-51 Products 8K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 10,000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Eight Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Fast Programming Time

Flexible ISP Programming (Byte and Page Mode)

2.1.1 Why AT89S52?


The system requirements and control specifications clearly rule out the use of 16, 32 or 64 bit micro controllers or microprocessors. Systems using these may be earlier to implement due to large number of internal features. They are also faster and more reliable but, 8-bit micro

controller satisfactorily serves the above application. Using an inexpensive 8-bit Microcontroller will doom the 32-bit product failure in any competitive market place. Coming to the question of why to use AT89S52 of all the 8-bit microcontroller available in the market the main answer would be because it has 4 Kb on chip flash memory which is just sufficient for our application. The on-chip Flash ROM allows the program memory to be reprogrammed in system or by conventional non-volatile memory Programmer. Moreover ATMEL is the leader in flash technology in todays market place and hence using AT 89S52 is the optimal solution.

2.2 AT89S52 MICRO CONTROLLER ARCHITECHTURE:

The

89S52

architecture

consists

of

these

specific

features:

FIGURE 2.1 FUNCTIONAL BLOCK DIAGRAM OF AT89S52

2.3 PIN DESCRIPTION:

FIGURE 2.2: PIN DIAGRAM OF AT89S52


VCC: Supply voltage. GND: Ground.

Port 0: Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink

eight TTL inputs. When ones are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during

accesses to external program and data memory. In this mode P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull-ups are required during program verification. Port 1: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull-ups and can be used as inputs. Port 1 also receives the low-order address bytes during Flash programming and verification. Port 2: Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull-ups and can be used as inputs. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3: Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. Port 3 also receives some control signals for Flash programming and verification Port 3 also serves the functions of various special features of the AT89S52.as listed below

TABLE 2.1: PORT3 PINS AND THEIR ALTERNATE FUNCTIONS RST(Reset):


A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG: Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN: Program Store Enable is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.

EA/VPP:

External Access Enable EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note: however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1:

Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2:

It is the Output from the inverting oscillator amplifier.

2.3.1 AT89S52 Oscillator and Clock:


The heart of the 89S52 circuitry that generates the clock pulses by which all internal operations are synchronized. Pins XTAL1 and XTAL2 is provided for connecting a resonant network to form an oscillator. Typically a quartz crystal and capacitors are employed. The crystal frequency is the basic internal clock frequency of the microcontroller. The manufacturers make 89S52 designs that run at specific minimum and maximum frequencies typically 1 to 16 MHzs XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven.

FIGURE 2.3: OSILLATOR AND TIMING CIRCUIT

2.4 SPECIAL FUNCTION REGISTERS:


The 8051 is a flexible microcontroller with a relatively large number of modes of operations. Your program may inspect and/or change the operating mode of the 8051 by manipulating the values of the 8051's Special Function Registers (SFRs). SFRs are accessed as if they were normal Internal RAM. The only difference is that Internal RAM is from address 00h through 7Fh whereas SFR registers exist in the address range

of 80h through FFh.Each SFR has an address (80h through FFh) and a name. The following chart provides a graphical presentation of the 8051's SFRs, their names, and their address.

FIG 2.4: SPECIAL FUNCTION REGISTERS ADDRESS RANGE As you can see, although the address range of 80h through FFh offers 128 possible addresses, there are only 21 SFRs in a standard 8051. All other addresses in the SFR range (80h through FFh) are considered invalid. Writing to or reading from these registers may produce undefined values or behaviour. Programming Tip: It is recommended that you not read or write to SFR addresses that have not been assigned to an SFR. Doing so may provoke undefined behaviour and may cause your program to be incompatible with other 8051-derivatives that use the given SFR for some other purpose.

2.4.1. SFR Types:


As mentioned in the chart itself, the SFRs that have a blue background are SFRs related to the I/O ports. The 8051 has four I/O ports of 8 bits, for a total of 32 I/O lines. Whether a given I/O line is high or low and the value read from the line are controlled by the SFRs in green. The SFRs with yellow background are SFRs which in some way control the operation or

the configuration of some aspect of the 8051. For example, TCON controls the timers, SCON controls the serial port. The remaining SFRs, with green backgrounds, are "other SFRs." These SFRs can be thought of as auxiliary SFRs in the sense that they don't directly configure the 8051 but obviously the 8051 cannot operate without them. For example, once the serial port has been configured using SCON, the program may read or write to the serial port using the SBUF register. Programming Tip: The SFRs whose names appear in red in the chart above are SFRs that may be accessed via bit operations (i.e., using the SETB and CLR instructions). The other SFRs cannot be accessed using bit operations. As you can see, all SFRs that whose addresses are divisible by 8 can be accessed with bit operations.

2.4.2. SFR Descriptions:


This section will endeavour to quickly overview each of the standard SFRs found in the above SFR chart map. It is not the intention of this section to fully explain the functionality of each SFR--this information will be covered in separate chapters of the tutorial. This section is to just give you a general idea of what each SFR does.

P0 (Port 0, Address 80h, Bit-Addressable): This is input/output port 0. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 0 is pin P0.0, bit 7 is pin P0.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. Programming Tip: While the 8051 has four I/O port (P0, P1, P2, and P3), if your hardware uses external RAM or external code memory (i.e., your program is stored in an external ROM or EPROM chip or if you are using external RAM chips) you may not use P0 or P2. This is because the 8051 uses ports P0 and P2 to address the external memory. Thus if you are using external RAM or code memory you may only use ports P1 and P3 for your own use.

SP (Stack Pointer, Address 81h): This is the stack pointer of the microcontroller. This SFR indicates where the next value to be taken from the stack will be read from in Internal RAM. If you push a value onto the stack, the value will be written to the address of SP + 1. That is to say, if SP holds the value 07h, a PUSH instruction will push the value onto the stack at address 08h. This SFR is modified by all instructions which modify the stack, such as PUSH, POP, and LCALL, RET, RETI, and whenever interrupts are provoked by the microcontroller. Programming Tip: The SP SFR, on start-up, is initialized to 07h. This means the stack will start at 08h and start expanding upward in internal RAM. Since alternate register banks 1, 2, and 3 as well as the user bit variables occupy internal RAM from addresses 08h through 2Fh, it is necessary to initialize SP in your program to some other value if you will be using the alternate register banks and/or bit memory. It's not a bad idea to initialize SP to 2Fh as the first instruction of every one of your programs unless you are 100% sure you will not be using the register banks and bit variables. DPL/DPH (Data Pointer Low/High, Addresses 82h/83h): The SFRs DPL and DPH work together to represent a 16-bit value called the Data Pointer. The data pointer is used in operations regarding external RAM and some instructions involving code memory. Since it is an unsigned two-byte integer value, it can represent values from 0000h to FFFFh (0 through 65,535 decimal).

Programming Tip: DPTR is really DPH and DPL taken together as a 16-bit value. In reality, you almost always have to deal with DPTR one byte at a time. For example, to push DPTR onto the stack you must first push DPL and then DPH. You can't simply plush DPTR onto the stack. Additionally, there is an instruction to "increment DPTR." When you execute this instruction, the two bytes are operated upon as a 16-bit value. However, there is no instruction those decrements DPTR. If you wish to decrement the value of DPTR, you must write your own code to do so.

DPL DPH

DPTR

PC

PC (Program counter)

FIG 2.5: 16BIT REGISTERS PCON (Power Control, Addresses 87h): The Power Control SFR is used to control the 8051's power control modes. Certain operation modes of the 8051 allow the 8051 to go into a type of "sleep" mode which requires much less power. These modes of operation are controlled through PCON. Additionally, one of the bits in PCON is used to double the effective baud rate of the 8051's serial port. SMOD --------------------GF1 GF0 PD IDL

FIG: 2.6.1. PCON REGISTER TCON (Timer Control, Addresses 88h, Bit-Addressable): The Timer Control SFR is used to configure and modify the way in which the 8051's two timers operate. This SFR controls whether each of the two timers is running or stopped and contains a flag to indicate that each timer has overflowed. Additionally, some non-timer related bits are located in the TCON SFR. These bits are used to configure the way in which the external interrupts are activated and also contain the external interrupt flags which are set when an external interrupt has occurred. Bit Addressable

TF1

TR1

TF0

TR0

IE1

IT1

IE0

IT0

FIG: 2.6.2. TCON REGISTER The lower 4 bits Are set aside for Controlling the Interrupts Interrupt bits. The upper four Bits are used to Store the TF and TR bits of both Timer 0 and 1.

TF1

Timer1 overflow flag. Set by hardware when the Timer/Counter 1 overflows. Cleared by hardware as processor vectors to the interrupt service routine.

TR1

Timer 1 run control bit. Set/cleared by software to turn Timer/Counter 1 ON/OFF.

TF0

.Timer0 overflow flag. Set by hardware when the Timer/Counter 0 overflows. Cleared by hardware as processor vectors to the service routine

TR0

Timer 0 run control bit. Set/cleared by software to turn Timer/Counter 0 ON/OFF.

IE1

External Interrupt 1 edge flag. Set by hardware when External interrupt edge is detected. Cleared by hardware when interrupt is processed.

IT1

Interrupt 1 type control bit. Set/cleared by software to specify falling edge/low level triggered External Interrupt.

IE0

External Interrupt 0 edge flag. Set by hardware when External Interrupt edge is detected. Cleared by hardware when interrupt is processed.

IT0

Interrupt 0-type control bit. Set/cleared by software to specify falling edge/low level triggered External Interrupt.

TABLE: 2.2.1.TCON REGISTER TMOD (Timer Mode, Addresses 89h): The Timer Mode SFR is used to configure the mode of operation of each of the two timers. Using this SFR your program may configure each timer to be a 16-bit timer, an 8-bit auto-reload timer, a 13-bit timer, or two separate timers. Additionally, you may configure the timers to only count when an external pin is activated or to count "events" that are indicated on an external pin. Not Bit Addressable. GATE C/T Timer 1 FIG: 2.6.3. TMOD REGISTER M1 M0 GATE C/T M1 M0

Timer 0

GATE

When TRx (in TCON) is set and GATE=1, Timer/Counter will run only while INTx pin is high (hardware control). When GATE=0, Timer/Counter will run only while TRx=1 (software control).

C/T

Timer or Counter selector. Cleared for Timer operation (input from internal system clock). Set for Counter operation (input from TX input pin).

M1

Mode selector bit.

M0

Mode selector bit.

TABLE: 2.2.2.TMOD REGISTER M1 0 0 1 M0 0 1 0 Mode 0 1 2 Operating Mode 13-bit Timer (8048 compatible) (TH1). 16-bit Timer/Counter. 8-bit Auto-Reload Timer/Counter (TL1).

Reloaded from TH1 at overflow. 1 1 1 1 3 3 timer 1 halted. Retains count. (Timer 1) Timer/Counter 1 stopped.

TL0/TH0 (Timer 0 Low/High, Addresses 8Ah/8Ch): These two SFRs, taken together, represent timer 0. Their exact behaviour depends on how the timer is configured in the TMOD SFR; however, these timers always count up. What is configurable is how and when they increment in value. TL1/TH1 (Timer 1 Low/High, Addresses 8Bh/8Dh): These two SFRs, taken together, represent timer 1. Their exact behaviour depends on how the timer is configured in the TMOD

SFR; however, these timers always count up. What is configurable is how and when they increment in value. P1 (Port 1, Address 90h, and Bit-Addressable): This is input/output port 1. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 1 is pin P1.0, bit 7 is pin P1.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. SCON (Serial Control, Addresses 98h, Bit-Addressable): The Serial Control SFR is used to configure the behaviour of the 8051's on-board serial port. This SFR controls the baud rate of the serial port, whether the serial port is activated to receive data, and also contains flags that are set when a byte is successfully sent or received. Programming Tip: To use the 8051's on-board serial port, it is generally necessary to initialize the following SFRs: SCON, TCON, and TMOD. This is because SCON controls the serial port. However, in most cases the program will wish to use one of the timers to establish the serial port's baud rate. In this case, it is necessary to configure timer 1 by initializing TCON and TMOD. SM0 SM1 SM2 REN TB8 RB8 TI RI

FIG: 2.6.4.SCON REGISTER Bit Name 7 6 5 4 SM0 SM1 SM2 REN Bit Address 9FH 9EH 9DH 9CH 9BH 9AH 99H Explanation of function Serial port mode bit 0. Serial port mode bit 1. Multiprocessor communications Enable (explained later). Receiver Enable. This bit must be set in order to receive characters. Transmit bit 8. The 9th bit to transmit in mode 2 and 3. Receive bit 8. The 9th bit received in mode 2 and 3. Transmit flag. Set when a byte has been completely

3 2 1

TB8 RB8 TI

transmitted. 0 RI 98H Receive flag. Set when a byte has been completely received.

TABLE 2.2.3: SCON REGISTER Mode0: transmitted/received (LSB first). The baud rate is fixed at 1/12 the oscillator frequency. Mode 1: 10 bits are transmitted (through TxD) or received (through RxD): a start bit (0), 8 data bits (LSB first), and a stop bit (1). On receive; the stop bit goes into RB8 in Special Function Register SCON. The baud rate is variable. Mode 2: 11 bits are transmitted (through TxD) or received (through RxD): start bit (0), 8 data bits (LSB first), a programmable 9th data bit, and a stop bit (1). On Transmit, the 9th data bit (TB8 in SCON) can be assigned the value of 0 or 1. Or, for example, the parity bit (P, in the PSW) could be moved into TB8. On receive; the 9th data bit goes into RB8 in Special Function Register SCON, while the stop bit is ignored. The baud rate is programmable to either 1/32 or 1/64 the oscillator frequency. Mode 3: 11 bits are transmitted (through TxD) or received (through RxD): a start bit (0), 8 data bits (LSB first), a programmable 9th data bit, and a stop bit (1). In fact, Mode 3 is the same as Mode 2 in all respects except baud rate. The baud rate in Mode 3 is variable. In all four modes, transmission is initiated by any instruction that uses SBUF as a destination register. Reception is initiated in Mode 0 by the condition RI = 0 and REN = 1. Reception is initiated in the other modes by the incoming start bit if REN = 1. SM2: Enables the multiprocessor communication feature in Modes 2 and 3. In Mode 2 or 3, if SM2 is set to 1, then Rl will not be activated if the received 9th data bit (RB8) is 0. In Mode 1, if SM2=1 then RI will not be activated if a valid stop bit was not received. In Mode 0, SM2 should be 0. REN: Enables serial reception. Set by software to enable reception. Clear by software to disable reception. TB8: The 9th data bit that will be transmitted in Modes 2 and 3. Set or clear by software as desired.

RB8: In Modes 2 and 3, is the 9th data bit that was received. In Mode 1, it SM2=0, RB8 is the stop bit that was received. In Mode 0, RB8 is not used. TI (Transmit Interrupt): This is an extremely important flag bit in the SCON register. When the 8051 finishes the transfer of the 8-bit character it raises the TI flag to indicate that it is ready to transfer another byte. The TI bit is raised at the beginning of the stop bit. RI (Receive Interrupt): This is an extremely important flag bit in the SCON register. When the 8051 receives data serially via RxD, it gets rid of the start and stop bits and places the byte in the SBUF register. Then it raises the RI flag bit to indicate that a byte has been received and could be picked up before it is lost. SBUF (Serial Control, Addresses 99h): The Serial Buffer SFR is used to send and receive data via the on-board serial port. Any value written to SBUF will be sent out the serial port's TXD pin. Likewise, any value which the 8051 receives via the serial port's RXD pin will be delivered to the user program via SBUF. In other words, SBUF serves as the output port when written to and as an input port when read from. P2 (Port 2, Address A0h, Bit-Addressable): This is input/output port 2. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 2 is pin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. Programming Tip: While the 8051 has four I/O port (P0, P1, P2, and P3), if your hardware uses external RAM or external code memory (i.e., your program is stored in an external ROM or EPROM chip or if you are using external RAM chips) you may not use P0 or P2. This is because the 8051 uses ports P0 and P2 to address the external memory. Thus if you are using external RAM or code memory you may only use ports P1 and P3 for your own use. IE (Interrupt Enable, Addresses A8h): The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits of the SFR are used to enable/disable the specific interrupts, where as the highest bit is used to enable or disable ALL interrupts. Thus, if the high bit of IE is 0 all interrupts are disabled regardless of whether an individual interrupt is enabled by setting a lower bit.

EA

----------

ET2

ES

ET1

EX1

ET0

EX0

FIG: 2.6.5.IE REGISTER P3 (Port 3, Address B0h, Bit-Addressable): This is input/output port 3. Each bit of this SFR corresponds to one of the pins on the microcontroller. For example, bit 0 of port 3 is pin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to a low level. IP (Interrupt Priority, Addresses B8h, Bit-Addressable): The Interrupt Priority SFR is used to specify the relative priority of each interrupt. On the 8051, an interrupt may either be of low (0) priority or high (1) priority. An interrupt may only interrupt interrupts of lower priority. For example, if we configure the 8051 so that all interrupts are of low priority except the serial interrupt, the serial interrupt will always be able to interrupt the system, even if another interrupt is currently executing. However, if a serial interrupt is executing no other interrupt will be able to interrupt the serial interrupt routine since the serial interrupt routine has the highest priority. ---------------PT2 PS PT1 PX1 PT0 PX0

FIG: 2.6.6.IP REGISTER

ACC (Accumulator, Addresses E0h, Bit-Addressable): The Accumulator is one of the mostused SFRs on the 8051 since it is involved in so many instructions. The Accumulator resides as an SFR at E0h, which means the instruction MOV A,#20h is really the same as MOV E0h,#20h. However, it is a good idea to use the first method since it only requires two bytes whereas the second option requires three bytes. B (B Register, Addresses F0h, Bit-Addressable): The "B" register is used in two instructions: the multiply and divide operations. The B register is also commonly used by programmers as an auxiliary register to temporarily store values. PSW (Program Status Word, Addresses D0h, Bit-Addressable): The Program Status Word is used to store a number of important bits that are set and cleared by 8051 instructions. The PSW SFR contains the carry flag, the auxiliary carry flag, the overflow flag, and the parity flag. Additionally, the PSW register contains the register bank select flags which are used to select which of the "R" register banks are currently selected.

Programming Tip: If you write an interrupt handler routine, it is a very good idea to always save the PSW SFR on the stack and restore it when your interrupt is complete. Many 8051 instructions modify the bits of PSW. If your interrupt routine does not guarantee that PSW is the same upon exit as it was upon entry, your program is bound to behave rather erradically and unpredictably--and it will be tricky to debug since the behavior will tend not to make any sense PSW register, also referred to as the flag register, is an 8 bit register Only 6 bits are used These four are CY (carry), AC (auxiliary carry), P (parity), and OV (overflow) They are called conditional flags, meaning that they indicate some conditions that resulted after an instruction was executed. The PSW3 and PSW4 are designed as RS0 and RS1, and are used to change the bank. The two unused bits are user-definable
CY AC F0 RS1 RS0 OV -P

CY

PSW.7 AC F0 PSW.6 PSW.5

Carry flag Auxiliary carry flag. Available to the user for general purpose. Register bank selector bit1.

RS1 PSW.4

RS0 PSW.3 OV PSW.2 -P PSW.1 PSW.0 to indicate an

Register bank selector bit0. Overflow flag. User definable bit. Parity flag. Set/cleared by hardware each instruction Cycle odd/even number of 1 bit in the

accumulator.

2.5. CONCLUSION:
A highly integrated chip that contains all the components comprising a controller. Typically this includes a CPU, RAM, some form of ROM, I/O ports, and timers. Unlike a general-purpose computer, which also includes all of these components, a microcontroller is designed for a very specific task -- to control a particular system. As a result, the parts can be simplified and reduced, which cuts down on production costs. Microcontrollers are sometimes called embedded microcontrollers, which just mean that they are part of an embedded system -- that is, one part of a larger device or system. The 8051 is a flexible microcontroller with a relatively large number of modes of operations. Your program may inspect and/or change the operating mode of the 8051 by manipulating the values of the 8051's Special Function Registers (SFRs). SFRs are accessed as if they were normal Internal RAM. The only difference is that Internal RAM is from address 00h through 7Fh whereas SFR registers exist in the address range of 80h through FFh.

3.LIQUID CRYSTAL DISPLAY

LCD a type of display used in digital watches and many portable computers. LCD displays utilize two sheets of polarizing material with a liquid crystal solution between them. An electric current passed through the liquid causes the crystals to align so that light cannot pass through them. Each crystal, therefore, is like a shutter, either allowing light to pass through or blocking the light. Monochrome LCD images usually appear as blue or dark gray images on top of a grayish-white background. Color LCD displays use two basic techniques for producing color: Passive matrix is the less expensive of the two technologies. The other technology, called thin film transistor (TFT) or active-matrix, produces color images that are as sharp as traditional CRT displays, but the technology is expensive. Recent passive-matrix displays using new CSTN and DSTN technologies produce sharp colors rivaling active-matrix displays. Most LCD screens used in notebook computers are backlit, or transmissive, to make them easier to read. In our project we 16*2 character type of LCD.

3.1. SPECIFICATION OF LCD:


Important factors to consider when evaluating an LCD: Resolution versus range: Fundamentally resolution is the granularity (or number of levels) with which a performance feature of the display is divided. Resolution is often confused with range or the total end-to-end output of the display. Each of the major features of a display has both a resolution and a range that are tied to each other but very different. Frequently the range is an inherent limitation of the display while the resolution is a function of the electronics that make the display work. Spatial performance: LCDs come in only one size for a variety of applications and a variety of resolutions within each of those applications. LCD spatial performance is also sometimes described in terms of a "dot pitch". The size (or spatial range) of an LCD is always described in terms of the diagonal distance from one corner to its opposite. This is an historical remnant from the early days of CRT television when CRT screens were manufactured on the bottoms of glass bottles, a direct extension of cathode ray tubes used in oscilloscopes. The diameter of the bottle

determined the size of the screen. Later, when televisions went to a squarer format, the square screens were measured diagonally to compare with the older round screens.

Temporal/timing performance: Contrary to spatial performance, temporal performance is a feature where smaller is better. Specifically, the range is the pixel response time of an LCD, or how quickly you can change a sub-pixel's brightness from one level to another. For LCD monitors, this is measured in btb (black to black) or gtg (gray to gray). These different types of measurements make comparison difficult. Further, this number is almost never published in sales advertising.

Color performance: There are many terms to describe color performance of an LCD. They include color gamut which is the range of colors that can be displayed and color depth which is the color resolution or the resolution or fineness with which the color range is divided. Although color gamut can be expressed as three pairs of numbers, the XY coordinates within color space of the reddest red, greenest green, and bluest blue, it is usually expressed as a ratio of the total area within color space that a display can show relative to some standard such as saying that a display was "120% of NTSC". NTSC is the National Television Standards Committee, the old standard definition TV specification. Color gamut is a relatively straight forward feature. However with clever optical techniques that are based on the way humans see color, termed color stretch, colors can be shown that are outside of the nominal range of the display. In any case, color range is rarely discussed as a feature of the display as LCDs are designed to match the color ranges of the content that they are intended to show. Having a color range that exceeds the content is a useless feature. Color depth or color support is sometimes expressed in bits, either as the number of bits per subpixel or the number of bits per pixel. This can be ambiguous as an 8-bit color LCD can be 8 total bits spread between red, green, and blue or 8 bits each for each color in a different display. Further, LCDs sometimes use a technique called dithering which is time averaging colors to get intermediate colors such as alternating between two different colors to get a color in between. This doubles the number of colors that can be displayed; however this is done at the expense of the temporal performance of the display. Dithering is commonly used on computer displays where the images are mostly static and the temporal performance is unimportant.

Brightness and contrast ratio: Contrast ratio is the ratio of the brightness of a full-on pixel to a full-off pixel and, as such, would be directly tied to brightness if not for the invention of the blinking backlight (or burst dimming). The LCD itself is only a light valve, it does not generate light; the light comes from a backlight that is either a florescent tube or a set of LEDs. The

blinking backlight was developed to improve the motion performance of LCDs by turning the backlight off while the liquid crystals were in transition from one image to another. However, a side benefit of the blinking backlight was infinite contrast. The contrast reported on most LCDs is what the LCD is qualified at, not its actual performance. In any case, there are two large caveats to contrast ratio as a measure of LCD performance.

3.1.1.16 x 2 Alphanumeric LCD Module Features:


Intelligent, with built-in Hitachi HD44780 compatible LCD controller and RAM providing simple interfacing. 61 x 15.8 mm viewing area. 5 x 7 dot matrix format for 2.96 x 5.56 mm characters, plus cursor line. Can display 224 different symbols. Low power consumption (1 mA typical). Powerful command set and user-produced characters. TTL and CMOS compatible. Connector for standard 0.1-pitch pin headers.

3.2 TYPES OF LCD DISPLAY: There are three LCD display types: segment (or alphanumeric), dot matrix (or character) and graphic LCD. Segment LCD (or Alphanumeric LCD): Segment LCD can display Arabic numbers represented by 7 segments or Arabic numbers and Roman letters represented by 14 segments. Symbols, such as plus/minus signs, measurement units and any custom icons, can also be displayed. Each symbol is treated as one segment. Segment LCD is widely used on the displays of scientific instruments. It is easy to control and most cost-effective to develop. Segment LCD is limited to displaying numbers, Roman letters and fixed symbols. If you need to display anything else, you have to use either the dot matrix display or graphic display. Dot Matrix LCD (or Character LCD): Dot matrix LCD is used to display a number of lines of characters. The most commonly used dot matrix LCD displays 1 to 4 lines of 16 to 40 characters. Each character is represented by 5x7 dots plus cursor (actually 5x8 dots including the cursor). Each character block is addressed separately and can form numbers, Roman letters, character in

other languages and a limited number of symbols. Dot matrix LCD is used when you need to display more characters than those in English alphabet. It is relatively simple to control and also inexpensive than graphic models. Graphic LCD: Graphic LCD provides users with a greater degree of flexibility. They are composed of pixels arranged in rows and columns. Each pixel can be addressed individually for text, graphics or any combination of the two. Graphic LCD is used in applications when the use needs to have total control of the whole viewing area. However, flexibility also comes with the difficulty in designing the control circuitry. Fortunately there are special controller chips available for this purpose.
3.3. INTERFACING LCD TO 8051MICROCONTROLLER:

To send any of the commands from given table to the LCD,make pin RS=0.For data,make RS=1,then send a high to low pulse to the E pin to enable the internal latch of the LCD.As shown in figure for LCD connections
P0.7 P0.6 P0.5 8051 MICRO CONTROLLER P0.4

(AT89C51ED2)

P0.3 P0.2 P0.1 P0.0 P2.2 P2.1 P2.0

D7 D6 D5 D4 D3 D2 D1 D0 E R/W

RS

HELLO WORLD

FIG 3.1: INTERFACING LCD TO 8051MICROCONTROLLER

Pin Number 1 2 3 4

Symbol

Level

I/O

Function

Vss Vcc Vee RS

I/O

Power supply(GND) Power supply(+5v) Contrast adjust 0=Instruction input 1=Data input

R/W

0/1

0=write to LCD module 1=Read from LCD module

6 7 8 9 10 11 12 13 14

E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7

1,1->0 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1

I I/O I/O I/O I/O I/O I/O I/O I/O

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

TABLE 3.1: PIN DESCRIPTION

3.4. SCHEMATIC DIAGRAM OF LCD DISPLAY:

10 11 12 13 14 4

7 1

10 11 12 13 14 4

G +5V -5V

11

D0 D3 D4 D5 D6 D7 RS R\W EN

D1

D2

FIG:3.2 SCHEMATIC DIAGRAM OF LCD DISPLAY:

BIT RS R/W

D7 D6

D5 D4 D3 D2 D0

Function

0 0 0

0 0 0

0 0 0

0 0 0

0 0 0

0 0 0

0 0 0

0 0 1

0 1

1 0

Clear LCD and memory, home cursor Clear and home cursor only Screen action as display character written

1/0 S

S=1/0: Shift screen/cursor I/O=1/0: cursor R/L, screen L/R 0 0 0 0 0 0 1 D C B D=1/0: Screen on/off

C=1/0: Cursor on/off B=1/0: Cursor blink/no blink 0 0 0 0 0 1 S/C R/L 0 0 S/C: 1/0: Screen/Cursor

R/L: Shift one space R/L

DL N

F 0

DL=1/0:8/4 Bits per Character

N=1/0; 2/1 Rows of Characters F=1/0; 5*10/5*7Dots/Character

1 Character address Write to character RAM address after this Write to display RAM address after this BF=1/0: busy/Notbusy Write byte to last RAM chosen Read byte from last RAM chosen

0 0 1 1

0 1 0 1

1 BF

Display data address Current address Character type Character type

FIG3.3.2X16

CHARACTER

LCD

WITH

BACKLIGHTING.

FIG3 3.4.TYPICAL PINOUT ON A DISPLAY WITH 1X16 PIN CONNECTOR

FIG:

3.5. CIRCUIT DESCRIPTION:

FIG 3.5: CIRCUIT DIAGRAM OF LCD It is very important to keep a track of the working of almost all the automated and semiautomated devices, be it a washing machine, an autonomous robot or anything else. This is achieved by displaying their status on a small display module. LCD (Liquid Crystal Display) screen is such a display module and a 16x2 LCD module is very commonly used. These modules are replacing seven segments and other multi segment LEDs for these purposes. The reasons being: LCDs are economical, easily programmable, have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on. LCD can be easily interfaced with a microcontroller to display a message or status of a device.

4.INTRODUCTION TO EMBEDDED SYSTEMS

4.1.INTRODUCTION:
Each day, our lives become more dependent on 'embedded systems', digital information technology that is embedded in our environment. More than 98% of processors applied today are in embedded systems, and are no longer visible to the customer as 'computers' in the ordinary sense. An Embedded System is a special-purpose system in which the computer is completely encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose computer, such as a personal computer, an embedded system performs one or a few pre-defined tasks, usually with very specific requirements. Since the system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product. Embedded systems are often mass-produced, benefiting from economies of scale. The increasing use of PC hardware is one of the most important developments in high-end embedded systems in recent years. Hardware costs of high-end systems have dropped dramatically as a result of this trend, making feasible some projects which previously would not have been done because of the high cost of non-PC-based embedded hardware. But software choices for the embedded PC platform are not nearly as attractive as the hardware. Typically, an embedded system is housed on a single microprocessor board with the programs stored in ROM. Virtually all appliances that have a digital interface -- watches, microwaves, VCRs, cars -- utilize embedded systems. Some embedded systems include an operating system, but many are so specialized that the entire logic can be implemented as a single program. Physically, Embedded Systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants. In terms of complexity embedded systems can range from very simple with a single microcontroller chip, to very complex with multiple units, peripherals and networks mounted inside a large chassis or enclosure.

4.1.1 Definition of an Embedded System: An Embedded system is defined as,


for a particular/specific application implementing the software code to interact directly with that

particular hardware what we built. Software is used for providing features and flexibility, Hardware = {Processors, ASICs, Memory...} is used for Performance (& sometimes security). (Or) An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions, often with real-time computing constraints. It is usually embedded as part of a complete device including hardware and mechanical parts. In contrast, a generalpurpose computer, such as a personal computer, can do many different tasks depending on programming. (Or) An embedded system is a single-purpose computer built into a larger system for the purposes of controlling and monitoring the system. A specialized computer system that is part of a larger system or machine.

4.1.2 Features of an Embedded System:


The versatility of the embedded computer system lends itself to utility in all kinds of enterprises, from the simplification of deliverable products to a reduction in costs in their development and manufacture. Complex systems with rich functionality employ special operating systems that take into account major characteristics of embedded systems. Embedded operating systems have minimized footprint and may follow real-time operating system specifics. The special computers system is usually less powerful than general-purpose systems, although some expectations do exist where embedded systems are very powerful and complicated. Usually a low power consumption CPU with a limited amount of memory is used in embedded systems. Many embedded systems use very small operating systems; most of these provide very limited operating system capabilities. Since the embedded system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product, or increasing the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. Some embedded systems have to operate in extreme environment conditions such as very high temperature & humidity.

For high volume systems such as portable music players or mobile phones, minimizing cost is usually the primary design consideration. Engineers typically select hardware that is just good enough to implement the necessary functions. For low volume or prototype embedded systems, general purpose computers may be adapted by limiting the programs or by replacing the operating system with a real-time operating system.

4.1.3 Characteristics of an Embedded System:


An Embedded computing systems generally exhibit rich functionality complex functionality is usually the reason for introducing CPUs into the design. However, they also exhibit many non-functional requirements that make the task especially challenging: Real-time deadlines that will cause system failure if not met; Multi-rate operation; In many cases, low power consumption; Low manufacturing cost, which often means limited code size. Workstation programmers often concentrate on functionality. They may consider the performance characteristics of a few computational kernels of their software, but rarely analyze the total application. They almost never consider power consumption and manufacturing cost. The need to juggle all these requirements makes embedded system programming very challenging and is the reason why embedded system designers need to understand computer architecture.

4.1.4 Overview of an Embedded System Architecture:


Every Embedded system consists of a custom-built hardware built around a central processing unit. This hardware also contains memory chips onto which the software is loaded.

Fig: 4.1: Overview of embedded system architecture


The operating system runs above the hardware and the application software runs above the operating system. The same architecture is applicable to any computer including desktop computer. However these are significant differences. It is not compulsory to have an operating system in every embedded system. For small applications such as remote control units, air conditioners, toys etc.

4.1.5 Applications of Embedded Systems:


Some of the most common embedded systems used in everyday life are Small embedded controllers: 8-bit CPUs dominate, simple or no operating system

(e.g., thermostats) Control systems: (e.g., automotive engine control) Distributed embedded control: Mixture of large and small nodes on a real-time Embedded networks (e.g., cars, elevators, factory automation) System on chip: ASIC design tailored to application area Often use DSP chip for control computations

(e.g., consumer electronics, set-top boxes)

Network equipment:

Emphasis on data movement/packet flow

(e.g., network switches; telephone switches) Critical systems: Safety and mission critical computing

(e.g., pacemakers, automatic trains) Signal processing: Often use DSP chips for vision, audio, or other signal

Processing (e.g., face recognition) Robotics: Uses various types of embedded computing (especially

Vision and control) (e.g., autonomous vehicles) Computer peripherals: Wireless systems: Disk drives, keyboards, laser printers, etc. Wireless network-connected sensor networks and

Motes to gather and report information Embedded PCs: Equipment Command and control: Often huge military systems and systems of systems Palmtop and small form factor PCs embedded into

(e.g., a fleet of warships with interconnected Computers) Home Appliances, intercom, telephones, security systems, garage door openers, answering machines, fax machines, home computers, TVs, cable TV tuner, VCR, camcorder, remote controls, video games, cellular phones, musical instruments, sewing machines, lighting control, paging, camera, pinball machines, toys, exercise equipment Office Telephones, computers, security systems, fax machines, microwave, copier, laser printer, color printer, paging Auto Trip computer, engine control, air bag, ABS, instrumentation, security system, transmission control, entertainment, climate control, cellular phone, keyless entry.

4.2. TYPES OF EMBEDDED SYSTEMS:

Based on functionality and performance embedded systems categorized as 4 types 1. Stand alone embedded systems 2. Real time embedded systems 3. Networked information appliances 4. Mobile devices

4.2.1 Stand alone embedded systems:


As the name implies, stand alone systems work in stand alone mode. They take i/p, process them and produce the desire o/p. The i/p can be an electrical signal from transducer or temperature signal or commands from human being. The o/p can be electrical signal to drive another system an led or LCD display Ex digital camera, microwave oven, CD player, Air conditioner etc

4.2.2 Real time embedded systems:


In this type of an embedded system a specific work has to be complete in a particular period of time. Hard Real time systems: - embedded real time used in missiles Soft Real time systems: - DVD players

4.2.3 Networked information appliances:

Embedded systems that are provided

with n/w interfaces and accessed by n/w such as local area n/w or internet are called Network Information Appliances. Ex: A web camera is connected to the internet. Camera can send pictures in real time to any computers connected to the internet

4.2.4 Mobile devices:

Actually it is a combination of both VLSI and Embedded System.

Mobile devices such as Mobile phone, Personal digital assistants, smart phones etc are special category of embedded systems

4.3 PROGRAMMING LANGUAGE USED:

BASIC FORM OF ASSEMBLY LANGUAGE PROGRAM Now that the basic form of an assembly language program has been given, the next question is: how it is created, assembled and made ready to run? The steps to create an executable assembly language program are outlined as follows.

IMPLEMENTATION

FIG4.2 BASIC FORM OF ALP

First we use an editor to type in a program similar to program. Many excellent editors or word processors are available that can be used to create and/or edit the program. A widely used editor is the MS-DOS EDIT program .which comes with all Microsoft operating systems. Notice that the editor must be able to produce an ASCII file. For many assemblers, the file names follow the usual DOS conventions, but the source file has the extension "ASM "or "SRC ", depending on which assembler you are using. Check your assembler for the convention. The "asm ", extension for the source file is used by an assembler in the next step.

The "ASM "source file containing the program code is created in step 1 is fed to an 8051 assembler. The assembler converts the instructions into machine code. The assembler will produce an object file and a list file. The extension for the object file is "OBJ "by the extension for the list file is "1ST ".

Assemblers require a third step calling linking. The link program takes one or more objects files and produces an absolute object file with the extension "ABS". 8051 trainers that have a monitor program use this ABS file.

next the "ABS "file is fed into a program called "OH "(Object to Hex Converter) which creates a file with extension "HEX "that these ready to burn into ROM. This program comes with all 8051 assemblers. Recent Windows-based assemblers combine steps 2 through 4 into one step.

5.HARDWARE DESCRIPTION
5.1.SCHEMATIC BLOCK DIAGRAM:

fig:5.1.SCHEMATIC BLOCK DIAGRAM

5.2 DTMF(DUAL TONE MULTIPLE FREQUENCY): 5.2.1.Introduction:Dual-tone


multi-frequency (DTMF) signaling is used for

telecommunication signaling over analog telephone lines in the voice-frequency band between telephone handsets and other communications devices and the switching center. Telephone Keypad: The contemporary keypad is laid out in a 34grid, although the original DTMF keypad had an additional column for four now-defunct menu selector keys. When used to dial a telephone number, pressing a single key will produce a pitch consisting of two simultaneous pure tone sinusoidal frequencies. The row in which the key appears determines the low frequency, and the column determines the high frequency. For example, pressing the '1' key will result in a sound composed of both a 697 and a 1209 hertz (Hz) tone. The original keypads had levers inside, so each button activated two contacts. The multiple tones are the reason

for calling the system multifrequency. These tones are then decoded by the switching center to

determine which key was pressed.

Fig:5.2

General Description:
The HT9170B/D are Dual Tone Multi Frequency (DTMF) receivers integrated with digital decoder and band split filter functions as well as power-down mode and inhibit mode operations. Such devices use digital counting techniques to detect and decode all the 16 DTMF tone pairs into a 4-bit code output. Highly accurate switched capacitor filters are implemented to divide tone signals into low and high group signals. A built-in dial tone rejection circuit is provided to eliminate the need for pre-filtering.

DTMF (dual-tone multi-frequency) signals 1209 Hz 1336 Hz 1477 Hz 1633 Hz 2 3 A 697 Hz 1 5 6 B 770 Hz 4 8 9 C 852 Hz 7 0 # D 941 Hz *

5.2.2.HT9170D\B Features:
Operating voltage: 2.5V~5.5V Minimal external components No external filter is required Low standby current (on power down mode) Excellent performance Tristate data output for MCU interface 3.58MHz crystal or ceramic resonator 1633Hz can be inhibited by the INH pin HT9170B: 18-pin DIP package

T9170D: 18-pin SOP package

5.2.3.Pin Description:

HT9170B DIP-A
Pin Name VP VN GS VREEF X1 I/O I I O O I VREF

HT9170D SOP-A
Internal Connection Operational Amplifier Description Operational amplifier non-inverting input Operational amplifier inverting input Operational amplifier output terminal Reference voltage output, normally VDD/2 The system oscillator consists of an inverter, a bias resistor and the necessary load capacitor on chip. A standard 3.579545MHz crystal connected to X1 and X2

Oscillator

X2

terminals implements The oscillator function. PWDN I CMOS IN Pull-low INH I CMOS IN Pull-low VSS OE _ I _ CMOS IN Pull-High D0-D3 O CMOS OUT Receiving data output terminals OE=_H_: Output enable OE=_L_: High impedance Data valid output When the chip receives a valid tone (DTMF) signal, the DV goes high; otherwise it remains low. Early steering output (see Functional Description) Tone acquisition time and release time can be set through connection with external resistor and capacitor. Positive power supply, 2.5V~5.5V for normal Active high. This enables the device to go into power down mode and inhibits the oscillator. This pin input is internally pulled down. Logic high. This inhibits the detection of tones representing characters A, B, C and D. This pin input is internally pulled down. Negative power supply, D0~D3 output enable, high

DV

CMOS OUT

EST RT/GT

O I/O

CMOS OUT CMOS IN/OUT

VDD

TABLE: 5.1.PIN DESCRIPTION OF HT9170D\B

5.2.4. Circuit Diagram:

FIG: 5.3.Circuit diagram

The important components of this robot are a DTMF decoder, microcontroller and motor driver. A CM8870 series DTMF decoder is used here. All types of theCM8870 series use digital counting techniques to detect and decode all the 16 DTMF tone pairs into a 4-bit code output. The built-in dial tone rejection circuit eliminates the need of pre-filtering. When the input signals are given at pins 1(IN+)& 2(IN-) , a differential input configuration is recognized to be effective, the correct 4-bit decode signal of the DTMF tone is transferred to (pin11) through (pin14) outputs. The pin11 topin14 of DTMF decoder are connected to the pins of microcontroller (P1.4 to P1.7).The 89V51RD2 is a 8-bit 80C51, 5V low power64 kB Flash microcontroller with 1 kB RAM. it provides the following features: 64 kB of on-chip Flash program memory with ISP (InSystem Programming) and IAP (In-Application Programming), Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each),Three 16-bit timers/counters. Outputs from port pins P0.0 through P0.3 andP0.7 of the microcontroller are fed to the inputs IN1 throughIN4 and enable pins (EN1 and EN2) of motor driver L293D IC, respectively to drive two geared dc motors. Switch S1 is used for manual reset. The microcontroller output is not sufficient to drive the dc motors, so current drivers are required for motor rotation. The L293D is a quad, high-current, half-h driver designed to provide bidirectional drive currents of up to600mA at voltages from 4.5V to 36V. It makes it easier to drive the dc motors. The L293D consists of four drivers. Pins IN1through IN4 and OUT1 through OUT4 are the input and output pins, respectively of driver 1 through driver 4. Drivers 1 and 2, and driver 3 and 4 are enabled by enable pin 1(EN1) and pin 9(EN2), respectively. When enable input EN1 (pin1) is high, drivers 1 and 2 are enabled and the outputs corresponding to their inputs are active.

Similarly, enable input EN2 (pin9)enables drivers 3 and 4.The motors are rotated according to the status of IN1 to IN4 pins of L293D which in turn are depending on output pins of microcontroller, viz., P0.0 - P0.3.

5.3.MOTOR DRIVER(L293D): 5.3.1.Introduction:


L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as current amplifiers since they take a low-current control signal and provide a higher-current signal. This higher current signal is used to drive the motors. L293D contains two inbuilt H-bridge driver circuits. In its common mode of operation, two DC motors can be driven simultaneously, both in forward and reverse direction. The motor operations of two motors can be controlled by input logic at pins 2 & 7 and 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in clockwise and anticlockwise directions, respectively.Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start operating. When an enable input is high, the associated driver gets enabled. As a result, the outputs become active and work in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and their outputs are off and in the high-impedance state.

5.3.2.pindescription:

FIG:5.4
Pin No 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Function Enable pin for Motor 1; active high Input 1 for Motor 1 Output 1 for Motor 1 Ground (0V) Ground (0V) Output 2 for Motor 1 Input 2 for Motor 1 Supply voltage for Motors; 9-12V (up to 36V) Enable pin for Motor 2; active high Input 1 for Motor 1 Output 1 for Motor 1 Ground (0V) Ground (0V) Output 2 for Motor 1 Input2 for Motor 1 Supply voltage; 5V (up to 36V) Name Enable 1,2 Input 1 Output 1 Ground Ground Output 2 Input 2 Vcc 2 Enable 3,4 Input 3 Output 3 Ground Ground Output 4 Input 4 Vcc 1

TABLE: 5.2.PIN DESCRIPTION


Based on which key is pressed, the robot will be able to interpret the tone and activate relays and such to turn on motors and move about.

The 16-lane output will drive a set of trabsustirs, which will in turn drive a set of much

larger automotive relays, to switch a pair of drill motors, as well as motors that will rotate the camera-equipped head left and right.

Speed will be controlled in steps using a few high-load resistors taken from the drills. Three speed settings should be plenty.

Fig: 5.5.Robot directions

5.3.3.Circuit Description:

Fig: 5.6

5.4.DC MOTOR:
By far the vast majority of robots use electric motors, of which there are several kinds. DC motors, which are familiar to many people, spin rapidly when electric current is passed through them. They will spin backwards if the current is made to flow in the opposite direction.

Fig: 5.7 100RPM 12V DC geared motors for robotics applications. Very easy to use and available In standard size. Nut and threads on shaft to easily connect and internal threaded shaft for Easily connecting it to wheel.

5.4.1.DC motor Features:


100RPM 12V DC motors with Gearbox 3000RPM base motor 6mm shaft diameter with internal hole 125gm weight Same size motor available in various rpm

1.2kgcm torque No-load current = 60 mA(Max), Load current = 300 mA(Max)

6.REGULATED POWER SUPPLY:

6.1.INTRODUCTION:
The power supplies are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronic circuits and other devices. A RPS (Regulated Power Supply) is the Power Supply with Rectification, Filtering and Regulation being done on the AC mains to get a Regulated power supply for Microcontroller and for the other devices being interfaced to it.
A power supply can by broken down into a series of blocks, each of which performs a particular function. A d.c power supply which maintains the output voltage constant irrespective of a.c mains fluctuations or load variations is known as Regulated D.C Power Supply For example a 5V regulated power supply system as shown below:

FIGURE 6.1: CIRCUIT DIAGRAM OF POWER SUPPLY

6.1.1Transformer:

A transformer is an electrical device which is used to convert electrical power from one Electrical circuit to another without change in frequency. Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC. Step-up transformers increase in output voltage, step-down transformers decrease in output voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils; instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core. Transformers waste very little power so the

power out is (almost) equal to the power in. Note that as voltage is stepped down current is stepped up. The ratio of the number of turns on each coil, called the turns ratio, determines the

ratio of the voltages. A step-down transformer has a large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage.

FIGURE: 6.2. ELECTRICAL TRANSFORMER

6.1.2 Rectifier:
A circuit which is used to convert a.c to dc is known as RECTIFIER. The process of conversion a.c to d.c is called rectification Types of Rectifiers: Half wave Rectifier Full wave rectifier 1. Centre tap full wave rectifier. 2. Bridge type full wave rectifier.

Full-wave Rectifier:
From the above comparison we came to know that full wave bridge rectifier as more advantages than the other two rectifiers. So, in our project we are using full wave bridge rectifier circuit.

Bridge Rectifier:
A bridge rectifier makes use of four diodes in a bridge arrangement as shown in figure 2.11 to achieve full-wave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally.

FIGURE: 6.3.BRIDGE RECTIFIER CIRCUIT

Operation of bridge rectifier:


During positive half cycle of secondary, the diodes D2 and D3 are in forward biased while D1 and D4 are in reverse biased as shown in the fig 2.12. The current flow direction is shown in the fig (2.12) with dotted arrows.

FIGURE: 6.4. POSITIVE HALF CYCLE OPERATION


During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward biased while D2 and D3 are in reverse biased as shown in the fig(2.13). The current flow direction is shown in the fig (2.13) with dotted arrows.

FIGURE: 6.5NEGATIVE HALF CYCLE OPERATION 6.2.3: Filter:


A Filter is a device which removes the a.c component of rectifier output but allows the d.c component to reach the load

6.2.4: Regulator:
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output voltages. The maximum current they can pass also rates them. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection

from excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed voltage regulators ICs have 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the output pin.

FIGURE : 6.6.A THREE TERMINAL VOLTAGE REGULATOR


78XX: The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The LM78XX offer several fixed output voltages making them useful in wide range of applications. When used as a zener diode/resistor combination replacement, the LM78XX usually results in an effective output impedance improvement of two orders of magnitude, lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-263packages, Features of 78XX: Output Current of 1.5A Output Voltage Tolerance of 5% Internal thermal overload protection Internal Short-Circuit Limited Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V.

7. KEIL SOFTWARE
7.1 INTRODUCTION: KEIL SOFTWARE PROGRAMING PROCEDURE
How to write Embedded C Program in Keil Software. Procedure Steps
Step-1:

Install Keil MicroVision-2 in your PC, Then after Click on that Keil UVision-2 icon. After opening the window go to toolbar and select Project Tab then close previous project.

Step-2: Next select New Project from Project Tab.

Step-3: Then it will open Create New Project window. Select the path where you want to save

project and edit project name.

Step-4: Next it opens Select Device for Target window, It shows list of companies and here you can select the device manufacturer company.

Step-5

Step-5:

For an example, for your project purpose you can select the chip as 89C51/52 from Atmel Group. Next Click OK Button, it appears empty window here you can observe left side a small window i.e., Project Window. Next create a new file.

Step-6: From the Main tool bar Menu select File Tab and go to New, then it will open a window, there you can edit the program.

Step-7:

Here you can edit the program as which language will you prefer either Assembly or C.

Step-8: After editing the program save the file with extension as .c or .asm, if you write a program in Assembly Language save as .asm or if you write a program in C Language save as .c in the selected path. Take an example and save the file as test.c.

Step-9: Then after saving the file, compile the program. For compilation go to project window select source group and right click on that and go to Add files to Group.

Step-10: Here it will ask which file has to add. For an example here you can add test.c as you saved before.

Step-11: After adding the file, again go to Project Window and right click on your c file then select Build target for compilation. If there is any Errors or Warnings in your program you can check in Output Window that is shown bottom of the Keil window.

Step-12: Here in this step you can observe the output window for errors and warnings.

Step-13: If you make any mistake in your program you can check in this slide for which error and where the error is by clicking on that error.

Step-14: After compilation then next go to Debug Session. In Tool Bar menu go to Debug tab and select Start/Stop Debug Session.

Step-15: Here a simple program for Leds Blinking. LEDS are connected to PORT-1. You can observe the output in that port.

Step-16:To see the Ports and other Peripheral Features go to main toolbar menu and select peripherals.

Step-17: In this slide see the selected port i.e., PORT-1.

Step-18:Start to trace the program in sequence manner i.e., step by step execution and observe the output in port window.

Step-19: After completion of Debug Session Create an Hex file for Burning the Processor. Here to create a Hex file goes to project window and right click on Target next select Option for Target.

Step-20: It appears one window; here in target tab modify the crystal frequency as you connected to your microcontroller.

Step-21: Next go to Output tab. In that Output tab click on Create HEX File and then click OK.

Step-22: Finally Once again compile your program. The Created Hex File will appear in your path folder.

7.2 DEVICES SUPPORT OF KEIL SOFTWARE

Vision Simulator

The Keil Vision Debugger accurately simulates on-chip peripherals (IC, CAN, UART, SPI, Interrupts, I/O Ports, A/D Converter, D/A Converter, and PWM Modules) of your ARM device. Simulation helps you understand hardware configurations and avoids time wasted on setup problems. Additionally, with simulation, you can write and test applications before target hardware is available. 8051 Development tools Keil Software development tools for the 8051 support every level of software developer from the professional applications engineer to the student just learning about embedded software development. The industry-standard Keil tools support ALL 8051 derivatives and help you get your projects completed on schedule. Xc16x/C16x/ST10 Development tools Keil Software development tools for the C16x, ST10, and XC16x support every level of developer from the professional applications engineer to the student just learning about embedded software development. The industry-standard Keil C Compilers, Macro Assemblers, Debuggers, Real-time Kernels, and Single-board Computers support ALL C16x derivatives and help you get your projects completed on schedule. Evaluation Boards / Development kits Evaluation boards (or single-board computers) help you quickly get started with new microcontroller architecture. Keil Software supports all evaluation boards that work with the following microcontroller families: ARM MCS 251 8051 C16x/ST10

7.3 ADVANTAGE OF KEIL SOFTWARE


The Keil Embedded C++ Compiler supports the Infineon C16x/XC16x and STMicroelectronics ST10 microcontroller families. Embedded C++ is a subset of the C++ programming language that is easy for C programmers to understand and use. Embedded C++ provides upward compatibility with Standard C++ while retaining the major advantages of C++. The Embedded C++ Language satisfies the requirements of embedded software designs and avoids the overhead that is introduced with full C++ implementations (since EC++ avoids features unsuited for embedded systems).

The primary benefits of the Keil Embedded C++ Compiler are: Small language specification that retains object-oriented features. Avoids excessive memory consumption. Produces predictable run-time requirements. Generates ROMable code. Removes nonstandard extensions to C++. Language features that are not authorized by ANSI/ISO are eliminated. When starting a new project, simply select the microcontroller you use from the Device Database and the Vision IDE sets all compiler, assembler, linker, and memory options for you. Numerous example programs are included to help you get started with the most popular embedded 8051 devices. The Keil Vision Debugger accurately simulates on-chip peripherals (IC, CAN, UART, SPI, Interrupts, I/O Ports, A/D Converter, D/A Converter, and PWM Modules) of your 8051 device. Simulation helps you understand hardware configurations and avoids time wasted on setup problems. Additionally, with simulation, you can write and test applications before target hardware is available. When you are ready to begin testing your software application with target hardware, use the MON51, MON390, MONADI, or FlashMON51 Target Monitors, the ISD51 In-System Debugger, or the ULINK USB-JTAG Adapter to download and test program code on your target system.

7.4 POSSIBLE MEMORY MODELS OF KEIL SOFTWARE


The most significant impact on code size and execution speed is the selected memory model. Compiling in the small model always generates the smallest, fastest code possible. The SMALL directive instructs the compiler to use the small memory model. In this memory model, all variables are stored in the internal memory of the 8051 .Memory access to internal data memory is very fast (typically performed in 1 or 2 clock cycles), and the code generated is much smaller than that generated for the compact or large models. In small model, the variable i is maintained in internal data memory. The instructions to access i, MOV A,i and INC i, require only two bytes each of code space. In addition, each of these instructions executes in only one clock cycle.

In large model, the variable i is maintained in external data memory. To access i, the compiler must first load the data pointer and then perform an external memory access (see offset 0001h through 0004h in the above listing). These two instructions alone take 4 clock cycles. The code to increment i is found from offset 0011h to offset 0016h. This operation consumes 6 bytes of code space and takes 7 clock cycles to execute.

8.FUTURE SCOPE
1. IR Sensors: IR sensors can be used to automatically detect &avoid obstacles if the robot goes beyond line of sight. This avoids damage to the vehicle if we are maneuvering it from a distant place. 2. Password Protection: Project can be modified in order to password protect the robot so that it can be operated only if correct password is entered. Either cell phone should be password protected or necessary modification should be made in the assembly language code. This introduces conditioned access &increases security to a great extent. 3. Alarm Phone Dialer: By replacing DTMF Decoder IC CM8870 by a'DTMF Transceiver IC CM8880, DTMF tones can be generated from the robot. So, a project called 'Alarm Phone Dialer' can be built which will generate necessary alarms for something that is desired to be monitored (usually by triggering a relay). For example, a high water alarm, low temperature alarm, opening of back window, garage door, etc.When the system is activated it will call a number of programmed numbers to let the user know the alarm has been activated. This would be great to get alerts of alarm conditions from home when user is at work. 4. Adding a Camera: If the current project is interfaced with a camera (e.g. a Webcam) robot can be driven beyond line-of-sight &range becomes practically unlimited as GSM networks have a very large rang

9. CONCLUSION
Wireless-controlled robots use RF circuits, which have the drawbacks of limited working range, limited frequency range and the limited control. Use of a mobile phone for robotic control can overcome these limitations. It provides the advantage of robust control, working range as large as the coverage area of the service provider, no interference with other controllers and up to twelve controlles.

I believe this can change entire world of Robotics

10.REFERENCES
Ayala, Kenneth J. (1996), The 8051 Microcontroller- Architecture, Programming and Applications, Delmar Publishers, Inc. India Reprint Pernam. www.wikipedia.org Raj Kamal (2004), Embedded Systems - Architecture, Programming and Design, International Edition, New Delhi: McGraw-Hill. WWW.atmel.com Barr, Micheal (1999), Programming Embedded systems in C and C++, Sebastopol, C.A: O Reilly. www.8051projects.com Calcutt, M.C.F.J Cowan, and G.H. Parchizadeh (1998), 8051 Micro controllersHardware and Software Applications, Arnold (and also John Wiley). www.embedded-computing .com Mazidi, M. Ali and J. G. Mazidi (2000), the 8051 Microcontroller and Embedded Systems, Pearson Education. www.e-insite.net/edmag/

www.mcjournal.com Nagaraja, B., Rayappa,R., Mahesh, M., Patil,c., Manjunath,T.: Design & Development of a GSM Based Vehicle Theft Control System, in: 2009 International Conference on Digital Object Identifier, pp. 148-152(2009).

You might also like