Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
using 8085
AIM:
The main aim of this project is to
design a Traffic light controller using
8085 microprocessor.
The 8085 Microprocessor is
a popular Microprocessor used in
Industries for various applications.
Such as traffic light control,
temperature control, stepper motor
control, etc. In this project, the
Experimental setup: -
traffic lights are interfaced to
Microprocessor system through
buffer and ports of programmable In order to implement the Intelligent
peripheral Interface 8255. So the Traffic Signal Simulator, one needs to
traffic lights can be automatically setup and assemble the hardware
switched ON/OFF in desired components and write a program to
sequence. The Interface board has control the intelligent traffic signal
been designed to work with parallel simulator. The layout of the Intelligent
port of Microprocessor system. Traffic Signal Simulator is displayed in
Figure 1. The blocks, which are labeled
The hardware of the system consists N1, N2, N3, E1, E2, E3, S1 and W1 are
of two parts. The first part is the infrared object detectors.
Microprocessor based system with
8085. Microprocessor as CPU and
the peripheral devices like EPROM,
RAM, Keyboard & Display
output by the microcontroller. In each
Hardware components:- lane, there are three LEDs according to
traffic lights colors which consist of red,
yellow and green. Moreover, two
The traffic light system consists of four inverters were used in order to connect
important components: the controller the output of green and red LEDs
which is the brain to the system, the together. Therefore, when the green
sensors which detect the presence of LED is ON then the red LED will be
vehicles, the light emitting diodes. OFF and vice-versa. Figure 3 shows the
(LED) which act as the actuator and the connection of the input and output ports
countdown timers which is displayed in to sensors and LEDs. The BS2
Lab VIEW. BASIC STAMP 2 (BS2) is microcontroller has 16 Input and Output
used as the microcontroller of the traffic ports. The ports were divided into 8
signal. The BS2, which needs to be input and 8 output ports. The output
plugged to the Board of Education ports, which are from P0 to P7, give
(BoE), is directly attached to the either logic 0 or 1 to the LEDs.
computer in order to program it. The Meanwhile, the input ports, which are
wiring for the output and input signals is from P8 to P15, receive input signal
done from this board. Figure 2 shows the from the sensors.
Board of Education to which a 9V DC
power is supplied. There is also a DB9
connector, that is connected to the COM Software simulation: -
port of computer using RS-232 serial
cable, for BS2 programming and serial After the hardware had been setup, a
communication during runtime. program written in the BASIC
Next to the BS2, there is a breadboard. programming language in the BASIC
The breadboard has many strips of STAMP editor is downloaded into the
copper, which run underneath the board microcontroller. The simulation of the
in a horizontal fashion. These strips algorithm of the traffic signal system
connect the sockets to each other. As for was done using MATLAB software.
the infrared object detector, SHARP Furthermore, the countdown timer
GP2D15 is used. The sensor task is to interfacing according to the traffic
detect the presence of vehicles. It is system using Lab VIEW software is
functioning continuously by giving a created using the BNC Adapter and he
logic 0 when there are no vehicles and Data Acquisition Card (DAQ) device.
logic 1 when there are vehicles present. The Lab VIEW programming is done in
Therefore, they can detect the length of the diagram using graphical source code.
the queue depending on where they are In the block diagram the program runs
placed. Each detector has a JST from left to right. If the green light in the
connector housing slot and three traffic model does not illuminate, the
crimped wires to use in the JST system goes into default since there is no
connector. The connectors are plugged input into the system. The signal from
into the appropriate housing slot and into the sensor is acquired through the DAQ,
the detector. The light emitting diodes which is connected, to the computer.
are used in order to show the traffic light
changing according to the program. The
LED light will change according to
Fig. 3: Connection of the input and
output ports to
sensors and LEDs
Implementation: -
DIAGRAM:-
26 pin
FRC cable
Stop PW
Stop PE
Stop PN Stop PN
Go PE
NORTH
Go PW
AD0-AD7 A0-A7 Go PN Go PN
8085 Latch 8255 Buffer
D0-D7
CPU PPI
Stop N
Warning W
Warning N
FL W
Go N
Stop W
System Bus
Warning E
FR N
ST N FL N
Stop E
FR E
8279
ST W
Anode driver
ST E
EAST
Display Display
Go W
Controller
FR W
FL E
Decoder
Keyboard
Cathode driver ST S
FL S FR S
Go S
Warning S
Stop PW
Stop PE
Go PE
Go PW
Stop S
Stop PS Stop PS
Go PS Go PS
SOUTH
Microcontrollers are often used for
logic-timer control. A traffic light
controller is a
simple example. The light patterns are
flashed on for a specified time using the
parallel or serial port. The time delays
can be generated using either software
(delay loops) or hardware (timer
facilities). For this particular example,
the software method is quite
appropriate. During lunchtime, there has
been excessive congestion in front of
Platt Dining Hall. Students headed north
and south bound in front of Platt have
nearly collided withunicyclists headed
east or west reading books or juggling
swords. No serious injuries have yet
occurred, but parents have been calling
Requirement:- the President demanding action. He has
directed Physical Plant to install a
Design a traffic light sequence simulator system of traffic lights at the intersection
using the MC68HC11 microcontroller controlling
and glue logic on your FPGA board. The east/west traffic and north/south traffic.1
traffic lights are to be built with colored Lights A control east/west traffic while
LEDs. Light patterns and delay times are lights B control north/south traffic.
to be read from a table, while the output
is to be sent to
six LEDs by the:
Microprocessor-Based
a) Parallel I/O Port B Systems ;-
b) Serial Peripheral Interface (SPI)
Your controller should be built with a
Types of System:- sequence descriptor and an interpreter.
In this way
The different types of system used for the control sequence may be changed at
solving traffic congestion problems are: any time to better accommodate traffic
1. Fuzzy Expert System conditions.
2. Artificial Neural Network The sequence descriptor is an entry in a
3. An Intelligence Decision-making table containing the light pattern and
system for Urban Traffic-Control duration. In order to have a variable
(IDUTC) length table, a null entry (pattern of 0
and duration of 0 sec) can be designated
as the end of the table, for this will never
be part of the sequence.
Discussion:- The interpreter is a program that reads
values from the sequence descriptor
table. The interpreter sends light patterns
for the specified durations. The 1) Configure the data direction register
interpreter should have a delay for port D (DDRD)
subroutine to waste exactly 1 second. 2) Configure the control register (SPCR)
The delay time read from the table is 3) Read the status register to clear any
used to count out the number of times flag that is set (SPSR)
the “1 second delay” subroutine is 4) Write a pattern to the data I/O register
executed. Your delays should meet a +/- (SPDR)
5% tolerance. 5) Repeat steps 3 and 4 as needed
For the experiment, the following Remember that bit 5 of the DDRD must
sequence descriptor is suggested: be high or SSbar must be tied high with
Pattern an external resistor to avoid looking for
North-South East-West errors when MISO is not used.
Duration When connecting to the Berg strip from
red green 15 the HC11 board, be very careful not to
red yellow 3 short adjacent pins with wires or careless
green red 10 handling of a probe. This is a likely
yellow red 2 cause of damage to many boards in the
null null 0 past. It is very difficult to debug your
Write your code in assembly language project when you do not know if the
using a text editor and assemble it using failure is coming from your code or from
the AS11 a damaged board.
program. Experiment with the –l flag to
produce a listing of the code showing the
opcodes alongside your assembly
CONCLUSION
language statements.Listing handy
An intelligent traffic light system
during debug is often useful. Download
had successfully been designed
the .s19 output file to the EVB to test
and developed. The sensors
your program.
Use good coding practice on your were interfaced with Lab VIEW
assembly language programs. Comment integrated system. This
your code thoroughly. Use EQU interface is synchronized with
statements to define port addresses. the whole process of the traffic
Control the North-South lights with data system. This prototype can
coming over Port B and control the East- easily be implemented in real
West lights with data coming over the life situations.
SPI. When the SPI is used, you will need Increasing the number of
an 8-bit serialin parallel-out shift register sensors to detect the presence
to capture the data. You can build such a of vehicles can further enhance
shift register on your FPGA. You are the design of the traffic light
free to use either Verilog or schematic system. Another room of
entry. The programming ritual for the improvement is to have the
SPI is reviewed below. You should infrared sensors replaced with
carefully study the 68HC11 reference an imaging system/camera
manual for more information or look at system so that it has a wide
some of the examples in other HC11 range of detection capabilities,
books. which can be enhanced and
ventured into a perfect traffic
system.
PROCEDURE:-