Sei sulla pagina 1di 36

1.

INTRODUCTION

This is the project which helps blind people in doing their day-to-day works
without any help from others. In this project we are using ultra sonic sensor and micro controller and we will implement it by proper programming it using the language called embedded C.

BLOCK DIAGRAM:

POWER SUPPLY

Ultrasonic Sensor

MICRO
CONTROLLER

Crystal Oscillator

Buzzer

fig 1.1 block diagram

Dept of ECE, CMRIT, Medchal

Page 1

Explanation: Power supply terminal provides the DC power input to the system where as it takes high power AC as input. Micro controller is the heart of this application controls the total operations of the application according to the program coded into it. Ultrasonic sensor is the transceivers which transmits sound waves and also receives the reflected sound waves and gives the information to micro controller. A soon as the micro controller receives the information from the ultra sonic sensor it will ring the buzzer and intimates that there is an obstacle in front of it. Crystal oscillator provides the clock signals for micro controller With the help of this hardware setup we can also implement various other applications such as distance measurements and we can also use this for security purpose also. In this application ultra sonic sensor based blind people navigator we are just detecting that if there us any obstacle in front of the blind people or not and if there is any obstacle the sensor will detect it and gives the information to the microcontroller and that will give the buzzer sound

Dept of ECE, CMRIT, Medchal

Page 2

2. PROJECT DESCRIPTION
Ultrasonic sensors (also known as tranceivers when they both send and receive) work on a principle similar to radar or sonar which evaluate attributes of a target by interpreting the echoes from radio or sound waves respectively.

Ultrasonic sensors generate high frequency sound waves and evaluate the echo which is received back by the sensor. Sensors calculate the time interval between sending the signal and receiving the echo to determine the distance to an object.

Systems typically use a transducer which generates sound waves in the ultrasonic range, above 20,000 hertz, by turning electrical energy into sound, then upon receiving the echo turn the sound waves into electrical energy which can be measured and displayed.

Whenever there is any obstacle in front of sensor then the sound rays reflect back after hitting obstacle and these rays are received by the receiver of the ultrasonic sensor it will give the information to the micro controller and the micro controller will ON the buzzer and the buzzer will start ringing and it will intimate the blind person that there is an obstacle in front of him. With the observations from ultrasonic sensor, we can also be calculate the distance between the target and the point of incidence.

In contrast, a microcontroller not only accepts the data as inputs but also manipulates it, interfaces the data with various devices, controls the data and thus finally gives the result. This project uses regulated 5V, 500mA power supply. 7805 three

Dept of ECE, CMRIT, Medchal

Page 3

terminal voltage regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output of secondary of 230/12V step down transformer.

This power supply section is required to convert AC signal to DC signal and also to reduce the amplitude of the signal. The available voltage signal from the mains is 230V/50Hz which is an AC voltage, but the required is DC voltage (no frequency) with the amplitude of +5V and +12V for various applications. The word "buzzer" comes from the rasping noise that buzzers made when they were electromechanical devices, operated from stepped-down AC line voltage at 50 or 60 cycles. Other sounds commonly used to indicate that a button has been pressed are a ring or a beep. Here the system is capable of Identifying persons with in predefined area by using ultrasonic sensors and sends the alerting to authorized. Microcontroller is the heart of our system, which controls the overall operation of our system. After finding object automatically it will alert by buzzers.

Dept of ECE, CMRIT, Medchal

Page 4

3. POWER SUPPLY DESIGN


POWER SUPPLY:
The input to the circuit is applied from the regulated power supply. The a.c. input i.e., 230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to remove any a.c components present even after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc voltage.

Dept of ECE, CMRIT, Medchal

Page 5

3.1 Transformer: Usually, DC voltages are required to operate various electronic equipment and these voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input available at the mains supply i.e., 230V is to be brought down to the required voltage level. This is done by a transformer. Thus, a step down transformer is employed to decrease the voltage to a required level.

3.2 Rectifier: The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is used because of its merits like good stability and full wave rectification.

Fig 3.1 : Bridge Rectifier

Dept of ECE, CMRIT, Medchal

Page 6

The Bridge rectifier is a circuit, which converts an ac voltage to dc voltage using both half cycles of the input ac voltage. The Bridge rectifier circuit is shown in the figure. The circuit has four diodes connected to form a bridge. The ac input voltage is applied to the diagonally opposite ends of the bridge. The load resistance is connected between the other two ends of the bridge. For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with the load resistance RL and hence the load current flows through RL. For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load resistance RL and hence the current flows through RL in the same direction as in the previous half cycle. Thus a bi-directional wave is converted into a unidirectional wave.

Dept of ECE, CMRIT, Medchal

Page 7

Fig 3.2 : WAVE FORMS OF BRIDGE RECTIFIER

Dept of ECE, CMRIT, Medchal

Page 8

3.3 Filter: Capacitive filter is used in this project. It removes the ripples from the output of rectifier and smoothens the D.C. Output received from this filter is constant until the

mains voltage and load is maintained constant. However, if either of the two is varied, D.C. voltage received at this point changes. Therefore a regulator is applied at the output stage.

Fig 3.3 : Capacitive Filter

3.4 Voltage regulator: As the name itself implies, it regulates the input applied to it. A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. In this project, power supply of 5V and 12V are required. In order to obtain these voltage levels, 7805 and 7812 voltage regulators are to be used. The first number 78 represents positive supply and the numbers 05, 12 represent the required output voltage levels. The L78xx series of three-terminal positive regulators is available in TO-220, TO-220FP, TO-

Dept of ECE, CMRIT, Medchal

Page 9

3, D2PAK and DPAK packages and several fixed output voltages, making it useful in a wide range of applications. These regulators can provide local on-card regulation, eliminating the distribution problems associated with single point regulation.

Fig 9.4.1 : Voltage Regulator

Each type employs internal current limiting, thermal shut-down and safe area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1 A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltage and currents.

Dept of ECE, CMRIT, Medchal

Page 10

4. HARDWARE DESCRIPTION
Introduction: In this chapter all the Hardware components used in the project are explained. Following are the components

Crystal oscillator Ultrasonic sensor Buzzer

4.1: CRYSTAL OSCILLATOR:


XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can be configured for use as an on-chip oscillator, as shown in Figure 1. 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 2.

Fig 4.1: Oscillator Connections

Dept of ECE, CMRIT, Medchal

Page 11

4.2: ULTRASONIC SENSOR:


The ultrasonic sensor works by transmitting an ultrasonic (well above human hearing range) burst and providing an output pulse that corresponds to the time required for the burst echo to return to the sensor. By measuring the echo pulse width, the distance to target can easily be calculated.

fig 4.2: ultrasonic sensor

4.2.1: Features: Range: 2 cm to 3 m (0.8 in to 3.3 yd). Burst indicator LED shows sensor activity. Bidirectional TTL pulse interface on a single I/O pin can communicate with 5 V TTL or 3.3 V CMOS microcontrollers. Input trigger: positive TTL pulse, 2 s min, 5 s typ.

Dept of ECE, CMRIT, Medchal

Page 12

Echo pulse: positive TTL pulse, 115 s minimum to 18.5 ms maximum. ROHS Compliant

4.2.2: Key Specifications: Supply current: 30 mA typ; 35 mA max. supply voltage +5V Communication: Positive TTL pulse. Package: 3-pin SIP, 0.1 spacing (ground, power, signal). Operating temperature: 0 70 C. Size: 22 mm H x 46 mm W x 16 mm D (0.84 in x 1.8 in x 0.6 in). Weight: 9 g (0.32 oz)

Pin Definitions:

Table: 4.1 pin definitions The sensor has a male 3-pin header used to supply ground, power (+5 VDC) and signal. The header may be plugged into a directly into solder less breadboard.

Dept of ECE, CMRIT, Medchal

Page 13

3.5.3 : Communication Protocol: The sensor detects objects by emitting a short ultrasonic burst and then listening for the echo. Under control of a host microcontroller (trigger pulse), the sensor emits a short 40 kHz (ultrasonic) burst. This burst travels through the air, hits an object and then bounces back to the sensor. The sensor provides an output pulse to the host that will terminate when the echo is detected; hence the width of this pulse corresponds to the distance to the target.

Fig: 3.5.2 wave forms

Dept of ECE, CMRIT, Medchal

Page 14

Table: 3.5.2 Communication protocals

3.5.4 : Practical Considerations for Use: Object Positioning: The PING(ultrasonic) sensor cannot accurately measure the distance to an object that: Is more than 3 meters away, That has its reflective surface at a shallow angle so that sound will not be reflected back towards the sensor, or is too small to reflect enough sound back to the sensor. In addition, if PING sensor is mounted low on your device, you may detect sound reflecting off of the floor.

fig 3.5.3: ultrasonic sensor practical considerations

Dept of ECE, CMRIT, Medchal

Page 15

Target Object Material: In addition, objects that absorb sound or have a soft or irregular surface, such as a stuffed animal, may not reflect enough sound to be detected accurately. The sensor will detect the surface of water, however it is not rated for outdoor use or continual use in a wet environment. Condensation on its transducers may affect performance and lifespan of the device.

Air Temperature:

Temperature has an effect on the speed of sound in air that is measurable by the PING sensor. If the temperature (C) is known, the formula is: Cair = 331.5+ (0.6 TC ) m/s

Dept of ECE, CMRIT, Medchal

Page 16

5. MICRO CONTROLLER

5.1 Micro-processor

and Microcontroller:

The CPU is a unit that centrally fetches and processes a set of general purpose instructions. The CPU instruction set includes instructions for data transfer operations, ALU operations, stack operations, I/P &O/P operations and program control sequencing and supervising operations. Any CPU must process the following basic functionality units: 1. A control unit to fetch and control the sequential processing of given commands or instruction and for communicating with the rest of the system. 2. An ALU for the arithmetic and logic operations on the bytes or words. It may be capable of processing 8,16,32or 64-bit words at an instant. 3. A microprocessor is a single VLSI chip that has a chip and may also have some other units that are additionally present and that result in faster processing of instructions.

Dept of ECE, CMRIT, Medchal

Page 17

A microcontroller is a single chip VLSI unit (also called microcomputer) which though having limited computational capabilities posses an enhanced I/P, O/P capabilities and a number of on-chip functional units micro-controllers are particularly suited for use in embedded systems for real time applications with on-chip program memory and devices. 5.2. Difference between 8051 and 8052: The 8052 microcontroller is the 8051's "big brother." It is a slightly more powerful microcontroller, sporting a number of additional features which the developer may make use of: 256 bytes of Internal RAM (compared to 128 in the standard 8051). A third 16-bit timer, capable of a number of new operation modes and 16-bit reloads. Additional SFRs to support the functionality offered by the third timer.

5.3 AT89S52:
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller. The important features of AT89S52 microcontroller are given below. In addition, the AT89S52 is

designed with static logic for operation down to zero frequency and supports two software selectable power saving modes.

The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset.

Dept of ECE, CMRIT, Medchal

Page 18

Features: Compatible with MCS-51 Products 8K 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 256K Internal RAM 32 Programmable I/O Lines 3 16-bit Timer/Counters Eight Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Watchdog Timer dual data pointer

5.4 ARCHITECTURE OF MICROCONTROLLER AT89S52: The AT89S52 is a low-power, high-performance CMOS 8-bit micro controller with 8Kbytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 micro controller.

Dept of ECE, CMRIT, Medchal

Page 19

fig 5.1: AT89S52 architecture

Dept of ECE, CMRIT, Medchal

Page 20

4.5 DESCRIPTION OF MICRO CONTROLLER AT89S52: The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for perationdown to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next interrupt.

fig 5.2: pin diagram of AT89S52 Dept of ECE, CMRIT, Medchal Page 21

PIN DESCRIPTION OF MICROCONTROLLER 89S52: VCC: Supply voltage. GND: Ground. Port 0: Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1sare 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:Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 Output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives the low-order address bytes during Flash programming and verification.

table 5.1: port1 pin description Dept of ECE, CMRIT, Medchal Page 22

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

table 5.2: port3 pin description Dept of ECE, CMRIT, Medchal Page 23

RST: Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. 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 of1/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 micro controller is in external execution mode. PSEN: Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP: External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. A should be strapped to VCC for internal program executions. This pin also receives the 12-voltProgramming enables voltage (VPP) during Flash programming. Dept of ECE, CMRIT, Medchal Page 24

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

5.6: Special Function Register (SFR) Memory: Special Function Registers (SFR s) are areas of memory that control specific functionality of the 8051 processor. For example, four SFRs permit access to the 8051s 32 input/output lines. Another SFR allows the user to set the serial baud rate, control and access timers, and configure the 8051s interrupt system.

The Program Counter And Stack Pointer: The program counter (PC) is a 2-byte address, which tells the 8051 where the next instruction to execute is found in memory. The stack pointer like all registers except DPTR and PC may hold an 8-bit (1-Byte) value.

The Accumulator: The Accumulator, as its name suggests is used as a general register to accumulate the results of a large number of instructions. It can hold 8-bit (1-byte) value and is the most versatile register. Timer 2 Registers: Control and status bits are contained in registers T2CON and T2MOD for

Timer 2 . The register pair (RCAP2H , RCAP2L) are the Capture / Reload registers for Timer 2 in 16-bit capture mode or 16-bit auto-reload mode .

Dept of ECE, CMRIT, Medchal

Page 25

Interrupt Registers: The individual interrupt enable bits are in the IE registe . Two priorities can be set for each of the six interrupt sources in the IP register.

table 5.3: interrupt vector table 5.7 TIMERS Timer 2: Timer 2 is a 16-bit Timer / Counter that can operate as either a timer or an event counter. The type of operation is selected by bit C/T2 in the SFR T2CON. Timer 2 has three operating Modes : capture, auto-reload ( up or down Counting ) , and baud rate generator. The modes are selected by bits in T2CON. Timer 2 consists of two 8-bit registers, TH2 and

TL2. In the Timer function, the TL2 register is incremented every machine cycle. Since, a machine cycle consists of 12 oscillator periods; the count rate is 1/12 of the oscillator frequency. Dept of ECE, CMRIT, Medchal Page 26

In the Counter function, the register is incremented in response to a 1-to-0 transition at its corresponding external input pin, T2. When the samples show a high in one cycle and a low in the next cycle, the count is incremented. Since two machine cycles (24 Oscillator periods ) are required to recognize 1-to-0 transition , the maximum count rate is 1 / 24 of the oscillator frequency. To ensure that a given level is sampled at least once before it changes , the level should be held for at least one full machine cycle .

Capture Mode: In the capture mode , two options are selected by bit EXEN2 in T2CON . If EXEN2 = 0, Timer 2 is a 16-bit timer or counter which upon overflow sets bit TF2 in T2CON . This bit can then be used to generate an interrupt. If EXEN2 = 1, Timer 2 performs the same operation , but a 1-to-0 transition at external input T2EX also causes the current value respectively Auto-reload (Up or Down Counter): Timer 2 can be programmed to count up or down when configured in its 16-bit auto-reload mode. This feature is invoked by the DCEN(Down Counter Enable) bit located in the SFR T2MOD. Upon reset , the DCEN bit is set to 0 so that timer 2 will default to count up. When DCEN is set , Timer 2 can count up or down , depending on the value of the T2EX pin . In this mode , two options are selected by bit EXEN2 in in TH2 and TL2 to be captured into RCAP2H and RCAP2L ,

T2CON . If EXEN2 = 0 , Timer 2 counts up to 0FFFFH and then sets the TF2 bit upon overflow . If EXEN2 = 1 , a 16-bit reload can be triggered either by an overflow or by a 1-to-0 transition at external input T2EX.

Dept of ECE, CMRIT, Medchal

Page 27

Baud Rate Generator: Timer 2 is selected as the baud rate generator by setting TCLK and/or RCLK in T2CON . Note that the baud rates for transmit and receive can be different if Timer 2 is used for the receiver or transmitter and Timer 1 is used for the other function .The baud rates in Modes 1 and 3 aredetermined by Timer 2s overflow rate according to the following equation. Modes 1 and 3 Baud Rates =(Timer 2 Overflow Rate)/16 The timer operation is different for Timer 2 when it is used as a baud rate generator .Normally ,as a timer , it increments every machine cycle (at 1/12 the oscillator frequency).As a baud rate generator , however, it increments every state time ( at 1/2 the oscillator frequency ) .

Timer 0: Timer 0 functions as either a timer or event counter in four modes of operation . Timer 0 is controlled by the four lower bits of the TMOD register and bits 0, 1, 4 and 5 of the TCON register

Mode 0 ( 13-bit Timer) Mode 0 configures timer 0 as a 13-bit timer which is set up as an

8-bit timer (TH0 register) with a modulo 32 prescaler implemented with the lower five bits of the TL0 register . The upper three bits of TL0 register are indeterminate and should be ignored . Prescaler overflow increments the TH0 register.

Mode 1 ( 16-bit Timer ) Dept of ECE, CMRIT, Medchal Page 28

Mode 1 is the same as Mode 0, except that the Timer register is being run with all 16 bits . Mode 1 configures timer 0 as a 16-bit timer with the TH0 and TL0 registers connected in cascade . The selected input increments the TL0 register .

Mode 2 (8-bit Timer with Auto-Reload) Mode 2 configures timer 0 as an 8-bit timer ( TL0 register ) that automatically reloads from the TH0 register . TL0 overflow sets TF0 flag in the TCON register and reloads TL0 with the contents of TH0 , which is preset by software .

Mode 3 ( Two 8-bit Timers ) Mode 3 configures timer 0 so that registers TL0 and TH0 operate as separate 8bit timers. This mode is provided for applications requiring an additional 8-bit timer or counter . Timer 1: Timer 1 is identical to timer 0 , except for mode 3 , which is a hold-count mode. Mode 3 ( Halt ): Placing Timer 1 in mode 3 causes it to halt and hold its count . This can be used to halt Timer 1 when TR1 run control bit is not available i.e. , when Timer 0 is in mode 3.

Dept of ECE, CMRIT, Medchal

Page 29

TCON REGISTER: Timer/counter Control Register

table 5.4: TCON register

Dept of ECE, CMRIT, Medchal

Page 30

TMOD REGISTER: Timer/Counter 0 and 1 Modes

table 5.5: TMOD register The R registers: The R registers are a set of eight registers that are named R0, R1. Etc up to R7. These registers are used as auxiliary registers in many operations. The B registers: The B register is very similar to the accumulator in the sense that it may hold an 8-bit (1-byte) value. Two only uses the B register 8051 instructions: MUL AB and DIV AB.

Dept of ECE, CMRIT, Medchal

Page 31

The Data Pointer: The Data pointer (DPTR) is the 8051s only user accessible 16-bit (2Bytes) register. The accumulator, R registers are all 1-Byte values. DPTR, as the name suggests, is used to point to data. It is used by a number of commands, which allow the 8051 to access external memory. 4.8 ADDRESSING MODES: An addressing mode refers that you are addressing a given memory location. In summary, the addressing modes are as follows, with an example of each: Each of these addressing modes provides important flexibility. Immediate Addressing Direct Addressing Indirect Addressing Indexed Addressing a. External Direct b. Code In direct Immediate Addressing: Immediate addressing is so named because the value to be stored in memory immediately follows the operation code in memory. That is to say, the instruction itself dictates what value will be stored in memory. For example, the instruction: MOV A, #20H This instruction uses immediate Addressing because the accumulator will be loaded with the value that immediately follows in this case 20(hexadecimal). Immediate addressing is very MOVX A, @DPTR MOVC A, @A+DPTR MOV A, #20 H MOV A, 30 H MOV A, @R0

Dept of ECE, CMRIT, Medchal

Page 32

fast since the value to be loaded is included in the instruction. However, since the value to be loaded is fixed at compile-time it is not very flexible. Direct Addressing: Direct addressing is so named because the value to be stored in memory is obtained by directly retrieving it from another memory location. For example: MOV A, 30h This instruction will read the data out of internal RAM address 30(hexadecimal) and store it in the Accumulator. Direct addressing is generally fast since, although the value to be loaded isnt included in the instruction, it is quickly accessible since it is stored in the 8051s internal RAM. Also it is important to note that when using direct addressing any instruction that refers to an address between 00h and 7Fh is referring to the SFR control registers that control the 8051 micro controller itself. Indirect Addressing: Indirect addressing is a very powerful addressing mode, which in many cases provides an exceptional level of flexibility. Indirect addressing is also the only way to access the extra 128 bytes of internal RAM found on the 8052. Indirect addressing appears as follows: MOV A, @R0

Dept of ECE, CMRIT, Medchal

Page 33

6. SOFTWARE TOOLS

KEIL SOFTWARE: Keil compiler is a software used where the machine language code is written and compiled. After compilation, the machine source code is converted into hex code which is to be dumped into the microcontroller for further processing. Keil compiler also supports C language code.

PROLOAD:
Proload is a software which accepts only hex files. Once the machine code is converted into hex code, that hex code has to be dumped into the microcontroller placed in the programmer kit and this is done by the Proload.

The present project is implemented on Keil uVision. In order to program the device, proload tool has been used to burn the program onto the microcontroller.

Dept of ECE, CMRIT, Medchal

Page 34

7. APPLICATIONS

1. 2.

It can be used for the detection of any objects in specified region It can be used for the measurement of distance of the target body in military applications

3.

It can be used for security purpose in vehicles

8. CONCLUSION

Our project provides better navigation to the blind people by detecting the presence of obstacles on their way and makes their work easier. This can be used for security purposes also by modifying a little bit. This project reduces the strain of blind people . Implementation can be done within no time as the circuit can be built very easily and is smaller in size as well as flexible.

Our project provides flexibility and cost effective solution to the visually impaired at the same time this can be used for security purposes also.

Dept of ECE, CMRIT, Medchal

Page 35

9. REFERENCES

TEXT BOOKS REFERED: 1. The 8051 Microcontroller and Embedded Systems by Muhammad Ali Mazidi and Janice Gillispie Mazidi, Pearson Education.

2. 8051 Microcontroller Architecture, programming and application by KENNETH JAYALA

3.

ATMEL 89s52 Data sheets

4. Hand book for Digital ICs from Analogic Devices

WEBSITES VIEWED:

www.atmel.com www.beyondlogic.org www.dallassemiconductors.com www.maxim-ic.com www.alldatasheets.com www.howstuffworks.com

Dept of ECE, CMRIT, Medchal

Page 36

Potrebbero piacerti anche