Sei sulla pagina 1di 90

INTELLIGENT VEHICLE SUPERVISORY CUM ANNUNCIATOR

Krest Technologies

INDEX
CONTENTS 1. 2. 3. 4. 5. 6. 7. 8. Abbreviations Figure Locations Introduction to the project Block Diagram Block Diagram Description Schematic Schematic Description Hardware Components Micro controllers

About voice IC IR SENSORS

Start/Stop switch

Temperature Sensor LCD Display


Power Supply Smoke Fuel Ignition switch Seat belt Brake circuit

9. Circuit Description 10.Software components a. About Keil b. Embedded C 11. Source Code 12.Conclusion (or) Synopsis 13.Future Aspects

Krest Technologies

Bibliography

Abbreviations:
ACC B PSW SP DPTR DPL DPH P0 P1 P2 P3 IE IP TMOD TCON T2CON T2MOD TH0 TL0 TH1 TL1 TH2 - Accumulator - B Register - Program Status Word - Stack Pointer - Data pointer - Low byte - High byte - Port 0 - Port 1 - Port 2 - Port 3 - Interrupt Enable control - Interrupt Priority 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

Krest Technologies

TL2 RCAP2H RCAP2L SCON SBUF PCON PCB AGC LCD IR

- Timer/counter 2 low byte - T/C 2 capture register high byte - T/C 2 capture register low byte - Serial control - Serial data buffer - Power control - Printed circuit Board - Automatic Gain Control - Liquid Crystal Display - Infrared Radio Frequency

Krest Technologies

Figure Locations:
Fig 1: Block Diagram Fig 2: Schematic Diagram Fig 3: Functional block diagram of micro controller Fig 4: Oscillator and timing circuit Fig 5: Pin diagram of AT89C51 Fig 6.1 Oscillator Connections Fig 6.2 External Clock Drive Configuration Fig 7: Memory organization of RAM Fig 8: RAM Allocation in the 8051 Fig 9: 8051 Register Banks and their RAM Addresses Fig 10: DB-9 pin connector Fig 11: Interfacing of MAX-232 to controller Fig 12: The APR9600 DIP & SOP Fig 13: APR9600 Block Diagram Fig 14: Random Access Mode Fig 15: Tape Mode, Auto Rewind option Fig 16: Tape Mode, Normal option Fig 17: Schematic Symbol of Thermistor Fig 18: Thermistor characteristics Fig 19: Interfacing of LCD to a micro controller Fig 20: Functional Block Diagram of Power supply Fig 21: An Electrical Transformer Fig 22: Direction of current flow in a circuit Krest Technologies

Fig 23: A Three Terminal Voltage Regulator

ABSTRACT
Every system is automated in order to face new challenges in the present day situation. Automated systems have less manual operations, so that the flexibility, reliabilities are high and accurate. Hence every field prefers automated control systems. Especially in the field of electronics automated systems are doing better performance. The project INTELLIGENT VEHICLE SUPERVISORY/ANNOUNCIATOR deals with providing safe journey for vehicle drivers by giving necessary voice instructions. Whenever the vehicle driver forgets to taking the safety measurements during the journey, there will be a speaker which will give the voice announcement and this indication depends on the given input by the different sensors (which are placed at predefined locations in the vehicle) to controller. In this project, different sensors have been used, to indicate the level of fuel in the tank, condition of the brakes, proper closing of the doors etc. Here we are using the LCD to display the status. Remote sensor is used to operate the closing or opening of the doors. Ignition switch is used to control ON/OFF the engine. The control action is totally done by the Micro controller. This project is mainly helpful to avoid accidents from our side by knowing the status of our vehicle and maintain the conditioning of the vehicle.

Krest Technologies

Introduction

The project deals with providing safe journey for vehicle drivers by giving necessary voice instructions. Whenever the vehicle driver forgets to taking the safety measurements during the journey, there will be a speaker which will give the announcement whose indication depends on the input given by the different sensors (which are placed at predefined locations in the vehicle) to controller.

The APR9600 device offers true single-chip voice recording, non-volatile storage, and playback capability for 40 to 60 seconds. The device supports both random and sequential access of multiple messages. Sample rates are user- selectable, allowing designers to customize their design for unique quality and storage time needs. Integrated output amplifier, microphone amplifier, and AGC circuits greatly simplify system design. the device is ideal for use in portable voice recorders, toys, and many other consumer and industrial applications.

Krest Technologies

BLOCK DIAGRAM:

Power supply

LCD

Engine SENSORS

Ignition Switch

MICRO CONTROLLER

Voice IC

Krest Technologies

Block Diagram Description:


The Block diagram consists of sensors such as temperature sensor, a smoke sensor and an IR sensor. There are different switches such as Ignition switch, start/stop switch are kept in the circuitry. In addition to this we are placing one voice IC, which is used for storing the messages in an IC and also we can retrieve the voice from the IC according to the circuit operation. Here is a micro controller, which is a heart of the circuitry, which handles the total controlling action in a circuitry. Whenever if any parameter like temperature occurs in a vehicle, it detects and gives the voice instruction like temperature is high will be given to speaker and at the same time the status will be displayed on the LCD. The IR sensor is placed at the door to find the status of the door either it is opened or closed. whenever the IR sensor finds if the door is partially closed it will sends the signals to the micro controller, then voice alert like door is opened will be announced through by activating the voice IC. At the same time status also displays on the LCD. There is another sensor called fuel sensor, which detects the level of the fuel present in the tank. If it finds less, the voice alert and status should be outputted. In this project, there are different switches to perform various operations. One switch vehicle is called start/stop switch, which is used for start or stop the vehicle. There is another switch which is an Ignition switch that is used for the operation of the engine. There is one Read switch, which is placed at the seat belt to find out whether the person is wear the seat belt or not. There is a switch which is used to represent the hand

Krest Technologies

brake switch whether the hand brake is removed or not. If the hand brake is not removed the concerned voice alert should be given out. The micro controller controls the output on the basis of the input given to it. There is a voice IC that stores the different voice messages at the message pins on the voice IC. These voice alerts are stored in the IC with the help of the MIC. The voice should be retrieved through the speaker. There is a LCD display is used for displaying the status. For the circuit operation, it requires maximum 5v DC power supply.

Schematic Diagram:

Fig 2: Schematic Diagram

Schematic Description:
Voice IC connections to Micro controller: Pins (1-6), 8,9 12,13 28, 16 Connections these pins are connected to Port P1 of the micro controller These pins are grounded. these pins are connected to +5V DC supply.

Hardware connections to Micro controller: Hardware Connections Temperature sensor P3.1 Fuel Indicator P3.6 Brake Circuit P3.3 Door Sensor P3.4 Belt (Read Switch) P3.5 Start/Stop key P3.2 Ignition Switch P3.7

Krest Technologies

LCD connections to Micro controller: Pins 1 2 3 4 5 6 7.14 Connections VSS (ground) VCC (+5V) 10k pot RS, this pin is connected to P2.7 of the micro controller R/w, this pin is connected to P2.6 of the micro controller EN, this pin is connected to P2.5 of the micro controller (D0-D7) these pins are connected to the port (P0) of the micro controller

Hardware Components:

MICRO CONTROLLER (AT89S51)

Introduction
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.

Krest Technologies

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.

Figure: micro controller

Features:
Compatible

with MCS-51 Products

4K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 1000 Write/Erase Cycles 4.0V to 5.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

Krest Technologies

Low-power Idle and Power-down Modes

Description
The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory. The device is manufactured using Atmels highdensity nonvolatile memory technology and is compatible with the industry- standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.

Block diagram:

Figure: Block diagram Krest Technologies

Pin diagram:

Figure: pin diagram of micro controller

Pin Description
VCC - Supply voltage. GND - Ground. Port 0: Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance inputs. Port 0 can 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:

Krest Technologies

Port 1 is an 8-bit bidirectional 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. As inputs, Port 1 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.

Port 2: Port 2 is an 8-bit bidirectional 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. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. 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 bidirectional 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. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S51, as shown in the following table.

Krest Technologies

RST: Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled. ALE/PROG: Address Latch Enable (ALE) is an 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/6 the 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. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN: Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S51 is executing code from external program memory, PSEN is activated twice each

Krest Technologies

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. XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2: Output from the inverting oscillator amplifier. Oscillator Characteristics: XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figs 6.2.3. 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 as shown in Figure 6.2.4.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flipflop, but minimum and maximum voltage high and low time specifications must be observed.

Krest Technologies

Fig 6.2.3 Oscillator Connections

Fig 6.2.4 External Clock Drive Configuration

APR 9600 RE-Recording Voice IC


Single-chip Voice Recording & Playback Device 60- Second Duration 1 Features :
Single-chip, high-quality voice recording & playback solution - No external ICs required - Minimum external components Non-volatile Flash memory technology No battery backup required User-Selectable messaging options - Random access of multiple fixed-duration messages - Sequential access of multiple variable-duration messages User-friendly, easy-to-use operation - Programming & development systems not required - Level-activated recording & edge-activated play back switches Low power consumption - Operating current: 25 mA typical - Standby current: 1 uA typical - Automatic power-down Chip Enable pin for simple message expansion

Krest Technologies

2 General Description:
The APR9600 device offers true single-chip voice recording, non-volatile storage, and playback capability for 40 to 60 seconds. The device supports both random and sequential access of multiple messages. Sample rates are user- selectable, allowing designers to customize their design for unique quality and storage time needs. Integrated output amplifier, microphone amplifier, and AGC circuits greatly simplify system design. the device is ideal for use in portable voice recorders, toys, and many other consumer and industrial applications. APLUS integrated achieves these high levels of storage capability by using its proprietary analog/multilevel storage technology implemented in an advanced Flash nonvolatile memory process, where each memory cell can store 256 voltage levels. This technology enables the APR9600 device to reproduce voice signals in their natural form. It eliminates the need for encoding and compression, which often introduce distortion.

Fig 12: The APR9600 DIP & SOP

3 Functional Description:

Krest Technologies

APR9600 block diagram is included in order to describe the device's internal architecture. At the left hand side of the diagram are the analog inputs. A differential microphone amplifier, including integrated AGC, is included on-chip for applications requiring use. The amplified microphone signals fed into the device by connecting the ANA_OUT pin to the ANA_IN pin through an external DC blocking capacitor. Recording can be fed directly into the ANA_IN pin through a DC blocking capacitor, however, the connection between ANA_IN andANA_OUT is still required for playback. The next block encountered by the input signal is the internal anti-aliasing filter. The filter automatically adjust its response According to the sampling frequency selected so Shannons Sampling Theorem is satisfied. After anti-aliasing filtering is accomplished the signal is ready to be clocked into the memory array. This storage is accomplished through a combination of the Sample and Hold circuit and the Analog Write/Read circuit. Either the Internal Oscillator or an external clock source clocks these circuits. When playback is desired the previously stored recording is retrieved from memory, low pass filtered, and amplified as shown on the right hand side of the diagram. The signal can be heard by connecting a speaker to the SP+ and SP- pins. Chip-wide management is accomplished through the device control block shown in the upper right hand corner. Message management is provided through the message control block represented in the lower center of the block diagram. More detail on actual device application can be found in the Sample

Application section. More detail on sampling control can be found in the Sample Rate and Voice Quality section. More detail on Message management and device control can
be found in the Message Management section.

Krest Technologies

Fig 13: APR9600 Block Diagram

3.1 Message Management:


3.1.1 Message Management General Description
Playback and record operations are managed by on-chip circuitry. There are several available messaging modes depending upon desired operation. These message modes determine message management style, message length, and external parts count. Therefore, the designer must select the appropriate operating mode before beginning the design. Operating modes do not affect voice quality; for information on factors affecting quality refer to the Sampling Rate & Voice Quality section. The device supports five message management modes (defined by the MSEL1, MSEL2 and /M8_OPTION pins shown in Figures 1 and 2): Random access mode with 2, 4, or 8 fixed-duration messages Tape mode, with multiple variable-duration messages, provides two options: - Auto rewind - Normal Modes cannot be mixed. Switching of modes after the device has recorded an initial message is not recommended. If modes are switched after an initial recording has been made some unpredictable message fragments from the previous mode may remain

Krest Technologies

present, and be audible on playback, in the new mode. These fragments will disappear after a Record operation in the newly selected mode. Table 1 defines the decoding necessary to choose the desired mode. An important feature of the APR9600 Message management capabilities is the ability to audibly prompt the user to change in the device's status through the use of "beeps" superimposed on the device's output. This feature is enabled by asserting a logic high level on the BE pin.

3.1.2 Random Access Mode


Random access mode supports 2, 4, or 8 Message segments of fixed duration. As suggested recording or playback can be made randomly in any of the elected messages. The length of each message segment is the total recording length available (as defined by the selected sampling rate) divided by the total number of segments enabled (as decoded in Table1). Random access mode provides easy indexing to message segments.

3.1.2A Functional Description of Recording in Random Access Mode


On power up, the device is ready to record or playback in any of the enabled message segments. To record,/CE must be set low to enable the device and /RE must be set low to enable recording. You initiate recording by applying a low level on the message trigger pin that represents the message segment you intend to use. The message trigger pins are labeled /M1_MESSAGE - /M8_OPTION on pins 1-9 (excluding pin 7) for message segments 1-8 respectively. Note: Message trigger pins of M1_MESSAGE,/M2_NEXT, /M7_END, and /M8_OPTION, have expanded names to represent the different functionality that these pins assume in the other modes. In random access mode these pins should be considered purely message trigger pins with the same functionality as /M3, /M4, /M5, and /M6. For a more thorough explanation of the functionality of device pins in different modes please refer to the pin description table Krest Technologies

that appears later in this document. When actual recording begins the device responds with a single beep (if the BE pin is high to enable the beep tone) at the speaker outputs to indicate that it has started recording. Recording continues as long as the message pin stays low. The rising edge of the same message trigger pin during record stops the recording operation (indicated with a single beep). If the message trigger pin is held low beyond the end of the maximum allocated duration, recording stops automatically (indicated with two beeps), regardless of the state of the message trigger pin. The chip then enters low-power mode until the message trigger pin returns high. After the message trigger pin returns to high, the chip enters standby mode. Any subsequent high to low transition on the same message trigger pin will initiate recording from the beginning of the same message segment. The entire previous message is then overwritten by the new message, regardless of the duration of the new message. Transitions on any other message trigger pin or the /RE pin during the record operation are ignored until after the device enters standby mode.

3.1.2B Functional Description of Playback Random Access Mode


On power up, the device is ready to record or playback, in any of the enabled message segments. To playback,/CE must be set low to enable the device and /RE must be set high to disable recording & enable playback. You initiate playback by applying a high to low edge on the message trigger pin that represents the message segment you intend to playback. Playback will continue until the end of the message is reached. If a high to low edge occurs on the same message trigger pin during playback, playback of the current message stops immediately. If a different message trigger pin pulses during playback, playback of the current message stops immediately (indicated by one beep) and playback of the new message segment begins. A delay equal to 8,400 cycles of he sample clock will be encountered before the device starts playing the new message. If a message trigger pin is held low, the selected message is played back repeatedly as long as the trigger pin stays low. A period of silence, of a duration equal to 8,400 cycles of the sampling clock, will be inserted during looping as an indicator to the user of the transition between the end and the beginning of the message.

3.1.3 Tape Mode:

Krest Technologies

Tape mode manages messages sequentially much like traditional cassette tape recorders. Within tape mode two options exist, auto rewind and normal. Auto rewind mode configures the device to automatically rewind to the beginning of the message immediately following recording or playback of the message. In tape mode, using either option, messages must be recorded or played back sequentially, much like a traditional cassette tape recorder.
3.1.3.1A Function Description of Recording in Tape Mode using the Auto Rewind Option

On power up, the device is ready to record or playback, starting at the first address in the memory array. To record, /CE must be set low to enable the device and /RE must be set low to enable recording. A falling edge of the /M1_MESSAGE pin initiates voice recording (indicated by one beep).A subsequent rising edge of the /M1_MESSAGE pin during recording stops the recording (also indicated by one beep). If the M1_MESSAGE pin is held low beyond the end of the available memory, recording will stop automatically (indicated by two beeps). The device will then assert a logic low on the /M7_END pin until the /M1 Message pin is released. The device returns to standby mode when the /M1_MESSAGE pin goes high gain. After recording is finished the device will automatically rewind to the beginning of the most recently recorded message and wait for the next user input. The auto rewind function is convenient because it allows the user to immediately playback and review the message without the need to rewind. However, caution must be practiced because a subsequent record operation will overwrite the last recorded message unless the user remembers to pulse the /M2_Next pin in order to increment the device past the current message. A subsequent falling edge on the /M1_Message pin starts a new record operation, overwriting the previously existing message. You can preserve the previously recorded message by using the /M2_Next input to advance to the next available message segment. To perform this function, the /M2_NEXT pin must be pulled low for at least 400 cycles of the sample clock. The auto rewind mode allows the user to record over the just recorded message simply by initiating a record sequence without first toggling the /M2_NEXT pin.

Krest Technologies

To record over any other message however requires a different sequence. You must pulse the /CE pin low once to rewind the device to the beginning of the voice memory. The /M2_NEXT pin must then be pulsed low for the specified number of times to move to the start of the message you wish to overwrite. Upon arriving at the desired message a record sequence can be initiated to overwrite the previously recorded material. After you overwrite the message it becomes the last available message and all previously recorded messages following this message become inaccessible. If during a record operation all of the available memory is used, the device will stop recording automatically,(double beep) and set the /M7_END pin low for a duration equal to 1600 cycles of the sample clock. Playback can be initiated on this last message, but pulsing the /M2_Next pin will put the device into an "overflow state". Once the device enters an overflow state any subsequent pulsing of /M1_MESSAGE or /M2_NEXT will only result in a double beep and setting of the /M7_END pin low for a duration equal to 400 cycles of the sample clock. To proceed from this state the user must rewind the device to the beginning of the memory array. This can be accomplished by toggling the /CE pin low or cycling power. All inputs, except the /CE pin, are ignored during recording. 3.1.3.1B Function Description of Playback in Tape Mode using Auto Rewind Option On power-up, the device is ready to record or playback, starting at the first address in the memory array. Before you can begin playback, the /CE input must be set to low to enable the device and /RE must be set to high to disable recording and enable playback. The first high to low going pulse of the /M1_MESSAGE pin initiates playback from the beginning of the current message; on power up the first message is the current message. When the /M1_MESSAGE pin pulses low the second time, playback of the current Message stops immediately. When the /M1_MESSAGE pin pulses low a third time, playback of the current message starts again from its beginning. If you hold the /M1_MESSAGE pin low continuously the same message will play continuously in a looping fashion. A 1,540ms period of silence is inserted during looping as an indicator to the user of the transition between the beginning and end of the message. Note that in auto rewind mode the device always rewinds to the beginning of the current message. To listen to a subsequent message the device must be fast forwarded past the current

Krest Technologies

message to the next message. This function is accomplished by toggling the /M2_NEXT pin from high to low. The pulse must be low for least 400 cycles of the sampling clock. After the device is incremented to the desired message the user can initiate playback of the message with the playback sequence described above. A special case exists when the /M2_NEXT pin goes low during playback. Playback of the current message will stop, the device will beep, advance to the next message and initiate playback of the next message. (Note that if /M2 Next goes low when not in playback mode, the device will prepare to play the next message, but will not actually initiate playback). If the /CE pin goes high during playback, playback of the current message will stop, the device will beep, reset to the beginning of the first message, and wait for a subsequent playback command. When you reach the end of the memory array, any subsequent pulsing of /M1_MESSAGE or /M2_NEXT will only result in a double beep. To proceed from this state the user must rewind the device to the beginning of the memory array. This can be accomplished by toggling the /CE pin low or cycling power.

3.1.3.2A Functional Description of Recording In Tape Mode using the Normal Option On power-up, the device is ready to record or playback, starting at the first address in the memory array. Before you can begin recording, the /CE input must be set to low to enable the device and /RE must be set to low to enable recording. On a falling edge of the /M1_MESSAGE pin the device will beep once and initiate recording. A subsequent rising edge on the /M1 Message pin will stop recording and insert a single beep. If the M1_MESSAGE pin is held low beyond the end of the available memory, recording Stops automatically, and two beeps are inserted; regardless of the state of the /M1_MESSAGE pin. The device returns to the standby mode when the /M1_MESSAGE pin is returned high. A subsequent falling edge on the /M1_MESSAGE pin starts a new record operation in the memory array immediately following the last recorded message, thus preserving the last recorded message. To record over all previous messages you must pulse the /CE pin low once to reset the device to the beginning of the first message. You can then initiate a record sequence, as described above, to record a new message. The most recently recorded message will become the last recorded message and all previously

Krest Technologies

recorded messages following this message will become inaccessible. If you wish to preserve any current messages it is recommend that the Auto Rewind option be used instead of the Normal option. If the Normal option is necessary the following sequence can be used. To preserve current messages you must fast forward past the messages you want to keep before you can record a new message. To fast forward when using the Normal option you must switch to play mode and listen to messages sequentially until you arrive at the beginning of the message you wish to overwrite. At this stage you should switch back to record mode and overwrite the desired message. The most recently recorded message will become the last recorded message and all previously recorded messages following this message will become inaccessible. All inputs, except /CE, are ignored during recording. 3.1.3.2B Functional Description of Playback in Tape Mode using the Normal Option On power-up or after a low to high transition on /RE the device is ready to record or playback starting at the first address in the memory array. Before you can begin playback of messages, the /CE input must be set to low to enable the device and /RE must be set to high to enable playback. The first high to low going pulse of the /M1_MESSAGE pin initiates playback from the beginning of the current message. When the /M1_MESSAGE pin pulses from high to low a second time, playback of the current message stops immediately. When the /M1_MESSAGE pin pulses from high to low a third time, playback of the next message starts again from the beginning. If you hold the /M1_MESSAGE pin low continuously, the current message and subsequent messages play until the one of the following conditions is met: the end of the memory array is reached, the last message is reached, the /M1_message pin is released. If the last recorded message has already played, any further transitions on the /M1_MESSAGE pin will initiate a double beep for warning and the /M7_END pin will go low. To exit this state you must pulse the /CE pin high and then low once during standby to reset the pointer to the beginning of the first message.

3.2 Microprocessor Controlled Message Management:


The APR9600 device incorporates several features design help simplify microprocessor Controlled message management When controlling messages the microprocessor

Krest Technologies

essentially toggles pins as described in the message management sections described previously. The /BUSY, /STROBE, and /M7_END pins are included to simplify handshaking between the microprocessor and the APR9600. The /BUSY pin, when low, indicates to the host processor that the device is busy and that No commands can be accepted. When this pin is high the device is ready to accept and execute commands from the host. The /STROBE pin pulses low each time a memory segment is used. Counting pulses on this pin enables the host processor to accurately determine how much recording time has been used, and how much recording time remains. The APR9600 has a total of eighty memory segments. The /M7_END pin is used as an indicator that the device has stopped its current record or playback operation. During recording a low going pulse indicates that all memory has been used. During playback a low pulse indicates that the last message has played. Microprocessor control can also be used to link several APR9600 devices together in order to increase total available recording time. In this application both the speaker and microphone signals can be connected in parallel. The microprocessor will then control which device currently drives the speaker by enabling or disabling each device using its respective /CE pins. A continuous message cannot be recorded in multiple devices however because the transition from one device to the next will incur a delay that is noticeable upon playback. For this reason it is recommended that message boundaries and device boundaries always coincide.

3.3 Signal Storage:


The APR9600 samples incoming voice signals and stores the instantaneous voltage samples in non-volatile FLASH memory cells. Each memory cell can support voltage ranges from 0 to 256 levels. These 256 discrete voltage levels are the equivalent of 8-bit (28=256) binary encoded values. During playback the stored signals are retrieved from memory, smoothed to form a continuous signal, and then amplified before being fed to an external speaker.

3.4 Sampling Rate & Voice Quality:


According to Shannon's sampling theorem, the highest possible frequency component introduced to the input of a sampling system must be equal to or less than half the Krest Technologies

sampling frequency if aliasing errors are to be eliminated. The APR9600 automatically filters its input, based on the selected sampling frequency, to meet this requirement. Higher sampling rates increase the bandwidth and hence the voice quality, but they also use more memory cells for the same length of recording time. Lower sampling rates use fewer memory cells and effectively increase the duration capabilities of the device, but they also reduce incoming signal bandwidth. The APR9600 accommodates sampling rates as high as 8 kHz and as low a 4 kHz. You can control the quality/duration trade off by controlling the sampling frequency. An internal oscillator provides the APR9600 sampling clock. Changing the resistance from the OscR pin to GND. Table2 summarizes resistance values and the corresponding sampling frequencies, as can change oscillator frequency well as the resulting input bandwidth and duration.

3.5 Automatic Gain Control (AGC):


The APR9600 device has an integrated AGC. The AGC affects the microphone input but does not affect the ANA_IN input. The AGC circuit insures that the input signal is properly amplified. The AGC works by applying maximum gain to small input signals and minimum gain to large input signals. This assures that inputs of varying amplitude are recorded at the optimum signal level. The AGC amplifier is designed to have a fast attack time and a slow decay time. This timing is controlled by the RC network connected to pin 19. A value of 220K and 4.7uF has been found to work well for the English language. Be aware that different languages, speakers from different countries, and music may all require modification of the recommended values for the AGC RC network.

3.6 Sampling Application:


Krest Technologies

The following reference schematics are included as examples of how a recording system might be designed. Each reference schematic shows the device incorporated in one of its three main modes: Random Access, Tape mode Normal option, and Tape mode Auto Rewind option. Note that in several of the applications either one or all of the /BUSY, /STROBE, or /M7_END pins are connected to LEDs as indicators of device status. This is possible because all of these pins and signals were designed to have timing compatible with both microprocessor interface and manual LED indication. A bias must be applied to the electrets microphone in order to power its built-in circuitry. The ground return of this bias network is connected to the /Busy. This configuration saves power when record mode. Both pins 18 and 19, MicIn and MicRef, must be AC coupled to the microphone network in order to block the DC biasing voltage. Figure 3 shows the device configured in random access mode. The device is using eight Message segments, the maximum available, in this mode. Note that message trigger pins that are not used, for modes with less than eight segments, can be left unconnected with the exception of pin /M8_OPTION which should be pulled to VCC through a 100k resistor.

Fig 14: Random Access Mode

Krest Technologies

Fig 15: Tape Mode, Auto Rewind option

Krest Technologies

Fig 16: Tape Mode, Normal option

Krest Technologies

Krest Technologies

Krest Technologies

Krest Technologies

Start/Stop switch:
In this project, there are different switches to perform various operations. One switch vehicle is called start/stop switch, which is used for start or stop the vehicle. In this project, we are placing a press button for start and stop the vehicle. If we press the button to down, automatically the vehicle will be at ON state. If we press again, the button will be released and the vehicle will come to OFF state. TEMPERATURE SENSING CIRCUIT (temperature sensor) The methods of temperature measurement may be divided into two main classes according as the exchange of heat between the testing body and the hot system takes place by contact or by radiation across a space. In the contact methods, thermometers or thermocouples are used and they are immersed in solids or liquids. The thermodynamic equilibrium between the hot body and the testing body is established by material contact. In the non-contact methods, the thermodynamic equilibrium is established by the radiation emitted as excited atom and molecules in the hot body return to the ground state.

Thermistors
A thermistor is a temperature-sensing element composed of sintered semiconductor material which exhibits a large change in resistance proportional to a small change in temperature. Thermistors usually have negative temperature coefficients which means the resistance of the thermistor decreases as the temperature increases.

Krest Technologies

Benefits of Thermistors: Accuracy Thermistors are one of the most accurate types of temperature sensors. OMEGA thermistors have an accuracy of 0.1C or 0.2C depending on the particular thermistor model. However thermistors are fairly limited in their temperature range, working only over a nominal range of 0C to 100C. Stability Finished thermistors are chemically stable and not significantly affected by aging.

Thermistor Elements

The thermistor element is the simplest form of thermistor. Because of their compact size, thermistor elements are commonly used when space is very limited. OMEGA offers a wide variety of thermistor elements which vary

Krest Technologies

not only in form factor but also in their resistance versus temperature characteristics. Since thermistors are non-linear, the instrument used to read the temperature must linearize the reading. Thermistors are temperature sensitive resistors. All resistors vary with temperature, but thermistors are constructed of semiconductor material with a resistivity that is especially sensitive to temperature. However, unlike most other resistive devices, the resistance of a thermistor decreases with increasing temperature. That's due to the properties of the semiconductor material that the thermistor is made from. For some, that may be counterintuitive, but it is correct. Here is a graph of resistance as a function of temperature for a typical thermistor. Notice how the resistance drops from 100 k, to a very small value in a range around room temperature. Not only is the resistance change in the opposite direction from what you expect, but the magnitude of the percentage

resistance change is substantial.

Liquid crystal display


Liquid crystal displays (LCDs) have materials, which combine the properties of both liquids and crystals. Rather than having a melting point, they have a temperature range within which the molecules are almost as mobile as they would be in a liquid, but are grouped together in an ordered form similar to a crystal. An LCD consists of two glass panels, with the liquid crystal material sand witched in between them. The inner surface of the glass plates are coated with transparent electrodes which define the character, symbols or patterns to be displayed polymeric Krest Technologies

layers are present in between the electrodes and the liquid crystal, which makes the liquid crystal molecules to maintain a defined orientation angle. One each polarisers are pasted outside the two glass panels. These polarisers would rotate the light rays passing through them to a definite angle, in a particular direction. When the LCD is in the off state, light rays are rotated by the two polarisers and the liquid crystal, such that the light rays come out of the LCD without any orientation, and hence the LCD appears transparent. When sufficient voltage is applied to the electrodes, the liquid crystal molecules would be aligned in a specific direction. The light rays passing through the LCD would be rotated by the polarisers, which would result in activating/ highlighting the desired characters. The LCDs are lightweight with only a few millimeters thickness. Since the LCDs consume less power, they are compatible with low power electronic circuits, and can be powered for long durations. The LCDs dont generate light and so light is needed to read the display. By using backlighting, reading is possible in the dark. The LCDs have long life and a wide operating temperature range. Changing the display size or the layout size is relatively simple which makes the LCDs more customers friendly. The LCDs used exclusively in watches, calculators and measuring instruments are the simple seven-segment displays, having a limited amount of numeric data. The recent advances in technology have resulted in better legibility, more information displaying capability and a wider temperature range. These have resulted in the LCDs being extensively used in telecommunications and entertainment electronics. The LCDs have even started replacing the cathode ray tubes (CRTs) used for the display of text and graphics, and also in small TV applications. This section describes the operation modes of LCDs then describe how to program and interface an LCD to 8051 using Assembly and C.

Krest Technologies

LCD operation
In recent years the LCD is finding widespread use replacing LEDs(seven-segment LEDs or other multisegment LEDs).This is due to the following reasons: 1. 2. 3. The declining prices of LCDs. The ability to display numbers, characters and graphics. This is in contract to LEDs, which are limited to numbers and a few characters. Incorporation of a refreshing controller into the LCD, there by relieving the CPU of the task of refreshing the LCD. In the contrast, the LED must be refreshed by the CPU to keep displaying the data. 4. Ease of programming for characters and graphics.

LCD pin description


The LCD discussed in this section has 14 pins. The function of each pin is given in table.

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

Krest Technologies

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

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

TABLE 2: LCD Command Codes Code Command to LCD Instruction (hex)


1 2 4 6 5 7 8 A C E F 10 14 18 1C 80 C0 38

Register
Clear display screen Return home Decrement cursor Increment cursor Shift display right Shift display left Display off, cursor off Display off, cursor on Display on, cursor off Display on, cursor on Display on, 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

Krest Technologies

Uses:
The LCDs used exclusively in watches, calculators and measuring instruments are the simple seven-segment displays, having a limited amount of numeric data. The recent advances in technology have resulted in better legibility, more information displaying capability and a wider temperature range. These have resulted in the LCDs being extensively used in telecommunications and entertainment electronics. The LCDs have even started replacing the cathode ray tubes (CRTs) used for the display of text and graphics, and also in small TV applications.

LCD INTERFACING Sending commands and data to LCDs with a time delay:

Fig 19: Interfacing of LCD to a micro controller

To send any command from table 2 to the LCD, make pin RS=0. Krest Technologies

for data, make RS=1.Then send a high to-low pulse to the E pin to enable the internal latch of the LCD.

Power supply
The power supply 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:

Krest Technologies

Fig 20: Functional Block Diagram of Power supply

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 The 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. 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. is stepped up. Transformers waste very little power so the power out is (almost) equal to the power in. Note that as voltage is stepped down current 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.

Fig 21: An Electrical Transformer

Krest Technologies

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

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. Center tap full wave rectifier. 2. Bridge type full bridge rectifier. Comparison of rectifier circuits: Type of Rectifier Parameter Number of diodes 1 PIV of diodes Vm D.C output voltage Vdc, at no-load Ripple factor Ripple frequency Rectification Vm/ 0.318Vm 1.21 f 2Vm 2Vm/ 0.636Vm 0.482 2f Vm 2Vm/ 0.636Vm 0.482 2f 2 3 Half wave Full wave Bridge

Krest Technologies

efficiency Transformer Utilization Factor(TUF) RMS voltage Vrms

0.406 0.287 Vm/2

0.812 0.693 Vm/2

0.812 0.812 Vm/2

Full-wave Rectifier:
From the above comparisons 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 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. A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig(a) 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.

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

Krest Technologies

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.

Fig(C)
Fig 22: Direction of current flow in a circuit

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

Capacitor 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. Ripples can be removed by one of the following methods of filtering:

Krest Technologies

(a) A capacitor, in parallel to the load, provides an easier by pass for the ripples voltage though it due to low impedance. At ripple frequency and leave the d.c.to appears the load. (b) An inductor, in series with the load, prevents the passage of the ripple current (due to high impedance at ripple frequency) while allowing the d.c (due to low resistance to d.c) (c) various combinations of capacitor and inductor, such as L-section filter section

filter, multiple section filter etc. which make use of both the properties mentioned in (a) and (b) above. Two cases of capacitor filter, one applied on half wave rectifier and another with full wave rectifier. Filtering is performed by a large value electrolytic capacitor connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output. Filtering significantly increases the average DC voltage to almost the peak value (1.4 RMS value). To calculate the value of capacitor(C), C = *3*f*r*Rl Where, f = supply frequency, r = ripple factor, Rl = load resistance Note: In our circuit we are using 1000microfarads.

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 regulator ICs have 3 leads and look like

Krest Technologies

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.

Fig 23: 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:
Output Current of 1.5A Output Voltage Tolerance of 5% Internal thermal overload protection Internal Short-Circuit Limited No External Component

Krest Technologies

Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V Offer in plastic TO-252, TO-220 & TO-263 Direct Replacement for LM78XX

IGNITION SWITCH
The term ignition switch is often used interchangeably to refer to two very different parts: the lock cylinder into which the key is inserted, and the electronic switch that sits just behind the lock cylinder. In some cars, these two parts are combined into one unit, but in other cars they remain separate. It is advisable to check your car's shop manual before attempting to purchase an ignition switch, to ensure that you buy the correct part. In order to start a car, the engine must be turning. Therefore, in the days before ignition switches, car engines had to be turned with a crank on the front of the car in order to start them. The starter performs this same operation by turning the engine's flywheel, a large, flat disc with teeth on the outer edge. The starter has a gear that engages these teeth when it is powered, rapidly and briefly turning the flywheel, and thus the engine. The ignition switch generally has four positions: off, accessories, on, and start. Some cars have two off positions, off and lock; one turns off the car, and the other allows the key to be removed from the ignition. When the key is turned to the accessories position, certain accessories, such as the radio, are powered; however, accessories that use too much battery power, such as window motors, remain off in order to prevent the car's battery from being drained. The accessories position uses the least amount of battery power when the engine is not running, which is why drive-in movie theaters recommend that the car be left in the accessories mode during the movie. The on position turns on all of the car's systems, including systems such as the fuel pump, because this is the position the ignition switch remains in while the car's engine is running. The start position is spring loaded so that the ignition switch will not remain there when the key is released. When the key is inserted into the ignition switch lock cylinder and turned to the start position, the starter engages; when the key is released, it returns to the on position, cutting power to the starter. This is because the engine runs at speeds that the starter cannot match, meaning that the starter gear must be retracted once the engine is running on its own. Either the ignition switch or the lock cylinder may fail in a car, but both circumstances have very different symptoms. When the ignition switch fails, generally the electrical wiring or the plastic housing develops problems. The car may not turn on and/or start when this happens. Also, the spring-loaded start position could malfunction, in which case the starter will not engage unless the key is manually turned back to the on position.

Krest Technologies

When the lock cylinder malfunctions, however, the operation of the key itself will become problematic. If the tumblers become stripped, the lock cylinder may be able to turn with any key, or you may be able to remove the key when the car is on. If the tumblers begin to shift, the lock cylinder may not turn. Sometimes the key can be wiggled until the lock cylinder turns, but it is important to remember that this is only a temporary fix

DC Motor
DC motors are configured in many types and sizes, including brush less, servo, and gear motor types. A motor consists of a rotor and a permanent magnetic field stator. The magnetic field is maintained using either permanent magnets or electromagnetic windings. DC motors are most commonly used in variable speed and torque. Motion and controls cover a wide range of components that in some way are used to generate and/or control motion. Areas within this category include bearings and bushings, clutches and brakes, controls and drives, drive components, encoders and resolves, Integrated motion control, limit switches, linear actuators, linear and rotary motion components, linear position sensing, motors (both AC and DC motors), orientation position sensing, pneumatics and pneumatic components, positioning stages, slides and guides, power transmission (mechanical), seals, slip rings, solenoids, springs. Motors are the devices that provide the actual speed and torque in a drive system. This family includes AC motor types (single and multiphase motors, universal, servo motors, induction, synchronous, and gear motor) and DC motors (brush less, servo motor, and gear motor) as well as linear, stepper and air motors, and motor contactors and starters. In any electric motor, operation is based on simple electromagnetism. A current-carrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external magnetic field. As you are well aware of from playing with magnets as a kid, opposite (North and South) polarities attract, while like polarities (North and North, South and South) repel. The internal configuration of a

Krest Technologies

DC motor is designed to harness the magnetic interaction between a current-carrying conductor and an external magnetic field to generate rotational motion. Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or winding with a "North" polarization, while green represents a magnet or winding with a "South" polarization).

Fig 25: Block Diagram of the DC motor

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field magnet(s), and brushes. In most common DC motors (and all that Beamers will see), the external magnetic field is produced by high-strength permanent magnets1. The stator is the stationary part of the motor -- this includes the motor casing, as well as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotates with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout -- with the rotor inside the stator (field) magnets. The geometry of the brushes, commutator contacts, and rotor windings are such that when power is applied, 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. As the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the next winding. Given our example two-pole motor, the rotation reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field, and driving it to continue rotating.

Krest Technologies

In real life, though, DC motors will always have more than two poles (three is a very common number). In particular, this avoids "dead spots" in the commutator. You can imagine how with our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes touch both commutator contacts simultaneously). This would be bad for the power supply, waste energy, and damage motor components as well. 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).

Fig 26: Block Diagram of the DC motor having two poles only

So since most small DC motors are of a three-pole design, 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 -- namely, one pole is fully energized at a time (but two others are "partially" energized). As each brush transitions from one commutator contact to the next, one coil's field will rapidly collapse, as the next coil's field will rapidly charge up (this occurs within a few

Krest Technologies

microsecond). We'll see more about the effects of this later, but in the meantime you can see that this is a direct result of the coil windings' series wiring:

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, than by just opening one up. Unfortunately this is tedious work, as well as requiring the destruction of a perfectly good motor. This is a basic 3-pole dc motor, with 2 brushes and three commutator contacts.

Krest Technologies

SMOKE SENSOR
Smoke sensor is used to detect any leakage of smoke and any hazardous gases such that an alarm can be initiated to avoid any damages in the industries. These sensors are also used in many applications like corporate and in any office work areas these are linked to fire alarms And buzzers through the micro-controller. Smoke Detectors: There are two main types of smoke detectors: Ionization detectors and photoelectric detectors. A smoke alarm uses one or both methods, sometimes plus a heat detector, to warn of a fire. Ionization Detectors: Ionization detectors have an ionization chamber and a source of ionizing radiation. The source of ionizing radiation is a minute quantity of americium-241 (perhaps 1/5000th of a gram), which is a source of alpha particles (helium nuclei). The ionization chamber consists of two plates separated by about a centimeter. The battery applies a voltage to the plates, charging one plate positive and the other plate negative. Alpha particles constantly released by the americium knock electrons off of the atoms in the air, ionizing the oxygen and nitrogen atoms in the chamber. The positively-charged oxygen and nitrogen atoms are attracted to the negative plate and the electrons are attracted to the positive plate, generating a small, continuous electric current. When smoke enters the ionization chamber, the smoke particles attach to the ions and neutralize them, so they do not reach the plate. The drop in current between the plates triggers the alarm. Photoelectric Detectors In one type of photoelectric device, smoke can block a light beam. In this case, the reduction in light reaching a photocell sets off the alarm. In the most common type of photoelectric unit, however, light is scattered by smoke particles onto a photocell, initiating an alarm. In this type of detector there is a T-shaped chamber with a lightKrest Technologies

emitting diode (LED) that shoots a beam of light across the horizontal bar of the T. A photocell, positioned at the bottom of the vertical base of the T, generates a current when it is exposed to light. Under smoke-free conditions, the light beam crosses the top of the T in an uninterrupted straight line, not striking the photocell positioned at a right angle below the beam. When smoke is present, the light is scattered by smoke particles, and some of the light is directed down the vertical part of the T to strike the photocell. When sufficient light hits the cell, the current triggers the alarm. Which Method is better? Both ionization and photoelectric detectors are effective smoke sensors. Both types of smoke detectors must pass the same test to be certified as UL smoke detectors. Ionization detectors respond more quickly to flaming fires with smaller fire particles; photoelectric detectors respond more quickly to smoldering fires. In either type of detector, steam or high humidity can lead to condensation on the circuit board and sensor, causing the alarm to sound. Ionization detectors are less expensive than photoelectric detectors, but some users purposely disable them because they are more likely to sound an alarm from normal cooking due to their sensitivity to minute smoke particles. However, ionization detectors have a degree of built-in security not inherent to photoelectric detectors. When the battery starts to fail in an ionization detector, the ion current falls and the alarm sounds, warning that it is time to change the battery before the detector becomes ineffective. Back-up batteries may be used for photoelectric detectors.

LINEAR KEYPAD
This section basically consists of a Linear Keypad. Basically a Keypad can be classified into 2 categories. One is Linear Keypad and the other is Matrix keypad. 1. Matrix Keypad. 2. Linear Keypad.

Krest Technologies

1.

Matrix Keypad: This Keypad got keys arranged in the form of Rows and Columns. That is why the name Matrix Keypad. According to this keypad, In order to find the key being pressed the keypad need to be scanned by making rows as i/p and columns as output or vice versa. This Keypad is used in places where one needs to connect more

no. of keys with less no. of data lines. Linear Keypad: This Keypad got n no. of keys connected to n data lines of microcontroller. This Keypad is used in places where one needs to connect less no. of keys. Generally, in Linear Keypads one end of the switch is connected to Microcontroller (Configured as i/p) and other end of the switch is connected to the common ground. So whenever a key of Linear Keypad is pressed the logic on the microcontroller pin will go LOW. Here in this project, a linear keypad is used with switches connected in a serial manner. Linear keypad is used in this project because it takes less no. of port pins. Linear Keypad with 4 Keys is shown below. The

2.

Krest Technologies

IR transmitter:
IR LED:
Here the IR transmitter is nothing but the IR LED. It just looks like a normal LED but transmits the IR signals. Since the IR rays are out of the visible range we cannot observe the rays from the transmitter. These are infrared LEDs; the light output is not visible by our eyes. They can be used as replacement LEDs for remote controls, night vision for camcorders, invisible beam sensors, etc.

Krest Technologies

Fig 30: IR LED Advantages: Infrared LEDs are ideal light sources for use with night vision goggles, surveillance cameras, medical imaging, recognition and calibration systems. Due to their resistance to ambient-light impediments and electromagnetic interference (EMI), Infrared LEDs enhance the performance of wireless computer-to-PDA equipment, equipment. links, collision avoidance and systems, automation biomedical instrumentation, telecommunications

Solid-state design renders Infrared LEDs impervious to electrical and mechanical shock, vibration, frequent switching and environmental extremes. With an average life span of 100,000-plus hours (11 years), Infrared LEDs operate reliably year-after-year.

Photo diode:
A photodiode is a type of photodetector capable of converting light into either current or voltage, depending upon the mode of operation. 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. Many diodes Krest Technologies

designed for use specifically as a photodiode will also use a PIN junction rather than the typical PN junction. Principle of operation A photodiode is a PN junction or PIN structure. When a photon of sufficient energy strikes the diode, it excites an electron thereby creating a mobile electron and a positively charged electron hole. If the absorption occurs in the junction's depletion region, or one diffusion length away from it, these carriers are swept from the junction by the built-in field of the depletion region. Thus holes move toward the anode, and electrons toward the cathode, and a photocurrent is produced.

Photovoltaic mode
When used in zero bias or photovoltaic mode, the flow of photocurrent out of the device is restricted and a voltage builds up. The diode becomes forward biased and "dark current" begins to flow across the junction in the direction opposite to the photocurrent. This mode is responsible for the photovoltaic effect, which is the basis for solar cellsin fact, a solar cell is just an array of large photodiodes.

Photoconductive mode
In this mode the diode is often (but not always) reverse biased. This increases the width of the depletion layer, 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. Although this mode is faster, the photovoltaic mode tends to exhibit less electronic noise. (The leakage current of a good PIN diode is so low < 1nA that the JohnsonNyquist noise of the load resistance in a typical circuit often dominates.)

Other modes of operation


Avalanche photodiodes have a similar structure to regular photodiodes, but they are operated with much higher reverse bias. This allows each photo-generated carrier to be

Krest Technologies

multiplied by avalanche breakdown, resulting in internal gain within the photodiode, which increases the effective responsivity of the device. Phototransistors also consist of a photodiode with internal gain. 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. The electrons that are generated by photons in the base-collector junction are injected into the base, and this current is amplified by the transistor operation. Note that although phototransistors have a higher responsivity for light they are unable to detect low levels of light any better than photodiodes. Phototransistors also have slower response times. Materials The material used to make a photodiode is critical to defining its properties, because only photons with sufficient energy to excite electrons across the material's bandgap will produce significant photocurrents. Materials commonly used to produce photodiodes include:

Material Silicon Germanium Indium gallium arsenide Lead sulfide

Wavelength range (nm) 1901100 4001700 8002600 <1000-3500

Because of their greater bandgap, silicon-based photodiodes generate less noise than germanium-based photodiodes, but germanium photodiodes must be used for wavelengths longer than approximately 1 m. Since transistors and ICs are made of semiconductors, and contain P-N junctions, almost every active component is potentially a photodiode. Many components, especially Krest Technologies

those sensitive to small currents, will not work correctly if illuminated, due to the induced photocurrents. In most components this is not desired, so they are placed in an opaque housing. Since housings are not completely opaque to X-rays or other high energy radiation, these can still cause many ICs to malfunction due to induced photo-currents. Features Critical performance parameters of a photodiode include: Responsivity: The ratio of generated photocurrent to incident light power, typically expressed in A/W when used in photoconductive mode. The responsivity may also be expressed as a quantum efficiency, or the ratio of the number of photogenerated carriers to incident photons and thus a unitless quantity. Dark current: The current through the photodiode in the absence of light, when it is operated in photoconductive mode. The dark current includes photocurrent generated by background radiation and the saturation current of the semiconductor junction. Dark current must be accounted for by calibration if a photodiode is used to make an accurate optical power measurement, and it is also a source of noise when a photodiode is used in an optical communication system. Noise-equivalent power: (NEP) The minimum input optical power to generate photocurrent, equal to the rms noise current in a 1 hertz bandwidth. The related characteristic detectivity (D) is the inverse of NEP, 1/NEP; and the specific detectivity () is the detectivity normalized to the area (A) of the photodetector,. The NEP is roughly the minimum detectable input power of a photodiode. When a photodiode is used in an optical communication system, these parameters contribute to the sensitivity of the optical receiver, which is the minimum input power required for the receiver to achieve a specified bit error ratio.

Krest Technologies

Applications Photodiode schematic symbol. P-N photodiodes are used in similar applications to other photodetectors, such as photoconductors, charge-coupled devices, and photomultiplier tubes.

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

Krest Technologies

Circuit Description:
The APR9600 device offers true single-chip voice recording, non-volatile storage, and playback capability for 40 to 60 seconds. The device supports both random and sequential access of multiple messages. Sample rates are user- selectable, allowing designers to customize their design for unique quality and storage time needs. Integrated output amplifier, microphone amplifier, and AGC circuits greatly simplify system design. The device is ideal for use in portable voice recorders, toys, and many other consumer and industrial applications. In our project, the Voice IC is used for storing the voice at the message pins (m1m8) through the MIC and also used for generating the voice alert through the speaker. Whenever the bus reaches the station at the stop, the reflection sensors send the signals to the Micro controller. Then the controller gives to signals to Voice IC to produce voice for corresponding message pins. Through that message pins the voice will be outputted through the speaker. The LCD display will acts as an output source in this project that will be helpful to display the location name on this display. The RS, R/W. and EN pins are the control pins, which are used for controlling purpose. The RS pin is used to select either data mode or command mode. The R/W is used to indicate that the LCD will acts as a either read or write mode. The EN pin is used to enable the data. D0-D7 are data pins used to get the data from the micro controller. To operate the LCD display, which requires maximum of +5V DC power supply.

Krest Technologies

Whenever if any parameter like temperature or smoke occurs in a vehicle, it detects and gives the voice instruction like smoke is occurred through the speaker and at the same time the status will be displayed on the LCD. The IR sensor is placed at the door to find the status of the door either it is opened or closed. whenever the IR sensor finds if the door is partially closed it will sends the signals to the micro controller, then voice alert like door is opened will be announced through by activating the voice IC. At the same time status also displays on the LCD. There is another sensor called fuel sensor, which detects the level of the fuel present in the tank. If it finds less, the voice alert and status should be outputted. In this project, there are different switches to perform various operations. One switch vehicle is called start/stop switch, which is used for start or stop the vehicle. There is another switch, which is an Ignition switch that is used for the operation of the engine. There is one Read switch, which is placed at the seat belt to find out whether the person is wear the seat belt or not. There is a switch, which is used to represent the hand brake switch whether the hand brake is removed, or not. If the hand brake is not removed the concerned voice alert should be given out. In our project we are using AT 89C51 Micro controller. This micro controller controls the output on the basis of the input given to it. There is a voice IC that stores the different voice messages at the message pins on the voice IC. These voice alerts are stored in the IC with the help of the MIC. The voice should be retrieved through the speaker. There is a LCD display is used for displaying the status. For the circuit operation, it requires maximum 5v DC power supply.

Krest Technologies

The power supply is used drive all the hardware components, which are work at the maximum voltage of +5V DC. The 230V AC is a power supply, which is used for, operate our general home appliance. But our hardware components which requires just +5V DC voltage. A step-down transformer is used to step down the 230V AC to the required AC voltage and thereafter it is meant for filtering with the help of a capacitor. Thereby, the circuit is meant for the regulation to get the constant +5V DC. This output +5V DC power supply is getting at the load ie., may be a capacitor for rectification purpose, ie., any AC ripples should be minimized with the help of this capacitor at the load.

Krest Technologies

Software Used Introduction to Embedded C: Data Types:


U people have already come across the word Data types in C- Language. Here also the functionality and the meaning of the word is same except a small change in the prefix of their labels. Now we will discuss some of the widely used data types for embedded C- programming.

Data Types unsigned char signed char unsigned int signed int sbit bit sfr

Size in Bits 8-bit 8-bit 16-bit 16-bit 1-bit 1-bit 8-bit

Data Range/Usage 0-255 -128 to +127 0 to 65535 -32,768 to +32,767 SFR bit addressable only RAM bit addressable only RAM only addresses 80-FFH

Unsigned char:
The unsigned char is an 8-bit data type that takes a value in the range of 0-255(00FFH). It is used in many situations, such as setting a counter value, where there is no need for signed data we should use the unsigned char instead of the signed char.

Krest Technologies

Remember that C compilers use the signed char as the default if we do not put the key word.

Signed char:
The signed char is an 8-bit data type that uses the most significant bit (D7 of D7D0) to represent the or + values. As a result, we have only 7 bits for the magnitude of the signed number, giving us values from -128 to +127. In situations where + and are needed to represent a given quantity such as temperature, the use of the signed char data type is a must.

Unsigned int:
The unsigned int is a 16-bit data type that takes a value in the range of 0 to 65535 (0000-FFFFH).It is also used to set counter values of more than 256. We must use the int data type unless we have to. Since registers and memory are in 8-bit chunks, the misuse of int variables will result in a larger hex file. To overcome this we can use the unsigned char in place of unsigned int.

Signed int:
Signed int is a 16-bit data type that uses the most significant bit (D15 of D15-D0) to represent the or + value. As a result we have only 15 bits for the magnitude of the number or values from -32,768 to +32,767.

Sbit (single bit):


The sbit data type is widely used and designed specifically to access single bit addressable registers. It allows access to the single bits of the SFR registers.

(II)

I/O PROGRAMMING IN EMBEDDED C:

Krest Technologies

In this topic we look at C- programming of the I/O ports and also both byte and bit I/O programming.

Byte size I/O As we know that ports P0-P3 are byte accessible, we use the P0-P3 labels as defined in the header file. Bit addressable I/O programming The I/O ports of P0-P3 are bit- addressable, so we can access a single bit without disturbing the rest of the port. We use the sbit data type to access a single bit of P0-P3.the format is Px^y where x is the port and y is the bit. Accessing SFR addresses 80-FFH Another way to access the SFR RAM space 80-FFH is to use the sfr data type. This is shown in the below example .Both the bit and byte addresses for the P0-P3 ports are given in the table. Notice in the given example that there is no #include<reg51.h> statement which allows us to access any byte of the SFR RAM space 80-FFH. Single Bit Addresses of Ports P0 P0.0 P0.1 P0.2 P0.3 P0.4 Addr 80H 81H 82H 83H 84H P1 P1.0 P1.1 P1.2 P1.3 P1.4 Addr 90H 91H 92H 93H 94H P2 P2.0 P2.1 P2.2 P2.3 P2.4 Addr A0H A1H A2H A3H A4H P3 P3.0 P3.1 P3.2 P3.3 P3.4 Addr B0H B1H B2H B3H B4H Ports Bit D0 D1 D2 D3 D4

Krest Technologies

P0.5 P0.6 P0.7

85H 86H 87H

P1.5 P1.6 P1.7

95H 96H 97H

P2.5 P2.6 P2.7

A5H A6H A7H

P3.5 P3.6 P3.7

B5H B6H B7H

D5 D6 D7

(III) DATA CONVERTION PROGRAMS IN EMBEDDED C


Many micro-controllers have a real time clock (RTC) where the time and date are kept even when the power is off. These time and date are often in packed BCD by RTC. To display them they must be converted to ASCII. So, in this topic we are showing application of logic and instructions in the conversion of BCD and ASCII. ASCII numbers On ASCII key boards, when the key 0 is activated, 0110000 (30h) is provided to the system. Similarly 31h (0110001) is provided for the key 1, and so on as shown in the table Packed BCD to ASCII conversion The RTC provides the time of day (hour, minutes, seconds) and the date (year, month, day) continuously, regardless of whether the power is ON or OFF. In the conversion procedure the packed BCD is first converted to unpacked BCD. Then it is tagged with 0110000 (30h). ASCII code for Digits 0-9 Key 0 1 2 3 4 ASCII (hex) 30 31 32 33 34 Binary 011 0000 011 0001 011 0010 011 0011 011 0100 BCD (unpacked) 0000 0000 0000 0001 0000 0010 0000 0011 0000 0100

Krest Technologies

5 6 7 8 9

35 36 37 38 39

011 0101 011 0110 011 0111 011 1000 011 1001

0000 0101 0000 0110 0000 0111 0000 1000 0000 1001

ASCII to packed BCD conversion To convert ASCII to packed BCD it is first converted to unpacked and then combined to make packed BCD. For example 4 and 7 on the keyboard give 34h and 37h respectively the goal is to produce 47h or 0100 0111 which is packed BCD. Key 4 7 ASCII 34 37 unpacked BCD 00000100 00000111 01000111 or 47h packed BCD

Checksum byte in ROM To ensure the integrity of ROM contents, every system must perform the checksum calculation. The process of checksum will detect any corruption of the contents of ROM. One of the cause of the ROM corruption is current surge either when the system is turned on or during operation. To ensure data integrity in ROM the checksum process uses, what is a checksum byte. There is an extra byte that is tagged to the end of the series of data. To calculate the checksum byte of a series of bytes of data, the following steps can be used 1) Add the bytes together and drop the carries. 2) Take the 2s complement of the total sum. This is the checksum byte , which becomes the last byte of the series

Binary (hex) to decimal and ASCII conversion in embedded C

Krest Technologies

In C-language we use a function call printf which is standard IO library function doing the conversions of data from binary to decimal, or vice versa. But here we are using our own functions for conversions because it occupies much of memory. One of the most commonly used is binary to decimal conversion. In devices such as ADC chips the data is provided to the controller in binary. In order to display binary data we need to convert it to decimal and then to ASCII. Since the hexadecimal format is a convenient way of representing binary data we refer to binary data as hex. The binary data 00-FFH converted to decimal will give us 000 to 255. One way to do this is to divide it by 10 and keep the remainder, for example 11111101 or FDH is 253 in decimal. The following is one version of the algorithm for conversion of hex (binary) to decimal. Quotient FD/0A 19/0A 19 2 Remainder 3(low digit) LSD 5(middle digit) 2(high digit) (MSD)

Krest Technologies

ABOUT SOFTWARE Softwares used are: *Keil software for c programming *Express PCB for lay out design *Express SCH for schematic design What's New in Vision3? Vision3 adds many new features to the Editor like Text Templates, Quick Function Navigation, and Syntax Coloring with brace high lighting Configuration Wizard for dialog based startup and debugger setup. Vision3 is fully compatible to Vision2 and can be used in parallel with Vision2. What is Vision3? Vision3 is an IDE (Integrated Development Environment) that helps you write, compile, and debug embedded programs. It encapsulates the following components: A project manager. A make facility. Tool configuration. Editor. A powerful debugger.

To help you get started, several example programs (located in the \C51\Examples, \C251\Examples, \C166\Examples, and \ARM\...\Examples) are provided. HELLO is a simple program that prints the string "Hello World" using the Serial Interface. MEASURE is a data acquisition system for analog and digital systems. TRAFFIC is a traffic light controller with the RTX Tiny operating system. SIEVE is the SIEVE Benchmark. DHRY is the Dhrystone Benchmark.

Krest Technologies

WHETS is the Single-Precision Whetstone Benchmark.

Additional example programs not listed here are provided for each device architecture. Building an Application in Vision2 To build (compile, assemble, and link) an application in Vision2, you must: 1. Select Project -(forexample,166\EXAMPLES\HELLO\HELLO.UV2). 2. Select Project - Rebuild all target files or Build target. Vision2 compiles, assembles, and links the files in your project.

Creating Your Own Application in Vision2 To create a new project in Vision2, you must: 1. Select Project - New Project. 2. Select a directory and enter the name of the project file. 3. Select Project - Select Device and select an 8051, 251, or C16x/ST10 device from the Device Database. 4. Create source files to add to the project. 5. Select Project - Targets, Groups, Files. Add/Files, select Source Group1, and add the source files to the project. 6. Select Project - Options and set the tool options. Note when you select the target device from the Device Database all special options are set automatically. You typically only need to configure the memory map of your target hardware. Default memory model settings are optimal for most applications. 7. Select Project - Rebuild all target files or Build target. Debugging an Application in Vision2 To debug an application created using Vision2, you must: 1. Select Debug - Start/Stop Debug Session. 2. Use the Step toolbar buttons to single-step through your program. You may enter G, main in the Output Window to execute to the main C function. 3. Open the Serial Window using the Serial #1 button on the toolbar. Debug your program using standard options like Step, Go, Break, and so on. Starting Vision2 and Creating a Project Krest Technologies

Vision2 is a standard Windows application and started by clicking on the program icon. To create a new project file select from the Vision2 menu. Project New Project. This opens a standard Windows dialog that asks you for the new project file name. We suggest that you use a separate folder for each project. You can simply use the icon Create New Folder in this dialog to get a new empty folder. Then select this folder and enter the file name for the new project, i.e. Project1. Vision2 creates a new project file with the name PROJECT1.UV2 which contains a default target and file group name. You can see these names in the Project. Window Files. Now use from the menu Project Select Device for Target and select a CPU for your project. The Select Device dialog box shows the Vision2 device database. Just select the micro controller you use. We are using for our examples the Philips 80C51RD+ CPU. This selection sets necessary tool options for the 80C51RD+ device and simplifies in this way the tool Configuration. Building Projects and Creating a HEX Files Typical, the tool settings under Options Target are all you need to start a new application. You may translate all source files and line the application with a click on the Build Target toolbar icon. When you build an application with syntax errors, Vision2 will display errors and warning messages in the Output Window Build page. A double click on a message line opens the source file on the correct location in a Vision2 editor window. Once you have successfully generated your application you can start debugging. After you have tested your application, it is required to create an Intel HEX file to download the software into an EPROM programmer or simulator. Vision2 creates HEX files with each build process when Create HEX files under Options for Target Output is enabled. You may start your PROM programming utility after the make process when you specify the program under the option Run User Program #1. CPU Simulation

Krest Technologies

Vision2 simulates up to 16 Mbytes of memory from which areas can be mapped for read, write, or code execution access. The Vision2 simulator traps and reports illegal memory accesses. In addition to memory mapping, the simulator also provides support for the integrated peripherals of the various 8051 derivatives. The on-chip peripherals of the CPU you have selected are configured from the Device. Database selection you have made when you create your project target. Refer to page 58 for more Information about selecting a device. You may select and display the on-chip peripheral components using the Debug menu. You can also change the aspects of each peripheral using the controls in the dialog boxes. Start Debugging You start the debug mode of Vision2 with the Debug Start/Stop Debug Session command. Depending on the Options for Target Debug Configuration, Vision2 will load the application program and run the startup code Vision2 saves the editor screen layout and restores the screen layout of the last debug session. If the program execution stops, Vision2 opens an editor window with the source text or shows CPU instructions in the disassembly window. The next executable statement is marked with a yellow arrow. During debugging, most editor features are still available. For example, you can use the find command or correct program errors. Program source text of your application is shown in the same windows. The Vision2 debug mode differs from the edit mode in the following aspects: _ The Debug Menu and Debug Commands described on page 28 are Available. The additional debug windows are discussed in the following. _ The project structure or tool parameters cannot be modified. All build Commands are disabled. Disassembly Window The Disassembly window shows your target program as mixed source and assembly program or just assembly code. A trace history of previously executed instructions may

Krest Technologies

be displayed with Debug View Trace Records. To enable the trace history, set Debug Enable/Disable Trace Recording. If you select the Disassembly Window as the active window all program step commands work on CPU instruction level rather than program source lines. You can select a text line and set or modify code breakpoints using toolbar buttons or the context menu commands. You may use the dialog Debug Inline Assembly to modify the CPU instructions. That allows you to correct mistakes or to make temporary changes to the target program you are debugging.

Steps for executing the Keil programs: 1. 2.


Click on the Keil uVision Icon on Desktop The following fig will appear

3. 4.

Click on the Project menu from the title bar Then Click on New Project

Krest Technologies

5.

Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\

6. 7. 8.

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

Krest Technologies

9.

Select AT89C51 as shown below

10. 11.

Then Click on OK The Following fig will appear

Krest Technologies

12. 13. 14.

Then Click either YES or NOmostly NO Now your project is ready to USE Now double click on the Target1, you would get another option Source group 1 as shown in next page.

15.

Click on the file option from menu bar and select new

Krest Technologies

16.

The next screen will be as shown in next page, and just maximize it by double clicking on its blue boarder.

17. 18.

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 .C

Krest Technologies

19.

Now right click on Source group 1 and click on Add files to Group Source

20.

Now you will get another window, on which by default C files will appear.

Krest Technologies

21. 22. 23.

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. Any error will appear if so happen.

24.

If the file contains no error, then press Control+F5 simultaneously.

Krest Technologies

25.

The new window is as follows

26. 27.

Then Click OK Now Click on the Peripherals from menu bar, and check your required port as shown in fig below

28.

Drag the port a side and click in the program file.

Krest Technologies

29. 30.

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

Krest Technologies

Source Code

Krest Technologies

Conclusion
The project INTELLIGENT VEHICLE SUPERVISORY CUM ANNUNICATOR has been successfully designed and tested. It has been developed by integrating features of all the hardware components used. Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit. Secondly, using highly advanced ICs and with the help of growing technology the project has been successfully implemented.

Krest Technologies

Future Aspects
This project is further enhanced with by placing some security modules to this project and also provide with wireless technology to give the information if any one wants to theft the vehicle.

Krest Technologies

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

Krest Technologies

Krest Technologies

Potrebbero piacerti anche