You are on page 1of 31

DEPARTMENT OF ECE,ATRI page no:

A
Mini Project
On (TNR 12)

TRAFFIC JAM PREVENTOR ON OVER BRIDGE

A dissertation submitted in partial fulfillment of the


Requirement for the award of the degree of (TNR 12)
BACHELOR OF TECHNOLOGY
In
ELECTRICAL COMMUNICATION ENGINEERING
By

P.JEEVAN KUMAR (14841A0429)


P.SRAVAN YADAV (14841A0428)
Under the esteemed guidance of

KOAMLI KUMARI
(----------------, ---------)(Designation, Dept: TNR 12)

DEPARTMENT OF ELECTRONICAL COMMUNICARION ENGINEERIN


AURORAS TECHNOLOGICAL AND RESEARCH INSTITUTE
(Affiliated to JNTU, Hyderabad and approved by AICTE, New Delhi)
Parvathapur, Uppal, Hyderabad-500 039
(2016-17)
DEPARTMENT OF ECE,ATRI page no:
Page 2

Aurora's Technological & Research Institute


(Affiliated to JNTU, Hyderabad)
Parvathapur, Uppal, Hyderabad-500 039
(2016-17)

DECLARATION

We hereby declare that the work described in this project, entitled TRAFFIC JAM PREVENTOR ON
OVER BRIDGE which is being submitted by me in partial fulfillment for the award of Bachelor of
Technology in ECE to AURORAS TECHNOLOGICAL AND RESEARCH INSTITUTE is the result
of investigation carried by me under the guidance of KOMALI KUMARI with designation ,
Department).
The work is original and has not been submitted for any degree of this or any other university.

Place: Hyderabad

Date:
P. JEEVAN KUMAR(1484A0429)
P. SRAVAN YADAV(14841A0428)
DEPARTMENT OF ECE,ATRI page no:
Page 3

Aurora's Technological & Research Institute


(Affiliated to JNTU , Hyderabad) Parvathapur , Uppal , Hyderabad-500 039.
(2016-17)

CERTIFICATE
This is to certify that the mini project report entitled TRAFFIC JAM PREVENTOR ON OVER
BRIDGE that is being submitted by (P.JEEVAN KUMAR, P.SRAVAN YADAV) in partial fulfillment
for the award of the Degree of Bachelor of Technology in (ECE) to the Jawaharlal Nehru Technological
University is a record of bonafide work carried out by them under my guidance and supervision. The results
embodied in this project report have not been submitted to any other University or Institute for the award
of any degree or diploma.

Date:

Internal Guide Head of the department


Name KOMALI KUMARI GOWRI MAM
Designation
Department ECE

Mini Project Coordinator Director


SRIKANTH JATLA SIR
MAMATHA MAM

.
DEPARTMENT OF ECE,ATRI page no:

Traffic Jam preventor on over bridge

CONTENTS

1. ABSTRACT

2. INTRODUCTION

3. FUNCTIONAL DESCRIPTION AS PER THE DIAGRAMS

4. POWER SOURCE DESCRIPTION

5. DRAWINGS

5.1- BLOCK DIAGRAM


5.2- PROGRAM FLOW CHART
5.3- CIRCUIT DIAGRAM

6. CHIP BURNING PROCESS WITH


SOFTWARE DESCRIPTION

7. DETAILED DESCRIPTION ABOUT IR SENSIRS

8. DESCRIPTION ABOUT 89C2051 CONTROLLER

9. DATA SHEETS OF 89C2051 & 93C46 CHIPS

10. SOFTWARE DETAILS

11. CONCLUSIONS AND REFERENCES


DEPARTMENT OF ECE,ATRI page no:
Traffic Jam preventor on over bridge

ABSTRACT
It is necessary to avoid traffic jams over the bridges; otherwise the bridge may not tolerate the stable loads
for quite long period. Hence this system is designed to avoid this situation. In this concept the incoming &
out going vehicles are monitored continuously through IR sensors, when the system finds that the incoming
vehicles are more then the out going vehicles, immediately it energizes alarms & red lights at both ends of
the bridge. These devices remain in on condition until the specified vehicles leaves the bridge. In normal
condition green lights remains in energized condition. The system is designed to monitor both ways traffic,
for this purpose 4 sets of IR sensors are used. Each set contains one IR signal generator (IR LED), & one IR
signal detector. These two devices are arranged side by side with a clearance of half inch. The IR LED
generates IR signal will be traveled in uni direction, whenever any vehicle passed side by this device, the IR
energy hits the vehicle & some of its energy will be reflected. This reflected energy will be detected by the
IR sensor, based on this signal the trigger circuit designed with 567 IC generates a logic high signal for the
controller.

The demo module is marked with double line road; both ways are monitored & controlled independently.
IR proximity detection scheme is implemented such that incoming & out going vehicles are detected at both
sides of the bridge. The outputs of all the sensors are fed to the microcontroller, this controller is programmed
to count incoming & out going vehicles. For example, when the system finds that the out going vehicles count
is zero, where as incoming vehicle count reaches to 10, then immediately it energizes alarm & red indicator,
these two devices remains in on condition until out going vehicles count reaches to 5. Like wise both ways
vehicles are monitored continuously.

INTRODUCTION

These days traffic jams are quite common, we find traffic jams everywhere in the city especially in
metro cities it is severe, often vehicles are stacked at specific places due to the narrow roads. In few places,
like at the entrance of flyover bridges, the vehicles are clutched due to the bottle neck environment. Often
traffic jams are taking place because of heavy duty trucks, these trucks occupies lot of space, moreover these
trucks carries heavy loads, due to this reason the speed of these type of vehicles will be very less. If the
vehicles are clutched below or before the bridge, it doesnt effect to the earth, because it can bear any load,
but what happen when these weighty vehicles occupies the bridge for extended period!, the civil engineer
DEPARTMENT OF ECE,ATRI page no:
may declare that these bridges are designed to bear limited moving loads, they can not tolerate stable heavy
loads for quite long period, hence traffic restriction over the fly over bridges is essential. There by this project
work is taken up, which is aimed to restrict the traffic from both sides of bridge.

Traffic jams are occurring due to the Traffic congestion is increasingly becoming a severe problem in
many large cities around the world. The problem is more complex in developing countries where cities are
growing much faster than those in the developed countries. The average annual population growth in
developing countries is estimated at around 5% compared to 0.7% in developed countries. With the increase
of population the traffic is also being increased day by day. It has become a hell kind of experience in these
days to go out in the peak hours, mostly in the metropolitan cities. It takes hours to go to a near place where
there have been number of traffic signal junctions. As the traffic is restricted at signal junctions, in the same
manner it is also essential to restrict the traffic at the entrance of fly-over bridges. But the logic used at
junctions for controlling the traffic signals will not be applicable here; a separate signaling system by sensing
the density of incoming and out going vehicles, traffic must be controlled.
The system is designed with four sets of infrared sensors for sensing incoming and out going vehicle
at both sides of both roads, means the system is designed for double lane fly-over. Each set contains one IR
LED and one IR sensor; these devices are connected to the trigger circuit designed with 567 tone decoder IC.
This IC configured as trigger circuit generates logic pulse for the microcontroller. Now each incoming vehicle
and going vehicles of both lanes are sensed, if the microcontroller detects that incoming vehicles are more
when compared with outgoing vehicles, immediately it energizes alarm to alert the traffic, at the same time
red indicator will be energized automatically. Once the red indicator glows, it remains in energized condition
until the vehicles are cleared over the bridge. The same principle is applied for other side of the road. The
detailed description is provided in next chapter.

Since the number of road vehicles and passengers is rapidly growing, these days traffic control
technologies are gaining popularity. There is a continuous need for safety-critical traffic automation, and
traffic engineering makes the dynamic or static analysis and the synthesis of automotive vehicle technologies
possible. The main goal of engineering is the planning and management of traffic systems. The project
supports the development of reliable and optimal control structures for motorway systems. Here the
intelligent and cooperative set-up of embedded system designed with 89C2051 controller can avoid traffic
jams over the fly-over bridges. As the vehicles are increasing day by day and where as the infrastructure
remains as it is, modern technologies must be implemented to control the traffic.

Most of the traffic jams occurred over fly-over bridges is due to heavy duty trucks, because of these
trucks other small vehicles got struck when they try to over take, in this situation driver looses time, in
DEPARTMENT OF ECE,ATRI page no:
addition lot of fuel is wasted. To avoid this situation more intelligent traffic lights controller can be designed
such that the system can identify the big trucks through sensors and accordingly following vehicles
movements can be controlled automatically until the huge truck leaves the bridge. Though this feature is not
included in this project work, it can be considered in future work.

The microcontroller used in the project work belongs to ATMEL family, for this purpose 89C2051
chip is used. As task is simple, lowest configurations controller is used. The following is the brief
introduction about controllers.

Microcontrollers are single-chip computers consisting of CPU (central processing unit), data and
program memory, serial and parallel I/O (input/output), timers, external and internal interrupts, all
integrated into a single chip. Microcontrollers are intelligent electronic devices used to control and monitor
devices in the real world. Today microcontrollers are used in most commercial and industrial equipment.
About 40% of microcontroller applications are in office automation, such as PCs, laser printers, fax
machines, and so forth. About one-third of microcontrollers are found in consumer electronics goods.
Products such as CD players, hi-f- equipment, video games, washing machines and cookers fall into this
category. The communications market, automotive market, and the military share the rest of the application
areas.

Microcontrollers are programmed devices. A program is a sequence of instructions that tell the
microcontroller what to do. Microcontrollers have traditionally been programmed using the low level
assembly language of the target processor. This consists of a series of instructions in the form of
mnemonics. The biggest disadvantage of assembly language is that microcontrollers from different
manufacturers have different assembly languages and the user is forced to learn a new language every time
a new processor is chosen. Assembly language is also difficult to work with, especially during the
development, testing, and maintenance of complex projects. The solution to this problem has been to use a
high-level language to program microcontrollers. A high-level language consists of easy to understand,
more meaningful series of instructions. This approach makes the programs more readable and also portable.
The same high-level language can usually be used to program different types of microcontrollers. Testing
and the maintenance of microcontroller-based projects are also easier when high-level languages are used.
The term microcomputer is used to describe a system that includes a minimum of a microprocessor,
program memory, data memory, and inputoutput (I/O). Some microcomputer systems include additional
components such as timers, counters, analogue-to-digital converters, and so on. Thus, a micro-computer
system can be anything from a large computer having hard disks, floppy disks, and printers, to a single-
chip embedded controller. A microcontroller is a single chip computer. Micro suggests that the device is
DEPARTMENT OF ECE,ATRI page no:
small, and controller suggests that the device can be used in control applications. Another term used for
microcontrollers is embedded controller, since most of the microcontrollers are built into (or embedded in)
the devices they control.

A microprocessor differs from a microcontroller in many ways. The main difference is that a
microprocessor requires several other components for its operation, such as program memory and data
memory, I/O devices, and external clock circuit. A microcontroller on the other hand has all the support
chips incorporated inside the same chip. All microcontrollers operate on a set of instructions (or the user
program) stored in their memory. A microcontroller fetches the instructions from its program memory one
by one, decodes these instructions, and then carries out the required operations. Microcontrollers have
traditionally been programmed using the assembly language of the target device.

Basically, a microcomputer executes a user program which is loaded in its program memory. Under
the control of this program data is received from external devices (inputs), manipulated and then sent to
external devices (outputs). A microcontroller is a very powerful tool that allows a designer to create
sophisticated I/O data manipulation under program control. Microcontrollers are classified by the number
of bits they process. 8-bit microcontrollers are the most popular ones and are used in most microcontroller
based applications; 16- and 32-bit microcontrollers are much more powerful, but usually more expensive
and not required in many small- to medium-size general-purpose applications where microcontrollers are
generally used.

The simplest microcontroller architecture consists of a microprocessor, memory, and I/O. The
microprocessor consists of a central processing unit (CPU) and the control unit (CU). The CPU is the brain
of the microcontroller and this is where all of the arithmetic and logic operations are performed. The CU
controls the internal operations of the microprocessor and sends out control signals to other parts of the
microcontroller to carry out the required instructions.

Memory is an important part of a microcontroller system. Depending upon the type they can classify
memories into two groups: program memory and data memory. Program memory stores the program
written by the programmer and this memory is usually non-volatile, i.e. data is not lost after the removal of
power. Data memory is where the temporary data used in a program are stored and this memory is usually
volatile, i.e. data is lost after the removal of power. The detailed description of microcontroller is provided
in 8TH chapter.
DEPARTMENT OF ECE,ATRI page no:

FUNCTIONAL DESCRIPTION AS PER THE DIAGRAMS

The functional description as per the block diagram and circuit diagram is explained here, as the process begins
with the IR sensors for detecting passing vehicles of both lanes of fly-over bridge, the functional description begins
with the sensors. The following is the description.

Most of the fly-over bridges constructed in the metro cities are double lane bridges, means the road is divided
to allow the traffic from both sides. There by to sense both lanes traffic, i.e. counting of incoming and out going
vehicles of both sides traffic, four pairs of IR transceivers is used. These sensors are arranged at entrance and exit of
Fly-over Bridge, as the system is designed for two lanes four sets of sensors are used. Each pair contains one IR LED
& one IR signal detector. The IR signal radiated from the IR LED will be traveled in to space up to certain distance
in uni-direction, the range is defined based on the signal strength & it can be called as IR energy. Whenever this IR
energy hits a moving object like car, some of the energy will be reflected & this reflected signal will be detected by
the IR sensor. This is the basic function of IR transceiver.

When IR LED and IR sensor, both are arranged side by side, the IR LED transmits the IR energy and reflected
IR energy will be received by the IR sensor, hence this arrangement can be called as IR transceiver package. The IR
sensors act as Laser rangefinders have the great advantage of providing the information about the moving objects.
When any car or any other object passes side by this sensor package, it will be detected. This is called proximity
detection scheme, in this method the sensor package doesnt have any physical contact with the object. Some times
IR sensors also called as optical sensors, because infrared light produced by the IR LED will be detected by the photo
diode, here IR sensor will be acting as photo diode. So the advantages and applications of IR sensors are plenty, here
they are used for detecting the passing vehicles.
The main block in the Block diagram is passing vehicle detection circuit designed with IR Sensors, these
sensors are wired with LM567 IC, this is a tone decoder IC, and also it generates tone frequency. The IC configured
as trigger circuit generates logic signal for the microcontroller, whenever it senses any moving object close to the
sensors, logic high signal will be produced from the output of 567 IC. Four similar circuits are constructed for
identifying both lane passing vehicles in up and down directions. All the four outputs are fed to the 89C2051
controller, depending up on the interrupted signal produced by the trigger circuit the controller can identify the
position of passing vehicle, i.e. from which lane and from which side.

The IR signal detector is nothing but a photo diode; hence it is called as optical sensor. Both the devices are
arranged side by side with in half-inch distance. The tone generator part of the IC is configured as astable mode of
operation, which produces a perfect square wave of 10 KHz approximately and it is amplified using a transistor. The
amplified signal is radiated through the transmitting IR LED. The signal delivered by the IR LED transmits in a line
like laser beam, whenever this signal is interrupted by an object, the radiating signal will be spread in the air because
of the object, and this signal is tracked by the IR signal detector/photo diode. On receipt of optical signal, the tone
DEPARTMENT OF ECE,ATRI page no:
decoder part of the IC detects the signal through the optical sensor and generates a high signal for the microcontroller.
Like wise the controller is getting signals from all the four sensing blocks according to the received information from
the passing vehicles. The controller is programmed to count incoming and out going vehicles from both sides the
roads. If the incoming vehicles are more then the out going vehicles, then it stops the incoming vehicles by energizing
the red indicator.

CIRCUIT DESCRIPTION

The IR remote sensing circuit is designed with LM 567 IC, as four sets of Infra Red Sensors are used
in this project; four similar chips are used for detecting the passing vehicles. All the sensor circuits are
similar to each other, as all the four sets of sensors are arranged at four different locations, controller can
identify the position of passing vehicle. The IR signal delivered from the IR LED will be radiated in to the
free space, since commercial type of IR LEDs are used the range is very less. Here high efficiency IR-
LED is used to deliver the IR energy in to space. Depending up on the signal strength, the signal is
transmitted up to certain distance, after that the signal will be vanished. In our trail run module we found
that this energy is traveled up to 10 inches approximately. As this range is also high for the demo module,
the signal strength is reduced by limiting the current that is flowing through IR LED junction. Here current
limiting resistor is used and it is connected in series with the IR LED.

In general the IR signals by themselves cannot travel long distances, carrier wave is essential,
therefore the chip used in the circuit can generate a high frequency of 10 KHz approximately. These signal
when superimposed on the carrier frequency, they can cover the same distance as the carrier wave itself. A
modulated wave is like an aeroplane carrying passengers who could not have reached their destination
without the help of the aeroplane. In this manner the chip generates a modulating frequency of about 10
KHz. The Frequency is decided by the RT and CT connected at Pin No 5 and 6 of the Tone Decoder IC.
This frequency is available from Pin 5 of LM 567 IC; this is a versatile PLL tone decoder IC. The 47 ohms
resistor connected in series with the IR LED limits the IR-LED current.

The basic function of the trigger circuit is by radiating energy into space through IR LED and
detecting the echo signal reflected from an object. The reflected energy that is returned to the IR sensor
indicates the presence of an object which is within the range. A portion of the transmitted energy is
intercepted by the target and re-radiated in many directions. The radiation directed back towards the system
is collected by the receiving LED causes to produce a high signal at Pin No.8 of LM567 IC. The output of
the receiver is fed to the Microcontroller. Whenever the controller receives a high signal from the reference
point, the microcontroller counts the interrupted signals internally. The following is the circuit diagram of
trigger circuit.
DEPARTMENT OF ECE,ATRI page no:

Microcontroller unit
The prototype module is constructed with 89C2051 microcontroller chip, this device belongs to
ATMEL family offers many features. Economy point of view they are very cheap when compared with
other controller chips. This chip is programmed to activate the alarm and red indicator when incoming
vehicles are more when compared with outgoing vehicles. The function is quite simple, there by simple
program is prepared in assembly language.

Microcontrollers can be defined as microcomputers, because each chip contains very large scale
integration with many digital circuits that perform arithmetic, logic, communication, and control functions.
When this controller is integrated with other components over a printed circuit board (PCB), the package
designed for a specific application can be referred as a microcomputer on single board. The controller used
here is having 20 pins and it is very small in size, and it can be programmed easily.

The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of


Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels
high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51
instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051
is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many
embedded control applications.

The AT89C2051 provides the following standard features: 2K bytes of Flash, 128 bytes of RAM, 15
I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port,
DEPARTMENT OF ECE,ATRI page no:
a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 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 hardware reset.

Today there is no such instrument that functions without Microcontrollers, not only instrument any
electronic or electrical equipments like robots, machines, home appliances, telecommunication equipment,
wireless systems, automobiles, navy equipments, air force equipments, etc. the list is end less. Therefore
these controllers gained lot of popularity & are used widely for many applications. Here in this project
work, this controller is used for simple task.

The components of a typical microcontroller includes the CPU (Central Processing Unit), RAM
(Random Access Memory), ROM (Read only Memory), I/O lines, timers, serial communication interface,
etc. The CPU executes the software stored in ROM and controls all other components of that particular
microcontroller. The RAM is utilized to store the settings and values used by an executing program.
Similarly the ROM is used to store the program; this program can be a permanent data, according to the
interrupt signals or any other external data obtained from I/O lines, outputs are controlled accordingly. A
designer can have a program and data permanently stored in ROM by the chip manufacturer, or the ROM
can be in the form of EPROM or EEPROM, which can be programmed by the user. The software
permanently stored in ROM can be referred as firmware. Microcontroller chip manufacturers offer
programming devices that can download a compiled machine code file from a PC directly to the EEPROM
of the microcontroller. Often the programming devices are called chip burners; the code prepared through
PC is delivered through its serial port & downloaded in to microcontroller through programming device.
The chip is burnt through special purpose pins & later these pins can usually be used for other purposes
once the device is programmed. Additional EEPROM may also be available and used by the program to
store settings and parameters generated or modified during execution. The data stored in EEPROM is
nonvolatile, which means the program remains as it is, it will not be disturbed by the power failures. In
other words, the program can access data when the controller power is turned off and back on again.

The digital I/O (Input/Output) lines allow binary data to be transferred to and from the
microcontroller using external pins on the chip. Most of the controllers used for simple applications are
eight bit, it delivers data through its ports, and each port contains eight I/O lines. The I/O pins are used to
read the information gathered from sensors, interrupt signals generated by the switches, to interface with
DEPARTMENT OF ECE,ATRI page no:
external A/D converter, to interface with display modules like LCD or LED, to interface with key boards,
etc. These pins can also be used to transmit signals to and from other microcontrollers or processors to
coordinate various functions.

The microcontroller can also use a serial port to transmit data to and from external devices based on
the restriction such that the external devices must support the same serial communication protocol. In few
cases if the program is too lengthy, where as the microcontroller memory is less, in this condition additional
memory chips like EEPROM can be interfaced with the existing controller chip. In this case the external
memory chip can store huge data for the microcontroller. There are various standards or protocols for serial
communication which includes SPI (Serial Peripheral Interface), I2 C (Inter-integrated Circuit), UART
(Universal Asynchronous Receiver Transmitter), and USART (Universal Synchronous Asynchronous
Receiver Transmitter).

This Project work is designed using ATMEL 89C2051 Micro Controller. This Micro Controller
contains a non-volatile flash program memory up to 2Kb in this chip and is both parallel programming and
Serial In-system programming which allows devices to alter their own program memory, in the actual end
product, under software control. This chip consists of 8-bit I/O ports, three 16-bit timer/even counters, a
multi-source, four priority-level, nested interrupt structure, and enhanced UART and on-chip oscillator and
timing circuits. This Micro controller is ideally suitable for this type of dedicated applications. The
Circumstances that we find ourselves in today in the field of microcontrollers had their beginnings in the
development of technology of integrated circuits. This development has made it possible to store hundreds
of thousands of transistors into one chip. That was a prerequisite for production of microprocessors, and
the first computers were made by adding external peripherals such as memory, input-output lines, timers
and other. Further increasing of the volume of the package resulted in creation of integrated circuits. These
integrated circuits contained both processor and peripherals. That is how the first chip containing a
microcomputer, or what would later be known as a microcontroller came about.

Memory unit

The easiest way to explain it is to describe it as one big closet with lots of drawers. If we suppose
that we marked the drawers in such a way that they can not be confused, any of their contents will then be
easily accessible. It is enough to know the designation of the drawer and so its contents will be known to
us for sure.
DEPARTMENT OF ECE,ATRI page no:

Memory components are exactly like that. For a certain input we get the contents of a certain
addressed memory location and thats all. Two new concepts are brought to us: addressing and memory
location. Memory consists of all memory locations, and addressing is nothing but selecting one of them.
This means that we need to select the desired memory location on one hand, and on the other hand we need
to wait for the contents of that location. Besides reading from a memory location, memory must also provide
for writing onto it. This is done by supplying an additional line called control line. We will designate this
line as R/W (read/write). Control line is used in the following way: if r/w=1, reading is done, and if opposite
is true then writing is done on the memory location. Memory is the first element, and we need a
few operation of our microcontroller.

Central Processing Unit

Lets add 3 more memory locations to a specific block that will have a built in capability to multiply,
divide, subtract, and move its contents from one memory location onto another. The part we just added in
is called central processing unit (CPU). Its memory locations are called registers.

Registers are therefore memory locations whose role is to help with performing various
mathematical operations or any other operations with data wherever data can be found. Look at the current
situation. We have two independent entities (memory and CPU) which are interconnected, and thus any
exchange of data is hindered, as well as its functionality. If, for example, we wish to add the contents of
two memory locations and return the result again back to memory, we would need a connection between
memory and CPU. Simply stated, we must have some way through data goes from one block to another.

Bus

That way is called bus. Physically, it represents a group of 8, 16, or more wires. There are
three types of buses: address bus, data bus and control bus.. The first one consists of as many lines as the
amount of memory we wish to address, and the other one is as wide as data, The Third bus consists control
information such as read, write , chip select, memory select and I/O select. In our case it is 8 bits connection
line. The Address Bus, Data Bus and Control Busses are used to connect external memories, where internal
memories are not sufficient. First one serves to transmit address from CPU memory, and the second to
connect all blocks inside the microcontroller.

Input - output unit


DEPARTMENT OF ECE,ATRI page no:

Those locations weve just added are called ports. There are several types of ports: input, output
or bi-directional ports. When working with ports, first of all it is necessary to choose which port we need
to work with, and then to send data to, or take it from the port.

When working with it the port acts like a memory location. Something is simply being written into
or read from it, and it could be noticed on the pins of the micro-controller. 89C2051 Micro controller is
having 15 I/O lines configured as 2 Ports as Port 1 and Port 3 of each 8 Bit Port.

POWER SOURCE DESCRIPTION

Power supplies are the common factor in all electronics equipment, but sufficient attention is not
always paid to this type of circuit. Most of the electronic engineers neglect even the basic rules about
rectification and smoothing, they are not followed accurately. The subject of stabilization is important in
power supplies, otherwise the circuit that is powered through poor quality power supply may burn due to
the voltage fluctuations. Therefore the power Supply is a Primary requirement for the project work and it
should be designed accurately.

Before designing a power supply, first we must calculate how much current is required to drive
entire circuit. Here the purpose is to drive a simple circuit that is designed to operate at a constant voltage
source of +5V. As per the calculations and based on the assumption, it is estimated that the entire circuit
power consumption will not exceed more then 300ma. Therefore a higher rating transformer of 500ma at
secondary is used for the safe side. The advantage of using higher rating transformer is to reduce the thermal
effect; there by failure causes can be minimized.

The circuit designed here consisting of four IR sensors based trigger circuits, one microcontroller
unit, alarm and LED indicators all together consumes about 300 milliamps current. In our trail run we found
that each trigger circuit consumes around 60milliamps independently, so four circuits together consumes
240milliamps. In addition, the microcontroller unit and its associated components consuming another
60milliamps current from 5V source.

Since the required DC power supply for the total circuitry to be derived from the single phase
mains, a step down transformer with center tapped secondary of 12V-0-12V transformer is considered for
the purpose. The secondary is rectified with two diodes to convert the AC in to DC, for this purpose higher
rating diodes of 2N4007 are selected; these diodes can with stand up to 400V at 1 Amp current. Now a
DEPARTMENT OF ECE,ATRI page no:
large capacitor of 1,000 micro-farads is connected across the DC source for eliminating the AC ripple, there
by smooth DC is availed from the power supply unit.

The DC voltage derived from the supply is un-regulated, initially around 16V DC is available at no
load, when load is connected, and the voltage may fall down by 12V. The main draw back of this un-
regulated supply is, it varies according to the line voltage, there by a stable supply of +5V is essential. With
the help of a positive voltage regulator, a constant voltage source of +5V is derived. For this purpose 7805
3Pin Voltage regulator is used so that, though the mains supply varies from 170V to 250V, the output DC
level remains constant. The 7805 used in this project work can deliver a maximum current of 800 milliamps,
this device is having thermal shut-down facility internally such that whenever the device body temperature
rises more then 70 degree centigrade, automatically output become zero and protects the regulator burning
due to the over temperature. A suitable Aluminum heat sink coupled to the regulator body is essential when
maximum current is drawn. As stated above, here the circuit consumes less current heat sink is not required.

Rectification is a process of rendering an alternating current or voltage into a unidirectional one. The
component used for rectification is called Rectifier. A rectifier permits current to flow only during the
positive half cycles of the applied AC voltage by eliminating the negative half cycles or alternations of the
applied AC voltage. Thus pulsating DC is obtained. To obtain smooth DC power, additional filter circuits
are required.

A diode can be used as rectifier. There are various types of diodes. But, semiconductor diodes are
very popularly used as rectifiers. A semiconductor diode is a solid state device consisting of two elements
is being an electron emitter or cathode, the other an electron collector or anode. Since electrons in a
semiconductor diode can flow in one direction only-form emitter to collector- the diode provides the
unilateral conduction necessary for rectification.

The rectified Output is filtered for smoothening the DC, for this purpose suitable capacitor is to be
selected depending up on the current rating, generally for 1Amp rating power supply 1000 Micro-farad
capacitor is used in the filter circuit, hear the supply rating is more, so that heavy capacitor is used. The
filter capacitors are usually connected in parallel with the rectifier output and the load. The AC can pass
through a capacitor but DC cannot, the ripples are thus limited and the output becomes smoothed. When
the voltage across the capacitor plates tends to rise, it stores up energy back into voltage and current. Thus
the fluctuation in the output voltage is reduced considerable.
DEPARTMENT OF ECE,ATRI page no:
The circuit diagram of this power supply is shown in main diagram, and the data sheets of voltage
regulator are provided in hardware details chapter.

The following is the circuit diagram of Power supply.

CHIP BURNING PROCESS WITH SOFTWARE DESCRIPTION

Developing software and hardware for micro controller based Embedded systems involves the use of a
range of tools that can include editors, assemblers, Compilers, debuggers, simulators, emulators and
Flash/OTP programmers. To the Newcomer to micro controller development it is often not clear how all of
these Different components play together in the development cycle and what differences There are for
example between Trainer kits, emulators and simulator. The basic operations that are involved in above micro
controller development cycle are:

1. Writing Micro controller Code.


2. Translating the Code.
3. Debugging the code.

Writing micro controller code:

Software Code for a micro controller is written in a programming language of choice (often Assembler
or C). This source code is written with a standard ASCII text editor and saved as an ASCII text file.
DEPARTMENT OF ECE,ATRI page no:
Programming in assembler involves learning a micro controllers specific instruction set (assembler
mnemonics), but results in the most compact and fastest code. A higher-level language like C is for the most
part independent of a micro controllers specific architecture, but still requires some controller specific
extensions of the standard language to be able to control all of a chip's peripherals and functionality. The
penalty for more portable code and faster program development is a larger code size (20%...40% compared
to assembler).

Translating the code:

Next the source code needs to be translated into instructions to the micro controller can actually
execute. A microcontrollers instruction set is represented by "op codes". Op codes are unique sequences of
bits ("0" and "1") that are decoded by the controller's instruction decode logic and then executed. Instead of
writing op-codes in bits, they are commonly represented as hexadecimal numbers, whereby one hex number
represents 4 bits within a byte, so it takes two hex numbers to represent 8 bits or 1 byte. For that reason a
micro controllers firmware in Machine-readable form is also called Hex-Code and the file that stores that
code Hex-File.

Debugging the Code

A debugger is a piece of software running on the PC, which has to be tightly integrated with the
emulator that you use to validate your code. For that reason all emulator manufacturers ship their own
debugger software with their tools, but also compiler manufacturers frequently include debuggers, which
work with certain emulators, into their development suites

ADVANTAGES

1. One of the advantages of an embedded system is to decrease power consumption and space.
2. All embedded systems that are based on micro controller have low power consumption in addition to
some form of I/O, COM port and ROM all on a single chip.

CHIP BURNING PROCESS

The process of chip burning depends up on the compiler kit, the CA51 Compiler Kit for the 8051
micro controller family supports all 8051 derivatives including those from companies like Analog Devices,
Atmel, Cypress Semiconductor, Dallas Semiconductor, Goal, Hynix, Infineon, Intel, OKI, Philips, Silicon
Labs, SMSC, ST Microelectronics, Synopsis, TDK, Temic, Texas Instruments, and Winbond.
DEPARTMENT OF ECE,ATRI page no:
The following components are included in the CA51 8051 C-compiler & Assembler Kit:

C51 C Compiler

The Keil C51 C Compiler for the 8051 micro controller is the most popular 8051 C compiler in
the world. It provides more features than any other 8051 C compiler available today.

The C51 Compiler allows you to write 8051 micro controller applications in C that have the efficiency
and speed of assembly language. Language extensions in the C51 Compiler give you full access to all
resources of the 8051.

C51 translates C source files into a re-locatable object module. When the DEBUG control is used, the
object file contains full symbolic information for debugging with the Vision3 Debugger or an in-circuit
emulator. In addition to the object file, the C51 Compiler generates a listing file, which optionally may
include symbol table and cross-reference information.

Features

Nine basic data types, including 32-bit IEEE floating-point


Flexible variable allocation with bit, data, bdata, idata, xdata, and pdata memory types
Interrupt functions may be written in C
Full use of the 8051 register banks
Complete symbol and type information for source-level debugging
Use of AJMP and ACALL instructions
Bit-addressable data objects
Built-in interface for the RTX51 real-time operating system
Support for dual data pointers on Atmel, AMD, Cypress, Dallas Semiconductor, Infineon, Philips, and
Triscend micro controllers
Support for the Philips 8xC750, 8xC751, and 8xC752 limited instruction sets
Support for the Infineon 80C517 arithmetic unit

A51 Macro Assembler

The A51 Assembler is a macro assembler for the 8051 family of micro controllers. It supports all
8051 derivatives. It translates symbolic assembly language mnemonics into relocatable object code where
the utmost speed, small code size, and hardware control are critical. The macro facility speeds development
and conserves maintenance time since common sequences need only be developed once. The A51
assembler supports symbolic access to all features of the 8051 architecture.
DEPARTMENT OF ECE,ATRI page no:
The A51 assembler translates assembler source files into a relocatable object module. The DEBUG
control adds full symbolic information to the object module and supports debugging with the Vision3
Debugger or an in-circuit emulator. In addition to object files, the A51 assembler generates list files, which
optionally may include symbol table and cross reference information.

DETAILED DESCRIPTION ABOUT IR SENSIRS

The applications and advantages of infrared sensors are plenty; mostly these devices are utilized for
various types of security systems by implementing proximity detection theme. Other important applications
are for counting objects, or counting revolutions of a rotating object. In any concept, the proximity detection
package contains two devices, namely infrared light emitting diode (IR LED) and infrared light/signal
detector (IR sensor). The IR LED is always ON, meaning that this device is constantly emitting light and the
sensor is detecting this light. The sensors can be interfaced with trigger circuit to generate logic high/low
pulses depending up on the interruptions created by any object. This design of the circuit is suitable many
applications. However this design is more power consuming and is not optimized for high ranges, in this
design, range can be from 1 to 10 cm, depending on the ambient light conditions.

The following are the few applications:


Proximity sensor:

Generally proximity sensors are used for counting the objects or for counting the revolutions of a low
speed running motor. These sensor packages are readily available in the market; each package contains IR
LED and IR sensor. Different sensors are available to suit the requirement, the main criteria is range, as the
range increases power consumption of the device also increases. Battery operated sensors range is very less,
often less then 10 centi-meters. This type of sensors can be used for constructing the digital tacho meters.
This sensor can be used for most indoor applications where no important ambient light is present. For
simplicity, this sensor doesn't provide ambient light immunity. However, this sensor can be used to measure
the speed of object moving at a very high speed, like in industry or in tachometers. In such applications,
ambient light ignoring sensor, which rely on sending 40 KHz pulsed signals cannot be used because there are
time gaps between the pulses where the sensor is 'blind'.

Object detection using IR light:

The solution proposed doesn't contain any special components, like photo-diodes, phototransistors, or
IR receiver ICs, only a couple if IR leds, an Op amp, a transistor and a couple of resistors. In need, as the
title says, a standard IR led is used for the purpose of detection. Due to that fact, the circuit is extremely
DEPARTMENT OF ECE,ATRI page no:
simple, and any novice electronics hobbyist can easily understand and build it. To prove the concept
practically, as shown in the figure, we required 2 simple IR LEDs, and they must be arranged side by side
to pick-up the reflected IR light. For detecting the reflected IR light, a very simple technique is used by using
another IR-LED, to detect the IR light that was emitted from another led of the same type.

This is an electrical property of Light Emitting Diodes (LEDs), which is the fact that a led produces a
voltage difference across its leads when it is subjected to light. As per the following figure, the infrared signal
delivered from one LED hits the object and it is reflected, another infrared LED detects the reflected signal.
The signal strength depends up on the current that is passing through the infrared LED; signal strength can
be defined as radiating power, which is measured in mill watts. The range is depends up on the signal strength.

The infrared signal detector circuit is designed with Op-Amp (operational Amplifier), which can detect
very small voltage changes also accurately.

Two different designs are proposed, each one of them is more suitable for different applications. The
main difference between the 2 designs is the way infra-red (IR) light is sent on the object. The receiver part
of the circuit is exactly the same in both designs. Both the circuits sender and receiver can be constructed on
the same board. In other concept, the receiver can be kept parallel to the transmitter. The IR leds encapsulated
to protect them from ambient light, this kind of encapsulation was totally sufficient to overcome all noise due
to ambient light for indoor applications.

Wheel Encoder;

The wheel encoder can be used many applications, it can be used as revolutions counter, running speed
can be displayed, and distance traveled also can be displayed. To achieve this, the wheel must be arranged
with block and white stripes. This is a simple wheel encoder based on the idea that white stripes will reflect
DEPARTMENT OF ECE,ATRI page no:
IR light, while black ones will absorb it, this will result in a series of electrical pulses as the wheel is rotating,
providing the micro controller with precious information that can be used to calculate displacement, velocity
or even acceleration. It is now clear that this kind of sensor has to be Always ON, to detect every single white
stripe passing in front of it, to achieve accurate results.

Contact-Less tachometer

This is a tachometer that counts the revolutions per minute of a rotating object, given that the object has
a reflective stripe glued on it that will pass in front of the IR sensor for each and every revolution, giving a
pulse per revolution. Again a micro controller will have to be used to 'understand' the data provided by the
sensor and display it. Many commercial contact-less tachometers are designed with infrared sensors because
of their cost effective ness.
Contact less obstacle detection;
In this design, which is oriented to obstacle detection in robots, our primary target is to reach high
ranges, from 25 to 35 cm, depending on ambient light conditions. Increasing the current flowing in the led
extends the range of the sensor. This is a delicate task, as we need to send pulses of IR instead of constant IR
emission. The duty cycle of the pulses turning the LED ON and OFF have to be calculated with precision, so
that the average current flowing into the LED never exceeds the LED's maximum DC current (or 10mA as a
standard safe value).

Basics of IR transmitter

Infra red transmitter emits IR rays in planar wave front manner. Even though infrared rays spread in
all directions, it propagates along straight line in forward direction. IR rays have the characteristics of
producing secondary wavelets when it collides with any obstacles in its path. This property of IR is discussed
here.
DEPARTMENT OF ECE,ATRI page no:

When IR rays gets emitted from LED, it moves in the direction it is angled. When any obstacle interferes in
the path, the IR rays get cut and it produces secondary wavelets which propagates mostly in return direction
or in a direction opposite to that of the primary waves, which produces the net result like reflection of IR
rays.

Basics of IR receiver:

Infrared photo receiver is a two terminal PN junction device, which operates in a reverse bias. It has
a small transparent window, which allows light to strike the PN junction. A photodiode is a type of photo
detector capable of converting light into either current or voltage, depending upon the mode of operation.
Most photodiodes will look similar to a light emitting diode. They will have two leads, or wires, coming from
the bottom. The shorter end of the two is the cathode, while the longer end is the anode. A photodiode consists
of 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.

Use of Infrared Detectors Basics


DEPARTMENT OF ECE,ATRI page no:

IR emitter and IR phototransistor

An infrared emitter is an LED made from gallium arsenide, which emits near-infrared energy at about
880nm.
The infrared phototransistor acts as a transistor with the base voltage determined by the amount of light
hitting the transistor. Hence it acts as a variable current source. Greater amount of IR light cause greater
current to flow through the collector-emitter leads. As shown in the diagram below, the phototransistor is
wired in a similar configuration to the voltage divider. The variable current traveling through the resistor
causes a voltage drop in the pull-up resistor.

This voltage is measured as the output of the device

IR reflectance sensors contain a matched infrared transmitter and infrared receiver pair. These devices
DEPARTMENT OF ECE,ATRI page no:
work by measuring the amount of light that is reflected into the receiver. Because the receiver also responds
to ambient light, the device works best when well shielded from ambient light, and when the distance between
the sensor and the reflective surface is small (less than 5mm). IR reflectance sensors are often used to detect
white and black surfaces. White surfaces generally reflect well, while black surfaces reflect poorly. One of
such applications is the line follower of a robot.

Schematic Diagram for a Single Pair of Infrared Transmitter and Receiver

Description of operation of a typical circuit


DEPARTMENT OF ECE,ATRI page no:

If the emitter and detector (phototransistor) are not blocked, then the output on pin 2 of the 74LS14 will
be high (apx. 5 Volts). When they are blocked, then the output will be low (apx. 0 Volts). The 74LS14 is a
Schmitt triggered hex inverter.

Remote control application

A remote control is an electronic device used for the remote operation of a machine. The term remote
control can be also referred to as "remote" or "controller" when abbreviated. It is known by many other names
as well, such as clicker. Commonly, remote controls are Consumer IR devices used to issue commands from
a distance to televisions or other consumer electronics such as stereo systems and DVD players. Remote
controls for these devices are usually small wireless handheld objects with an array of buttons for adjusting
various settings such as television channel, track number, and volume. In fact, for the majority of modern
devices with this kind of control, the remote contains all the function controls while the controlled device
itself only has a handful of essential primary controls. Most of these remotes communicate to their respective
devices via infrared (IR) signals and a few via radio signals. They are usually powered by small AAA or AA
size batteries.
Infrared Radiation
Infrared radiation is electromagnetic radiation whose wavelength is longer than that of visible light, but
shorter than that of terahertz radiation and microwaves. The name means "below red" (from the Latin infra,
"below"), red being the color of visible light with the longest wavelength. Infrared radiation has wavelengths
between about 750 nm and 1 mm, spanning three orders of magnitude. Humans at normal body temperature
can radiate at a wavelength of 10 micrometers. Infrared imaging is used extensively for both military and
civilian purposes. Military applications include target acquisition, surveillance, night vision, and homing and
DEPARTMENT OF ECE,ATRI page no:
tracking. Non-military uses include thermal efficiency analysis, remote temperature sensing, short-ranged
wireless communication, spectroscopy, and weather forecasting. Infrared astronomy uses sensor-equipped
telescopes to penetrate dusty regions of space, such as molecular clouds; detect cool objects such as planets,
and to view highly red-shifted objects from the early days of the universe.
At the atomic level, infrared energy elicits vibration modes in a molecule through a change in the dipole
moment, making it a useful frequency range for study of these energy states. Infrared spectroscopy examines
absorption and transmission of photons in the infrared energy range, based on their frequency and intensity.
Objects generally emit infrared radiation across a spectrum of wavelengths, but only a specific region of
the spectrum is of interest because sensors are usually designed only to collect radiation within a specific
bandwidth. As a result, the infrared band is often subdivided into smaller sections.

The boundary between visible and infrared light is not precisely defined. The human eye is markedly
less sensitive to light above 700 nm wavelength, so shorter frequencies make insignificant contributions to
scenes illuminated by common light sources. But particularly intense light (e.g., from lasers, or from bright
daylight with the visible light removed by colored gels) can be detected up to approximately 780 nm, and
will be perceived as red light. The onset of infrared is defined (according to different standards) at various
values typically between 700 to 800 nm.

Infrared radiation is popularly known as "heat" or sometimes "heat radiation", since many people
attribute all radiant heating to infrared light and/or to all infrared radiation to being a result of heating. This
is a widespread misconception, since light and electromagnetic waves of any frequency will heat surfaces
that absorb them. Infrared light from the Sun only accounts for 49% of the heating of the Earth, with the rest
being caused by visible light that is absorbed then re-radiated at longer wavelengths. Visible light or
ultraviolet-emitting lasers can char paper and incandescently hot objects emit visible radiation. It is true that
objects at room temperature will emit radiation mostly concentrated in the 8 to 12 micrometer band, but this
is not distinct from the emission of visible light by incandescent objects and ultraviolet by even hotter objects.

DESCRIPTION ABOUT 89C2051 CONTROLLER

The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of


Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels
high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51
instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051
DEPARTMENT OF ECE,ATRI page no:
is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many
embedded control applications.

The AT89C2051 provides the following standard features: 2K bytes of Flash, 128 bytes of RAM,
15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial
port, a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 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 hardware reset.

Restrictions on Certain Instructions

The AT89C2051 and is an economical and cost-effective member of Atmel's growing family of
microcontrollers. It contains 2K bytes of flash program memory. It is fully comp a t i b l e with the MCS-
51 architecture, and can be programmed using the MCS-51 instruction set. However, there are a few
considerations one must keep in mind when utilizing certain instructions to program this device. All the
instructions related to jumping or branching should be restricted such that the destination address falls
within the physical program memory space of the device, which is 2K for the AT89C2051. This should be
the responsibility of the software programmer.

For example, LJMP 7E0H would be a valid instruction for the AT89C2051 (with 2K of memory),
whereas LJMP 900H would not. 1. Branching instructions: LCALL, LJMP, ACALL, AJMP, SJMP, JMP
@A+DPTR These unconditional branching instructions will execute correctly as long as the programmer
keeps in mind that the destination branching address must fall within the physical boundaries of the program
memory size (locations 00H to 7FFH for the 89C2051). Violating the physical space limits may cause
unknown program behavior. CJNE [...], DJNZ [...], JB, JNB, JC, JNC, JBC, JZ, JNZ With these conditional
branching instructions the same rule above applies. Again, violating the memory boundaries may cause
erratic execution. For applications involving interrupts the normal interrupt service routine address
locations of the 80C51 family architecture have been preserved. 2. MOVX-related instructions, Data
Memory: The AT89C2051 contains 128 bytes of internal data memory. Thus, in the AT89C2051 the stack
depth is limited to 128 bytes, the amount of available RAM. External DATA memory access is not
supported in this device, nor is external PROGRAM memory execution. Therefore, no MOVX [...]
instructions should be included in the program. A typical 80C51 assembler will still assemble instructions,
even if they are written in violation of the restrictions mentioned above. It is the responsibility of the
DEPARTMENT OF ECE,ATRI page no:
controller user to know the physical features and limitations of the device being used and adjust the
instructions used correspondingly.

Features

Compatible with MCS-51 Products


2K Bytes of Reprogrammable Flash Memory
Endurance: 1,000 Write/Erase Cycles
2.7V to 6V Operating Range
Fully Static Operation: 0 Hz to 24 MHz
Two-level Program Memory Lock
128 x 8-bit Internal RAM
15 Programmable I/O Lines
Two 16-bit Timer/Counters
Six Interrupt Sources
Programmable Serial UART Channel
Direct LED Drive Outputs
On-chip Analog Comparator
Low-power Idle and Power-down Modes

Pin Description

VCC
Supply voltage.
GND
Ground.

Port 1

Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provide internal pull-ups. P1.0 and P1.1
require external pull-ups. P1.0 and P1.1 also serve as the positive input (AIN0) and the negative input
(AIN1), respectively, of the on-chip precision analog comparator. The Port 1 output buffers can sink 20
mA and can drive LED displays directly. When 1s are written to Port 1 pins, they can be used as inputs.
When pins P1.2 to P1.7 are used as inputs and are externally pulled low, they will source current (IIL)
because of the internal pull-ups. Port 1 also receives code data during Flash programming and verification.
DEPARTMENT OF ECE,ATRI page no:

Port 3

Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with internal pull-ups. P3.6 is hard-
wired as an input to the output of the on-chip comparator and is not accessible as a general purpose I/O pin.
The Port 3 output buffers can sink 20 mA. 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 also serves the functions of various special features of
the AT89C2051 as listed below:

Port Pin Alternate Functions


P3.0 RXD (serial input port)
P3.1 TXD (serial output port)
P3.2 INT0 (external interrupt 0)
P3.3 INT1 (external interrupt 1)
P3.4 T0 (timer 0 external input)
P3.5 T1 (timer 1 external input)

Port 3 also receives some control signals for Flash programming and verification.

RST
Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the RST pin high for
two machine cycles while the oscillator is running resets the device. Each machine cycle takes 12 oscillator
or clock cycles.

Each machine cycle takes 12 oscillator or clock cycles. 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 Figure 1. Either a quartz c r y s t a l or ceramic
DEPARTMENT OF ECE,ATRI page no:
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. 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 flip-
flop, but minimum and maxim u m voltage high and low time specifications must be observed.

Port 3 also receives some control signals for Flash programming and verification. RST Res et input.
All I/O pins are reset to 1s as soon as RST goes high. Holding the RST pin high for two machine cycles
while the oscillator is running resets the device.

CONCLUSIONS AND REFERENCES

The project work Traffic jam preventor on over bridge is aimed to sense the traffic that flowing
through fly-over. Due to any reason if entered vehicles over fly-over are more then the leaving vehicles,
then there may be a chance that traffic may stick over the fly-over. Often traffic jams over the fly-over
continuous for long period, because the vehicles trapped over fly-over remains as it is, they will not find
another way to escape, therefore intelligent sensor based traffic control systems are essential for fly-over
bridges. In this regard this project work is taken up, a prototype module is constructed for live
demonstration, and results are found to be satisfactory.

REFERENCES

While designing and fabrication of this project work, we studied following few books related to ATMEL
microcontrollers.

(1) The 8051 Micro-controller Architecture, programming & Applications


By: Kenneth J. Ayala
(2) Programming and Customizing the 8051 Micro-controller
By: Myke Predko
(3) The concepts and Features of Micro-controllers
By: Raj Kamal
(4) Digital Principles and Applications
By ALBERT PAUL MALVINO And DONALD P. LEACH

You might also like