ANTI THEFT ALERTING SYSTEM FOR VEHICLES (TWO WHEELER) but paralelly plan what u want to do...

dream of success and make it cum true
BY 9502601863 Siddagari Lohith: home @ 0877 2227759

B.Tejaswi R.Sachitra U.Sravani S.Praneeth

(07U51A04A1) (07U51A0490) (07U51A0498) (07U51A0499)


Bowrampet, Hyderabad -43 2009-2010





B.Tejaswi R.Sachitra U.Sravani S.Praneeth

(07U51A04A1) (07U51A0490) (07U51A0498) (07U51A0499)


Head of the Department E.C.E. Dept



If anybody tries to steal your bike, this circuit turns on the horn of the bike to alert you of the impending theft. Usually, a handle lock is used on the handle bar for the safety of bikes, with the front mudguard in a slanted position. When the handle lock is freed, the front mudguard can be aligned with the body of the bike. This circuit consists of transmitter and receiver sections. The transmitter (IR LED) is fitted on the back end of the front mudguard and the receiver sensor (IR RX) is fitted on the central portion of the crash guard of the bike such that IR rays from the transmitter directly fall on the IR receiver sensor, this will occur when the front mudguard comes in line with the body of the bike. This signal from the IR Rx will be given to microcontroller which after waiting for some time disables the engine even though the Ignition switch is ON. In this project as the engine we are demonstrating a DC motor and to indicate the status we are using a LCD.

2 : Block diagram of XXXXXXXXXXX Fig 1.2 : Block diagram of XXXXXXXXXXX 3 7 7 .B.1 : Block diagram of XXXXXXXXXXX Fig 1.Praneeth (07U51A04A1) (07U51A0490) (07U51A0498) (07U51A0499) LIST OF FIGURES NAME OF THE FIG PAGE NO Fig 1.Tejaswi R.Sachitra U.Sravani S.

LIST OF ABBREVATIONS SYMBOL ACC B PSW SP DPTR DPL DPH P0 P1 P2 P3 IP IE TMOD TCON T2CON T2MOD TH0 TL0 TH1 TL1 TH2 TL2 SCON SBUF PCON NAME Accumulator B register Program status word Stack pointer Data pointer 2 bytes Low byte High byte Port0 Port1 Port2 Port3 Interrupt priority control Interrupt enable control Timer/counter mode control Timer/counter control Timer/counter 2 control Timer/counter mode2 control Timer/counter 0high byte Timer/counter 0 low byte Timer/counter 1 high byte Timer/counter 1 low byte Timer/counter 2 high byte Timer/counter 2 low byte Serial control Serial data buffer Power control . Applications 1. XYZ ABC PQR 1.1.1 5 5 5 5 6 7 7 Appendix 1 – WWWWWWWWWWWWWWWW Appendix 2 – YYYYYYYYYYYYYYYYYYYYY Appendix 3 – XXXXXXXXXXXXXXXXXXXXX .2 abcabcabc 2.2.3 Applications 3 4 4 2.1.2 2.2 Definition 1.1 2.CONTENTS TOPIC PAGE NO 1.4 2.3 2.1 Introduction 1.2 2.1.1 Definition 1.3 defdefdef 1.4.2 rrrrrrrrrrrrrrrrrtttttttt 1.1 2.1 Introduction 1.5 merits & demerits 1 1 1 2 2 1.1.


Schematic Description 6. Future Aspects 11. software 9. Hardware Components        IR transmitter Microcontroller IR receiver Power supply Lcd Ignition switch Dc motor 7. Introduction 2. Bibliography . Block Diagram Description 4. Conclusion (or) Synopsis 10.CONTENTS 1. Circuit Description 8. Schematic 5. Block Diagram 3.

. In terms of complexity embedded systems can range from very simple with a single microcontroller chip. Personal digital assistants (PDAs) or handheld computers are generally considered embedded devices because of the nature of their hardware design. reducing the size and cost of the product.1. design engineers can optimize it. to large stationary installations like traffic lights.1 EMBEDDED SYSTEM: 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. usually with very specific requirements. This line of definition continues to blur as devices expand. peripherals and networks mounted inside a large chassis or enclosure. — the line of nomenclature blurs even more. even though they are more expandable in software terms. Physically. embedded systems ranges from portable devices such as digital watches and MP3 players. Unlike a general-purpose computer. factory controllers. to very complex with multiple units. such as a personal computer. INTRODUCTION 1. an embedded system performs one or a few predefined tasks. or the systems controlling nuclear power plants. Since the system is dedicated to specific tasks. benefiting from economies of scale. Embedded systems are often mass-produced. With the introduction of the OQO Model 2 with the Windows XP operating system and ports such as a USB port — both features usually belong to "general purpose computers".

Industrial controllers for remote machine operation.1.1. sprinklers. television sets. and security monitoring systems Handheld calculators Handheld computers Household appliances. flight control hardware/software and other integrated systems in aircraft and missiles Cellular telephones and telephone switches Engine controllers and antilock brake controllers for automobiles Home automation products.1 Examples of Embedded Systems: • • • • • • • • • • • • Avionics. air conditioners. DVD players and recorders Medical equipment Personal digital assistant Videogame consoles Computer peripherals such as routers and printers. washing machines. including microwave ovens. such as thermostats. . such as inertial guidance systems.

Block diagram: .1.1.3Software used: • • • • Keil Embedded ‘C’ Express PCB Express schematic 2.2 Hardware used: • • • • • • Microcontroller IR transmitter IR receiver LCD Motor Ignition switch 1.1.

. Microcontrollers were originally used as components in complicated process-control systems. Micro-controllers are now also being used in regulators for individual control loops.IR transmitter POWER SUPPLY LCD IR receiver Microcontroller Motor Ignition Key 2. into D. hardware components. In several areas Micro-controllers are now outperforming their analog counterparts and are cheaper as well.e.1 BLOCK DIAGRAM EXPLANATION: Power supply: In this system we are using 5V power supply for microcontroller of Transmitter section as well as receiver section. The full description of the Power supply section is given in this documentation in the following sections i.C and a step down transformer to step down the voltage. Microcontroller (8051): In this project work the micro-controller is playing a major role. However. because of their small size and low price. We use rectifiers for converting the A.C.

The control system design is also carried out up to the stage of implementation in the form of controller programs in assembly language OR in CLanguage Buzzer: Buzzer in the circuit is used for alerting the owner of byke when any one try for theft.The purpose of this project work is to present control theory that is relevant to the analysis and design of Micro-controller system with an emphasis on basic concept and ideas. it is used as a prototype for this project. Schematic: . This project makes use of Liquid Crystal Display to display / prompt for necessary information Motor It is identical to motor at engine of bike in real time . continuity of signal is established between these two. LCD Display Section: This section is basically meant to show up the status of the project. ignition key is to on or off the engine like the bike key 3. IR transmitter/IR receiver: IR transmitter and receiver are connected at mud guard and crash guard. It is assumed that a Microcontroller with reasonable software is available for computations and simulations so that many tedious details can be left to the Microcontroller.


3. Let us see the pin connections of each and every device with the microcontroller in detail. The output of this rectifier is further given to the smoother circuit which is capacitor in our project. a smoothing circuit and the RPS.1 Schematic explanation: This schematic explanation includes the detailed pin connections of every device with the microcontroller. IR transmitter/receiver: . At the primary of the transformer we are giving the 230V AC supply. In this process we are using a step down transformer. a bridge rectifier. Microcontroller: The microcontroller AT89S51 with Pull up resistors at Port0 and crystal oscillator of 11. The RPS regulates the voltage as per our requirement. The bridge rectifier converts the AC coming from the secondary of the transformer into pulsating DC. The secondary is connected to the opposite terminals of the Bridge rectifier as the input. From other set of opposite terminals we are taking the output to the rectifier. Power Supply: The main aim of this power supply is to convert the 230V AC into 5V DC in order to give supply for the TTL or CMOS devices.0592 MHz crystal in conjunction with couple of capacitors of is placed at 18 th & 19th pins of 89S51 to make it work (execute) properly. The smoothing circuit eliminates the ripples from the pulsating DC and gives the pure DC to the RPS to get a constant output DC voltage.

Receiver is photodiode. Buzzer: Buzzer is an output device. whether tried for theft or any.7 pins.2. i. it is used to display the status of the byke. which will conduct when excited with light which is connected to microcontrollers port !.0 to 0.e.IR transmitter here is IR LED which is connected to mudguard of byke. control pins are connected to port2.2. LCD: LCD is the output device. it is outside the circuit.7 pin. it will sound to alert the human. Buzzer is connected to P2.5.0 pin..6.0 pin. it is used as an indication as crossing of preset value. Data pins of LCD are connected to port0. .

1 Features: • Compatible with MCS-51® Products • 4K Bytes of In-System Programmable (ISP) Flash Memory – Endurance: 1000 Write/Erase Cycles • 4.1 MICROCONTROLLER (AT89S51): 4. high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory.2 Description: The AT89S51 is a low-power. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the . Hardware explanation 4.0V to 5.1.5V Operating Range • Fully Static Operation: 0 Hz to 33 MHz • Three-level Program Memory Lock • 128 x 8-bit Internal RAM • 32 Programmable I/O Lines • Two 16-bit Timer/Counters • Six Interrupt Sources • Full Duplex UART Serial Channel • Low-power Idle and Power-down Modes • Interrupt Recovery from Power-down Mode • Watchdog Timer • Dual Data Pointer • Power-off Flag • Fast Programming Time • Flexible ISP Programming (Byte and Page Mode) 4.4.1.

The Power-down mode saves the RAM contents but freezes the oscillator. 4. 32 I/O lines. In addition. the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. on-chip oscillator. . 128 bytes of RAM. disabling all other chip functions until the next external interrupt or hardware reset. two data pointers.standard 80C51 instruction set and pinout. two 16-bit timer/counters. a five vector two-level interrupt architecture. and clock circuitry. a full duplex serial port. The Idle Mode stops the CPU while allowing the RAM.3 The AT89S51 provides the following standard features: 4K bytes of Flash.1. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer.industry. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip. timer/counters. and interrupt system to continue functioning. serial port. the AT89S51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. Watchdog timer.


As an output port. When 1s are written to port 0 pins. The Port 1 output buffers can sink/source four TTL inputs. the pins can be used as high-impedance inputs. In this mode. Port 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups.4. Port 0: Port 0 is an 8-bit open drain bidirectional I/O port.1. Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory. each pin can sink eight TTL inputs. GND .4 Pin Description: VCC . External pull-ups are required during program verification. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. they are .Supply voltage. P0 has internal pull-ups. When 1s are written to Port 1 pins.Ground.

The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins. As inputs. Port 2 emits the contents of the P2 Special Function Register. The Port 2 output buffers cansink/source four TTL inputs. they are pulled high by the internal pull-ups and can be used as 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 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 uses strong internal pull-ups when emitting 1s.pulled high by the internal pull-ups and can be used as inputs. Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3 receives some control signals for Flash programming and verification. In this application. Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and verification. During accesses to external data memory that use 8-bit addresses (MOVX @ RI). as shown in the following table. . Port 3 also serves the functions of various special features of the AT89S51. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. As inputs. As inputs. Port 2: Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups.

With the bit set. When the AT89S51 is executing code from external program memory. In the default state of bit DISRTO. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. Otherwise. ALE/PROG Address Latch Enable (ALE): Is an output pulse for latching the low byte of the address during accesses to external memory. the RESET HIGH out feature is enabled. ALE operation can be disabled by setting bit 0 of SFR location 8EH. EA/VPP External Access Enable. except that two PSEN activations are skipped during each access to external data memory. ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. however.RST Reset input: A high on this pin for two machine cycles while the oscillator is running resets the device. If desired. PSEN is activated twice each machine cycle. This pin is also the program pulse input (PROG) during Flash programming.: 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. Note. that if lock bit 1 is programmed. This pin drives High for 98 oscillator periods after the Watchdog times out. PSEN Program Store Enable (PSEN): is the read strobe to external program memory. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. the pin is weakly pulled high. ALE is active only during a MOVX or MOVC instruction. that one ALE pulse is skipped during each access to external data memory. EA will be internally latched on . In normal operation.

. and write accesses will have an indeterminate effect.reset. Read accesses to these addresses will in general return random data. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming.5 Special Function Registers A map of the on-chip memory area called the Special Function Register (SFR) space is shown in Table 1. EA should be strapped to VCC for internal program executions. XTAL2 Output from the inverting oscillator amplifier 4. and unoccupied addresses may not be implemented on the chip. Note that not all of the addresses are occupied.1. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

4) in the PCON SFR. . The user should always initialize the DPS bit to the appropriate value before accessing the respective Data Pointer Register. Power Off Flag: The Power Off Flag (POF) is located at bit 4 (PCON. In that case. It can be set and rest under software control and is not affected by reset. Interrupt Registers: The individual interrupt enable bits are in the IE register.83H and DP1 at 84H-85H. Two priorities can be set for each of the five interrupt sources in the IP register. since they may be used in future products to invoke new features. the reset or inactive values of the new bits will always be 0. Bit DPS = 0 in SFR AUXR1 selects DP0 and DPS = 1 selects DP1. Dual Data Pointer Registers: To facilitate accessing both internal and external data memory. POF is set to “1” during power up.User software should not write 1s to these unlisted locations. two banks of 16-bit Data Pointer Registers are provided: DP0 at SFR address locations 82H.

Watchdog Timer (One-time Enabled with Reset-out) The WDT is intended as a recovery method in situations where the CPU may be subjected to software upsets.6 Memory Organization MCS-51 devices have a separate address space for Program and Data Memory. Data Memory The AT89S51 implements 128 bytes of on-chip RAM.4. a user must write 01EH and 0E1H in sequence to the WDTRST register (SFR location 0A6H). There is no way to disable the WDT except through reset (either .1. it will increment every machine cycle while the oscillator is running. so the 128 bytes of data RAM are available as stack space. The 128 bytes are accessible via direct and indirect addressing modes. On the AT89S51. Stack operations are examples of indirect addressing. When the WDT is enabled. The WDT timeout period is dependent on the external clock frequency. The WDT consists of a 14-bit counter and the Watchdog Timer Reset (WDTRST) SFR. if EA is connected to VCC. The WDT is defaulted to disable from exiting reset. all program fetches are directed to external memory. To enable the WDT. Up to 64K bytes each of external Program and Data Memory can be addressed. program fetches to addresses 0000H through FFFH are directed to internal memory and fetches to addresses 1000H through FFFFH are directed to external memory. Program Memory If the EA pin is connected to GND.

The 14-bit counter overflows when it reaches 16383 (3FFFH). which is enabled prior to entering Power-down mode. When the WDT is enabled. it will drive an output RESET HIGH pulse at the RST pin. Exiting Power-down with an interrupt is significantly different. To prevent the WDT from resetting . Before going into the IDLE mode. The RESET pulse duration is 98xTOSC. To prevent the WDT from resetting the device while the interrupt pin is held low. The WDT keeps counting during IDLE (WDIDLE bit =0) as the default state. The WDT counter cannot be read or written. When the WDT is enabled. To ensure that the WDT does not overflow within a few states of exiting Power-down. When the interrupt is brought high. the WDT is not started until the interrupt is pulled high.hardware reset or WDT overflow reset). This means the user must reset the WDT at least every 16383 machine cycles. it should be serviced in those sections of code that will periodically be executed within the time required to prevent a WDT reset. To reset the WDT the user must write 01EH and 0E1H to WDTRST. the WDIDLE bit in SFR AUXR is used to determine whether the WDT continues to count if enabled. and this will reset the device. which means the WDT also stops. it will generate an output RESET pulse at the RST pin. When WDT overflows. WDTRST is a write-only register. While in Powerdownmode. When WDT overflows. a user must write 01EH and 0E1H in sequence to the DTRST register (SFR location 0A6H). Using the WDT To enable the WDT. it is best to reset the WDT just before entering Powerdown mode. the user needs to service it by writing 01EH and 0E1H to WDTRST to avoid a WDT overflow. it will increment every machine cycle while the oscillator is running. There are two methods of exiting Power-down mode: by a hardware reset or via a level-activated external interrupt. servicing the WDT should occur as it normally does whenever the AT89S51 is reset. The interrupt is held low long enough for the oscillator to stabilize. the user does not need to service the WDT. To make the best use of the WDT. When Power-down is exited with hardware reset. WDT During Power-down and Idle In Power-down mode the oscillator stops. It is suggested that the WDT be reset during the interrupt service for the interrupt used to exit Power-down mode. the interrupt is serviced. where TOSC=1/FOSC.

the user should always set up a timer that will periodically exit IDLE. and the serial port interrupt. .6 is unimplemented. TF0 and TF1. which disables all interrupts at once. Note that Table 4 shows that bit position IE. The values are then polled by the circuitry in the next cycle. UART The UART in the AT89S51 operates the same way as the UART in the AT89C51. the WDT will stop to count in IDLE mode and resumes the count upon exit from IDLE.5 is also unimplemented. These interrupts are all shown in Figure 1. Each of these interrupt sources can be individually enabled or disabled by setting or clearing a bit in Special Function Register IE. With WDIDLE bit enabled. In the AT89S51.the AT89S51 while in IDLE mode. two timer interrupts (Timers 0 and 1). since they may be used in future AT89 products. The Timer 0 and Timer 1 flags. Timer 0 and 1 Timer 0 and Timer 1 in the AT89S51 operate the same way as Timer 0 and Timer 1 in the AT89C51. Interrupts The AT89S51 has a total of five interrupt vectors: two external interrupts (INT0 and INT1). User software should not write 1s to these bit positions. IE also contains a global disable bit. service the WDT. are set at S5P2 of the cycle in which the timers overflow. bit position IE. and reenter IDLE mode. EA.

since the input to the internal clocking circuitry is through a divide-by-two flip-flop. Either a quartz crystal or ceramic resonator may be used. . of an inverting amplifier that can be configured for use as an on-chip oscillator. There are no requirements on the duty cycle of the external clock signal. as shown in Figure 3. but minimum and maximum voltage high and low time specifications must be observed. To drive the device from an external clock source. respectively. as shown in Figure 2.Oscillator Characteristics XTAL1 and XTAL2 are the input and output. XTAL2 should be left unconnected while XTAL1 is driven.

Program Memory Lock Bits . The content of the on-chip RAM and all the special function registers remain unchanged during this mode. Exit from Powerdown mode can be initiated either by a hardware reset or by activation of an enabled external interrupt into INT0 or INT1. the instruction following the one that invokes idle mode should not write to a port pin or to external memory.Idle Mode In idle mode. Power-down Mode In the Power-down mode. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize. Note that when idle mode is terminated by a hardware reset. the oscillator is stopped. The idle mode can be terminated by any enabled interrupt or by a hardware reset. and the instruction that invokes Powerdown is the last instruction executed. up to two machine cycles before the internal reset algorithm takes control. the CPU puts itself to sleep while all the on-chip peripherals remain active. the device normally resumes program execution from where it left off. To eliminate the possibility of an unexpected write to a port pin when idle mode is terminated by a reset. The on-chip RAM and Special Function Registers retain their values until the Power-down mode is terminated. Reset redefines the SFRs but does not change the on-chip RAM. On-chip hardware inhibits access to internal RAM in this event. The mode is invoked by software. but access to the port pins is not inhibited.

Activate the correct combination of control signals.The AT89S51 has three lock bits that can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the following table. The programming interface needs a high-voltage (12-volt) program enable signal and is compatible with conventional third-party Flash or EPROM programmers. Raise EA/VPP to 12V. 5. To program the AT89S51. During a write cycle. Input the appropriate data byte on the data lines. When lock bit 1 is programmed. Programming the Flash – Parallel Mode The AT89S51 is shipped with the on-chip Flash memory array ready to be programmed. the logic level at the EA pin is sampled and latched during reset. an attempted read of the last byte written will result in the . The latched value of EA must agree with the current logic level at that pin in order for the device to function properly. Repeat steps 1 through 5. If the device is powered up without a reset. data. 4. Programming Algorithm: Before programming the AT89S51. and control signals should be set up according to the Flash programming mode table and Figures 13 and 14. Input the desired memory location on the address lines. take the following steps: 1. Data Polling: The AT89S51 features Data Polling to indicate the end of a byte write cycle. The bytewrite cycle is self-timed and typically takes no more than 50 μs. the latch initializes to a random value and holds that value until reset is activated. The AT89S51 code memory array is programmed byte-by-byte. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. 3. changing the address and data for the entire array or until the end of the object file is reached. the address. 2.

Programming the Flash – Serial Mode The Code memory array can be programmed using the serial ISP interface while RST is pulled to VCC. a serial read from any address location will return 00H at the data output. Either an external system clock can be supplied at pin XTAL1 or a crystal needs to be connected across pins XTAL1 and XTAL2. The status of the individual lock bits can be verified directly by reading them back. chip erase is self-timed and takes about 500 ms.0 is pulled high again when programming is done to indicate READY. and the next cycle may begin. a chip erase operation is initiated by using the proper combination of control signals and by pulsing ALE/PROG low for a duration of 200 ns . 100H. except that P3. true data is valid on all outputs. Program Verify: If lock bits LB1 and LB2 have not been programmed.500 ns. a Chip Erase operation is required. The values returned are as follows. After RST is set high. Reading the Signature Bytes: The signature bytes are read by the same procedure as a normal verification of locations 000H. Once the write cycle has been completed. P3.7. MOSI (input) and MISO (output).0 is pulled low after ALE goes high during programming to indicate BUSY. During chip erase. Before a reprogramming sequence can occur. the programmed code data can be read back via the address and data lines for verification. and 200H. The serial interface consists of pins SCK. P3. In the serial programming mode. The maximum serial . (000H) = 1EH indicates manufactured by Atmel (100H) = 51H indicates 89S51 (200H) = 06H Chip Erase: In the parallel programming mode.complement of the written data on P0.7 must be pulled to a logic low. a chip erase operation is initiated by issuing the Chip Erase instruction. Ready/Busy: The progress of byte programming can also be monitored by the RDY/BSY output signal.6 and P3. The Chip Erase operation turns the content of every memory location in the Code array into FFH. the Programming Enable instruction needs to be executed first before other operations can be executed. In this mode. Data Polling may begin any time after a write cycle has been initiated.

With a 33 MHz oscillator clock. Serial Programming Instruction Set The Instruction Set for Serial Programming follows a 4-byte protocol and is shown in Table 8 on page 18.5. 5. Any memory location can be verified by using the Read instruction that returns the content at the selected address at serial output MISO/P1. 3. the following sequence is recommended: 1. Set RST pin to “H”. Set RST to “L”.5 ms at 5V. the maximum SCK frequency is 2 MHz. The Code array is programmed one byte at a time in either the Byte or Page mode.6. The write cycle is self-timed and typically takes less than 0. Data Polling: The Data Polling feature is also available in the serial mode. Enable serial programming by sending the Programming Enable serial instruction to pin MOSI/P1. 2. In this mode.7 needs to be less than the CPU clock at XTAL1 Divided by 16.clock (SCK) frequency should be less than 1/16 of the crystal frequency. during a write cycle an attempted read of the last byte written will result in the complement of the MSB of the serial output byte on MISO. At the end of a programming session. apply a 3 MHz to 33 MHz clock to XTAL1 pin and wait for at least 10 milliseconds. 4. If a crystal is not connected across pins XTAL1 and XTAL2. Programming Interface – Parallel Mode . The frequency of the shift clock supplied at pin SCK/P1. Serial Programming Algorithm To program and verify the AT89S51 in the serial programming mode. Turn VCC power off. Power-off sequence (if needed): Set XTAL1 to “L” (if a crystal is not used). Power-up sequence: Apply power between VCC and GND pins. RST can be set low to commence normal device operation.

The write operation cycle is self-timed and once initiated. . Please contact your local programming vendor for the appropriate software revision. All major programming vendors offer worldwide support for the Atmel microcontroller series.Every code byte in the Flash array can be programmed by using the appropriate combination of control signals. will automatically time itself to Completion.



each byte thereafter is treated as data until all 256 bytes are shifted in/out.After Reset signal is high. Then the next instruction will be ready to be decoded. the data always starts from byte 0 to 255. SCK should be no faster than 1/16 of the system clock at XTAL1. After the command byte and upper address byte are latched. . No pulsing of Reset signal is necessary. SCK should be low for at least 64 system clocks before it goes high to clock in the enable data bytes. For Page Read/Write.

*NOTICE: Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.

4.2 Power supply
The power supplies are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. 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:

4.2.1 Transformer:
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 turn’s 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.

An Electrical Transformer

2.2. Comparison of rectifier circuits: Type of Rectifier Parameter Number of diodes 1 PIV of diodes Vm 2Vm Vm 2 4 Half wave Full wave Bridge .c is called “rectification” TYPES OF RECTIFIERS: • • Half wave Rectifier Full wave rectifier 1.2 RECTIFIER: A circuit which is used to convert a. Centre tap full wave rectifier. The process of conversion a. Bridge type full bridge rectifier.Turns ratio = Vp/ VS = Np/NS Power Out= Power In VS X IS=VP X IP Vp = primary (input) voltage Np = number of turns on primary coil Ip = primary (input) current 4.c to dc is known as RECTIFIER.c to d.

2.693 Vm/√2 0.318Vm 2Vm/ 0.636Vm 2Vm/ 0. So.812 0.406 0.812 0.1Full-wave Rectifier: From the above comparison we came to know that full wave bridge rectifier as more advantages than the other two rectifiers.636Vm 1. both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally. This is a widely used configuration. Bridge Rectifier: A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave rectification. both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally.21 f 0.812 Vm/√2 4.482 2f 0.C output voltage Vdc. This is a widely used configuration.482 2f 0.D. in our project we are using full wave bridge rectifier circuit. . A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig(a) to achieve full-wave no-load Ripple factor Ripple frequency Rectification efficiency Transformer Utilization Factor(TUF) RMS voltage Vrms Vm/ 0.287 Vm/2 0.

The current flow direction is shown in the fig (b) with dotted arrows.Fig(A) Operation: 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(b). Fig(B) 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(c). The current flow direction is shown in the fig (c) with dotted arrows.

to appears the load.c component to reach the load 4. provides an easier by –pass for the ripples voltage though it due to low impedance.1Capacitor Filter: We have seen that the ripple content in the rectified output of half wave rectifier is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages of ripples is not acceptable for most of the applications. . multiple section filter etc.c component of rectifier output but allows the d. in parallel to the load. prevents the passage of the ripple current (due to high impedance at ripple frequency) while allowing the d.2.c (due to low resistance to d.c.3. Ripples can be removed by one of the following methods of filtering. one applied on half wave rectifier and another with full wave rectifier. Two cases of capacitor filter.Fig(C) 4. (a) A capacitor. in series with the load. At ripple frequency and leave the d.3 Filter: A Filter is a device which removes the a. such as L-section filter section filter.c) (c) Various combinations of capacitor and inductor.2. which make use of both the properties mentioned in (a) and (b) above. (b) An inductor.

. Hence large value of capacitor is placed to reduce ripples and to improve the DC component. such as the 7805 +5V 1A regulator shown on the right. Many of the fixed voltage regulator ICs have 3 leads and look like power transistors. supplying current to the output when the varying DC voltage from the rectifier is falling. r = ripple factor. f = supply frequency. The LM7805 is simple to use. Filtering significantly increases the average DC voltage to almost the peak value (1. The capacitor charges quickly near the peak of the varying DC.4 × RMS value). You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin.2. The maximum current they can pass also rates them. and then discharges as it supplies current to the output. Negative voltage regulators are available.Filtering is performed by a large value electrolytic capacitor connected across the DC supply to act as a reservoir. 12 and 15V) or variable output voltages. you get a 5 volt supply from the output pin. mainly for use in dual supplies.4 Regulator: Voltage regulator ICs is available with fixed (typically 5. To calculate the value of capacitor(C). 4. Rl = load resistance Note: In our circuit we are using 1000µF. connect the negative lead to the Common pin and then when you turn on the power. C = ¼*√3*f*r*Rl Where. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection').

10V.1. TO-220 & TO-263 • Direct Replacement for LM78XX 4. 18V.3 IR transmitter: 4. 15V.0V. Features: • Output Current of 1. 24V • Offer in plastic TO-252.1 IR LED: .12V. The LM78XX is available in the TO-252.4. 8V. When used as a zener diode/resistor combination replacement.6 A Three Terminal Voltage Regulator 4.Fig 6.2. 9V. the LM78XX usually results in an effective output impedance improvement of two orders of magnitude.5A • Output Voltage Tolerance of 5% • Internal thermal overload protection • Internal Short-Circuit Limited • No External Component • Output Voltage 5.1 78XX: The Bay Linear LM78XX is integrated linear positive regulator with three terminals. lower quiescent current.3. 6V. The LM78XX offer several fixed output voltages making them useful in wide range of applications. TO-220 & TO-263packages.

night vision for camcorders. links. collision avoidance and systems. medical imaging. Infrared LEDs enhance the performance of wireless computer-to-PDA equipment. telecommunications . surveillance cameras.Here the IR transmitter is nothing but the IR LED. It just looks like a normal LED but transmits the IR signals. • Due to their resistance to ambient-light impediments and electromagnetic interference (EMI). the light output is not visible by our eyes. etc. These are infrared LEDs. invisible beam sensors. Fig 30: IR LED Advantages: • Infrared LEDs are ideal light sources for use with night vision goggles. recognition and calibration systems. automation biomedical instrumentation. Since the IR rays are out of the visible range we cannot observe the rays from the transmitter. They can be used as replacement LEDs for remote controls. equipment.

and a photocurrent is produced. Photodiodes are similar to regular semiconductor diodes except that they may be either exposed (to detect vacuum UV or X-rays) or packaged with a window or optical fibre connection to allow light to reach the sensitive part of the device. it excites an electron thereby creating a mobile electron and a positively charged electron hole. or one diffusion length away from it. which is the basis for solar cells—in fact. With an average life span of 100. The diode becomes forward biased and "dark current" begins to flow across the junction in the direction opposite to the photocurrent. a solar cell is just an array of large photodiodes. Many diodes designed for use specifically as a photodiode will also use a PIN junction rather than the typical PN junction.• Solid-state design renders Infrared LEDs impervious to electrical and mechanical shock. If the absorption occurs in the junction's depletion region.4 Photo diode: A photodiode is a type of photodetector capable of converting light into either current or voltage. Infrared LEDs operate reliably year-after-year.1 Photovoltaic mode When used in zero bias or photovoltaic mode. 4. This mode is responsible for the photovoltaic effect. these carriers are swept from the junction by the built-in field of the depletion region.000-plus hours (11 years). frequent switching and environmental extremes. When a photon of sufficient energy strikes the diode. . the flow of photocurrent out of the device is restricted and a voltage builds up. Principle of operation A photodiode is a PN junction or PIN structure. 4. Thus holes move toward the anode.4. depending upon the mode of operation. vibration. and electrons toward the cathode.

This allows each photo-generated carrier to be multiplied by avalanche breakdown.2 Photoconductive mode In this mode the diode is often (but not always) reverse biased.4. A phototransistor is in essence nothing more than a bipolar transistor that is encased in a transparent case so that light can reach the base-collector junction.4.4. (The leakage current of a good PIN diode is so low – < 1nA – that the Johnson–Nyquist noise of the load resistance in a typical circuit often dominates. Although this mode is faster. The electrons that are generated by photons in the base-collector junction are injected into the base.) 4. Phototransistors also have slower response times. resulting in internal gain within the photodiode. 4.3 Other modes of operation Avalanche photodiodes have a similar structure to regular photodiodes. which decreases the junction's capacitance resulting in faster response times. The reverse bias induces only a small amount of current (known as saturation or back current) along its direction while the photocurrent remains virtually the same. This increases the width of the depletion layer.4. the photovoltaic mode tends to exhibit less electronic noise. Note that although phototransistors have a higher responsivity for light they are unable to detect low levels of light any better than photodiodes. and this current is amplified by the transistor operation.4 Materials The material used to make a photodiode is critical to defining its properties. . which increases the effective responsivity of the device. because only photons with sufficient energy to excite electrons across the material's bandgap will produce significant photocurrents. Phototransistors also consist of a photodiode with internal gain. but they are operated with much higher reverse bias.

5 Features Critical performance parameters of a photodiode include: Responsivity: The ratio of generated photocurrent to incident light power. 4. due to the induced photocurrents. so they are placed in an opaque housing. these can still cause many ICs to malfunction due to induced photo-currents. Many components.Materials commonly used to produce photodiodes include: Material Silicon Germanium Indium gallium arsenide Lead sulfide Wavelength range (nm) 190–1100 400–1700 800–2600 <1000-3500 Because of their greater bandgap. but germanium photodiodes must be used for wavelengths longer than approximately 1 µm. . and contain P-N junctions. will not work correctly if illuminated. The responsivity may also be expressed as a quantum efficiency. typically expressed in A/W when used in photoconductive mode. especially those sensitive to small currents. silicon-based photodiodes generate less noise than germanium-based photodiodes.4. almost every active component is potentially a photodiode. In most components this is not desired. or the ratio of the number of photogenerated carriers to incident photons and thus a unitless quantity. Since transistors and ICs are made of semiconductors. Since housings are not completely opaque to X-rays or other high energy radiation.

The dark current includes photocurrent generated by background radiation and the saturation current of the semiconductor junction. Noise-equivalent power: (NEP) The minimum input optical power to generate photocurrent. Dark current must be accounted for by calibration if a photodiode is used to make an accurate optical power measurement.Dark current: The current through the photodiode in the absence of light. P-N photodiodes are used in similar applications to other photodetectors. Fig 31: Photo Diode . 1/NEP. The NEP is roughly the minimum detectable input power of a photodiode. equal to the rms noise current in a 1 hertz bandwidth. 4. and photomultiplier tubes. and it is also a source of noise when a photodiode is used in an optical communication system. when it is operated in photoconductive mode. such as photoconductors.4.6 Applications Photodiode schematic symbol. The related characteristic detectivity (D) is the inverse of NEP. charge-coupled devices. which is the minimum input power required for the receiver to achieve a specified bit error ratio. and the specific detectivity () is the detectivity normalized to the area (A) of the photodetector. these parameters contribute to the sensitivity of the optical receiver. When a photodiode is used in an optical communication system..

Instead. although in principle either could be used. photoconductors are often used rather than photodiodes. They are also used in blood gas monitors.5 Liquid Crystal Display . • They are also widely used in various medical applications. if high sensitivity is needed. • In other consumer items such as camera light meters. • • PIN diodes are much faster and more sensitive than ordinary p-n junction diodes. spectroscopy. and hence are often used for optical communications and in lighting regulation. • Photodiodes are often used for accurate measurement of light intensity in science and industry. They generally have a better. smoke detectors. intensified charge-coupled devices or • photomultiplier tubes are used for applications such as astronomy . night vision equipment and laser range finding. P-N photodiodes are not used to measure extremely low light intensities. and the receivers for remote controls in VCRs and televisions. avalanche photodiodes. clock radios (the ones that dim the display when it's dark) and street lights. such as detectors for computed tomography (coupled with scintillations) or instruments to analyze samples (immunoassay). more linear response than photoconductors.• Photodiodes are used in consumer electronics devices such as compact disc players. 4.

. The LCD s has even started replacing the cathode ray tubes (CRTs) used for the display of text and graphics. which are limited to numbers and a few characters. 2.5. having a limited amount of numeric data. Incorporation of a refreshing controller into the LCD. This is due to the following reasons: 1. and also in small TV applications. This is in contract to LED s. characters and graphics. The declining prices of LCD s. 4. calculators and measuring instruments is the simple seven-segment displays. the LED must be refreshed by the CPU to keep displaying the data.2 USES: The LCD s used exclusively in watches. 4. In the contrast.5. These have resulted in the LCD s being extensively used in telecommunications and entertainment electronics.4. there by relieving the CPU of the task of refreshing the LCD.1 Introduction to LCD: In recent years the LCD is finding widespread use replacing LED s (seven-segment LED or other multi segment LED s). The ability to display numbers. more information displaying capability and a wider temperature range. Ease of programming for characters and graphics. The recent advances in technology have resulted in better legibility. 3.

56 x 0.0 mm Active area: 56. Transflective.0mm x 36.4 LCD PIN DIAGRAM: .0 x 16.4. Positive.5.0mm x 13.3 Specifications • • • • • • • • • • • • • • • Number of Characters: 16 characters x 2 Lines Character Table: English-European (RS in Datasheet) Module dimension: 80.2mm(MAX) View area: 66.46 mm Character pitch: 3.2 x 11.5.96 x 5.55 x 5. Yellow/Green Duty: 1/16 View direction: Wide viewing angle Backlight Type: yellow/green LED RoHS Compliant: lead free Operating Temperature: -20°C to + 70°C 4.60 x 0.70 mm Character size: 2.94 mm LCD type: STN.5 mm Dot size: 0.66 mm Dot pitch: 0.

The function of each pin is given in table.5.4.5 LCD pin description The LCD discussed in this section has 14 pins. TABLE 1: Pin description for LCD: Pin 1 2 3 4 symbol Vss Vcc VEE RS I/O ---I Description Ground +5V power supply Power supply to control contrast RS=0 to select command register RS=1 to select data register R/W=0 for write R/W=1 for read Enable The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus 5 6 7 8 9 10 11 12 13 14 R/W E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 I I/O I/O I/O I/O I/O I/O I/O I/O I/O TABLE 2: LCD Command Codes Code (hex) Command to LCD Instruction Register .

cursor blinking Shift cursor position to left Shift cursor position to right Shift the entire display to the left Shift the entire display to the right Force cursor to beginning of 1st line Force cursor to beginning of 2nd line 2 lines and 5x7 matrix 4. cursor on Display on. cursor off Display off. cursor on Display on.6 LCD INTERFACING Sending commands and data to LCDs with a time delay: .1 2 4 6 5 7 8 A C E F 10 14 18 1C 80 C0 38 Clear display screen Return home Decrement cursor Increment cursor Shift display right Shift display left Display off. cursor off Display on.

Then place a high to low pulse on the E pin to enable the internal latch of the LCD. make pin RS=0. For data. 4.7 BUZZER The "Piezoelectric sound components" introduced herein operate on an innovative principle utilizing natural oscillation of piezoelectric ceramics. make RS=1.To send any command from table 2 to the LCD. These buzzers are offered .

in lightweight compact sizes from the smallest diameter of 12mm to large Piezo electric sounders. audio equipment telephones. 2 shows the oscillating system of a piezoelectric diaphragm. . OA equipment. the distortion of the piezoelectric element expands in a radial direction. the sound source of a piezoelectric sound component is a piezoelectric diaphragm. A piezoelectric ceramic plate is attached to a metal plate with adhesives. piezoelectric sound components are used in many ways such as home appliances. Today.). Applying D. receivers. FIG: Types of Buzzers 4.1 Oscillating System: Basically. voltage between electrodes of a piezoelectric diaphragm causes mechanical distortion due to the piezoelectric effect. Fig. A piezoelectric diaphragm consists of a piezoelectric ceramic plate which has electrodes on both sides and a metal plate (brass or stainless steel. beep sounds. in alarms.2 (a). speakers. transmitters. For a misshaped piezoelectric element. etc.7. for example. etc. And they are applied widely. etc.C. telephone ringers. And the piezoelectric diaphragm bends toward the direction shown in Fig.

2 (a) and Fig.The metal plate bonded to the piezoelectric element does not expand.2 (c). when the piezoelectric element shrinks.2 (b). when AC voltage is applied across electrodes. 4. producing sound waves in the air. the piezoelectric diaphragm bends in the direction shown in Fig.7.2 (b) is repeated as shown in Fig. Conversely. Thus.2DESIGN PROCEDURES: . the bending shown in Fig.

As shown in Fig. DC motors are most commonly used in variable speed and torque. most piezoelectric sound components are used in this frequency range. their values will become smaller in the order of (a). and gear motor types. In general. servo. The magnetic field is maintained using either permanent magnets or electromagnetic windings. Areas within this category include bearings and . the piezoelectric diaphragm is installed in a cavity to produce high sound pressure. (b) and (c). A motor consists of a rotor and a permanent magnetic field stator. 3. sound pressure in specific frequencies can be increased and a specific bandwidth can be provided by controlling both positions. Motion and controls cover a wide range of components that in some way are used to generate and/or control motion. including brush less. (f0) and (fcav) respectively. man's audible frequency range is about 20 Hz to 20kHz. Frequency ranges of 2kHz to 4kHz are most easily heard. the resonant frequency depends on methods used to support the piezoelectric diaphragm.8 DC Motor DC motors are configured in many types and sizes.In general. and the resonant frequency (f0) is generally selected in the same range too. Since the piezoelectric diaphragm and cavity have proper resonant frequencies. The resonant frequency (fcav) of the cavity in is obtained from Formula (1) (Helmholtz's Formula). For this reason. 4. If piezoelectric diaphragms are of the same shape.

universal. linear and rotary motion components. while like polarities (North and North. linear position sensing. orientation position sensing. In any electric motor. The internal configuration of a DC motor is designed to harness the magnetic interaction between a current-carrying conductor and an external magnetic field to generate rotational motion. linear actuators. and gear motor) and DC motors (brush less. springs. it will experience a force proportional to the current in the conductor. power transmission (mechanical). and motor contactors and starters. and to the strength of the external magnetic field. opposite (North and South) polarities attract. controls and drives. positioning stages. servo motor. limit switches. Integrated motion control. and gear motor) as well as linear. Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or winding with a "North" polarization. solenoids. servo motors. stepper and air motors. pneumatics and pneumatic components. drive components. while green represents a magnet or winding with a "South" polarization). encoders and resolves. motors (both AC and DC motors). synchronous. slides and guides. seals. clutches and brakes. As you are well aware of from playing with magnets as a kid. Fig 25: Block Diagram of the DC motor . induction. A currentcarrying conductor generates a magnetic field. when this is then placed in an external magnetic field. Motors are the devices that provide the actual speed and torque in a drive system. slip rings.bushings. This family includes AC motor types (single and multiphase motors. South and South) repel. operation is based on simple electromagnetism.

waste energy. In most common DC motors (and all that Beamers will see). The above diagram shows a common motor layout -. The rotor consists of windings (generally on a core). . stator. The rotor (together with the axle and attached commutator) rotates with respect to the stator. Yet another disadvantage of such a simple motor is that it would exhibit a high amount of torque” ripple" (the amount of torque it could produce is cyclic with the position of the rotor). and brushes. The stator is the stationary part of the motor -. though. and energize the next winding.. In real life. with a two-pole motor. both brushes touch both commutator contacts simultaneously). This would be bad for the power supply. commutator contacts.. the windings being electrically connected to the commutator.Every DC motor has six basic parts -. if the rotor is exactly at the middle of its rotation (perfectly aligned with the field magnets). You can imagine how with our example two-pole motor. the brushes move to the next commutator contacts. rotor (a. and driving it to continue rotating. and damage motor components as well. and rotor windings are such that when power is applied.a. In particular. Meanwhile. leading to a "flip" of the rotor's magnetic field. as well as two or more permanent magnet pole pieces. the external magnetic field is produced by high-strength permanent magnets1. The geometry of the brushes. commutator.e. DC motors will always have more than two poles (three is a very common number). the polarities of the energized winding and the stator magnet(s) are misaligned. and the rotor will rotate until it is almost aligned with the stator's field magnets.this includes the motor casing. this avoids "dead spots" in the commutator.axle. field magnet(s). it will get "stuck" there.k. the rotation reverses the direction of current through the rotor winding. Given our example two-pole motor. As the rotor reaches alignment. armature).with the rotor inside the stator (field) magnets. there is a moment where the commutator shorts out the power supply (i.

let's tinker with the workings of one via an interactive animation (JavaScript required): Fig 27: Block Diagram of the DC motor having Three poles You'll notice a few things from this -. As each brush transitions from one commutator contact to the next. but in the meantime you can see that this is a direct result of the coil windings' series wiring: . one coil's field will rapidly collapse. one pole is fully energized at a time (but two others are "partially" energized).namely. We'll see more about the effects of this later.Fig 26: Block Diagram of the DC motor having two poles only So since most small DC motors are of a three-pole design. as the next coil's field will rapidly charge up (this occurs within a few microsecond).

we will arrange IR transmitter at the mud guard of byke and IR receiver at crash guard. If the thief tries to open the key of byke and turn the handle. 4. it will sound the buzzer to alert the user.8. After the buzzer. In order to find the theft. And as we need supply for all these devices. continuity of signal will be disturbed and microcontroller will get low signal to it.1Circuit description: Main aim our project is to alert the owner by sounding the buzzer if any one try for theft of byke. signal transmitted by the transmitter will continuously received by the receiver. as well as requiring the destruction of a perfectly good motor. with 2 brushes and three commutator contacts. it will off the engine. connected a power supply . As transmitter and the receiver are in LOS. According to the program written. although the thief tries to start the byke.Fig 28: Internal Block Diagram of the Three pole DC motor There's probably no better way to see how an average dc motor is put together. Motor connected is just like motor inside byke engine. This is a basic 3-pole dc motor. Unfortunately this is tedious work. than by just opening one up.

Simulation: The µVision Simulator allows you to debug programs using only your PC using simulation drivers provided by Keil and various third-party developers. The keil software development tools are designed to solve the complex Problems facing embedded software developers. Single-board Computers. time Kernels. Keil development tools for the MC architecture support every level of software developer from the professional applications engineer to the student just learning about embedded software development. simply select the microcontroller you the device database and the µvision IDE sets all compiler. debuggers. Single-board computers and emulators support all microcontroller deriveatives and help you to get more projects completed on schedule. and Emulators support all 8051 derivatives and help you get your projects completed on schedule. Debuggers.The industry-standard keil C compilers. and I/O.9 KEIL SOFTWARE: Keil development tools for the 8051 Microcontroller Architecture support every level of software developer from the professional applications engineer to the student just learning about embedded software development. linker. A good simulation environment. assembler. macro assemblers. . The industry-standard Keil C Compilers. on-chip peripherals.4. does much more than simply simulate the instruction set of a microcontroller — it simulates your entire target system including interrupts.real. and memory options for you. Numerous example programs are included to help you get started with the most popular embedded avr devices. Realtime Kernels. Macro Assemblers. like µVision. startup code. This software is used for execution of microcontroller programs. external signals. When starting a new project.

A/D converter. Simulation helps you understand h/w configurations and avoids time wasted on setup problems. D/A converter and PWM (PC. SPI.Interrupts.with simulation. SOURCE CODE Click on the Keil uVision Icon on DeskTop The following fig will appear . use the MON51. or the ULINK USB-JTAG adapter to download and test program code on your target system. MONADI.I/O ports.The keil µ Vision debugger accurately simulates on-chip peripherals CAN. Additionally. the ISD51 In-System Debugger. MON390. UART. you can write and test applications before target h/w is available. When you are ready to begin testing your s/w application with target h/w. or flash MON51 target monitors. modules)of your avr device.

Click on the Project menu from the title bar Then Click on New Project Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\ .

Then Click on Save button above.e. Atmel…… Click on the + Symbol beside of Atmel . i. Select the component for u r project.

Select AT89C52 as shown below Then Click on “OK” The Following fig will appear .

Then Click either YES or NO………mostly “NO” Now your project is ready to USE Now double click on the Target1. Click on the file option from menu bar and select “new” . you would get another option “Source group 1” as shown in next page.

C” .The next screen will be as shown in next page. Now start writing program in either in “C” or “ASM” For a program written in Assembly. then save it with extension “. asm” and for “C” based program save it with extension “ . and just maximize it by double clicking on its blue boarder.

. on which by default “C” files will appear.Now right click on Source group 1 and click on “Add files to Group Source” Now you will get another window.

Any error will appear if so happen. If the file contains no error. .Now select as per your file extension given while saving the file Click only one time on option “ADD” Now Press function key F7 to compile. then press Control+F5 simultaneously.

.The new window is as follows Then Click “OK” Now Click on the Peripherals from menu bar. and check your required port as shown in fig below Drag the port a side and click in the program file.

Now keep Pressing function key “F11” slowly and observe. You are running your program successfully .

Integrating features of all the hardware components used have developed it. Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit. . Secondly.CONCLUSION The project “two wheeler theft control” has been successfully designed and tested. using highly advanced IC’s and with the help of growing technology the project has been successfully implemented. www. Programming & Applications -Kenneth J.geocities.BIBLIOGRAPHY The 8051 Micro controller and Embedded Systems -Muhammad Ali Mazidi Janice Gillispie Mazidi The 8051 Micro controller Architecture.Prasad References on the Web: www. Programming & Applications -Ramesh S.microsoftsearch.Ram Micro processor www.Gaonkar Electronic Components www.Ayala Fundamentals Of Micro processors and Micro computers -B.