0% found this document useful (0 votes)
20 views

Design of Traffic Light System Based On Proteus Si

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Design of Traffic Light System Based On Proteus Si

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

3rd International Conference on Mechanical Engineering and Intelligent Systems (ICMEIS 2015)

Design of Traffic Light System Based on Proteus Simulation


Xuexuan Cai
North China Electric Power University, Baoding, 071000, China

Keywords: proteus simulation software,traffic light system

Abstract. Based on the proteus simulation software, the paper realizes the individual timing and
separated control on the transportation of Channel A and B with the 8254 counter and 8255
programmable parallel interface. The method of timing plus interruption control is adopted to count
the passing time of vehicles in two directions separately, which enables the convenient change of
passing times in two directions.

1. Design Scheme
1.1 Display of traffic lights under normal operation
The intel 8255A opening is used for display, leaving the PA7 and PA6 unused. The PA0, PA1
and PA2 respectively control the green light, yellow right and red light of Channel A, while the
PA3, PA4 and PA5 differently control the green light, yellow right and red light of Channel B.
Then, situation 1: when green light is in Channel A and red light in Channel B, 00100001B should
be output in the 8255A opening; situation 2: when yellow light is in Channel A and red light
in Channel B, 00100010B should be output in the 8255A opening; situation 3: when red light is in
Channel A and green light in Channel B, 00001100B should be output in the 8255A opening;
situation 4: when red light is in Channel A and yellow light in Channel B, 00010100B should be
output in the 8255A opening.
As to the time control, the frequency generator of counter 0 and working method 2 is used in the
counter/ timer 8253. As the CLK0 pin receipts the 1MHz clock signal and the A8253 inputs 50000
(note: it is stipulated that the lower eight ones should be input before the higher eight ones in the
programming), the result after calculation is just 0.05 seconds. The output of counter 0 is received
by the clock signal of counter 1, which is working on the method 0: the counting will stop until the
counter 0 finishes the method of outputting the jumping signals. As the counter 0 and 1 are counting
in concatenation, the intended time can be controlled only by writing the value of counter 1 into the
main program and the output of counter 1 will be received by PC0. For example, the situation 1 will
maintain 25s without outside interruption and the B8253 should be input 500, namely 01100100B,
with 0 in the higher eight ones. Situation 3 is the same with situation 1, while situation 4 is the same
with situation 2. The query working method is adopted in timing. In the ending of the counting, the
output 1 of PC0 means entering into the next working condition and 0 means continuing the query.
1.2 Breaking off the switch in the state of emergency
During the process of simulation design, the emergency state of the switch simulation should be
connected to PC1. In the state of emergency, PC1 will be low. The query working method is
adopted in the foregoing situations of the display lights of the counter. The examination on whether
the situation of the PC1 is 0 is added in the process. If the output is 1, the query will be continued; if
the output is 0, the interrupt program will be conducted. If the interrupt program shows that red
light is in both Channel A and Channel B, the query working method will unceasingly check out the
situation of PC1 to find out whether it has recovered to be 1. If the situation becomes 1, the state of
emergency has been relived and the primary state can be carried on by returning the scene; if the
situation is still 0, the state of emergency isn’t relived and the lights should be kept red.

© 2015. The authors - Published by Atlantis Press 1


2. Debug Results
After the debug, the light display will be in cycle operation. If the green light of Channel A is
interrupted, the red light of Channel A and B will be bright after the switch is pressed. The primary
operation situation will be recovered when the switch is regained to Channel A and Channel B.
The results of debug are as follows:

Figure 1 Green light in Channel A and red light in Channel B

Figure 2 Yellow light in Channel A and red light in Channel B

Figure 3 Red light in Channel A and green light in Channel B

2
Figure 4 Red light in Channel A and yellow light in Channel B
Brief description on the debug results:
(1) Figure 1 means Channel A is allowed to pass as there is green light but it is forbidden to pass
Channel B as there is red light.
(2) Figure 2 means that the 25s for green light in Channel A is up, the green light turns into
yellow light reminding the coming of red light in the direction and red light is still in Channel B to
forbid passing.
(3) Figure 3 means that the 5s for yellow light in Channel A is up, it will turn into red light to
forbid passing and there is green light in Channel B to allow passing.
(4) Figure 5-4 means that the 25s for green light in Channel B is up, it turns into yellow light
reminding the coming of red light in the direction and red light is still in Channel A to forbid
passing.
(5) The 5s is up and the system recovers to the primary state, namely, green light in south-north
direction to allow passing and red light in Channel B to forbid passing, as shown in the following
Figure. Based on the 60s cycle, the working functions of traffic lights are realized.
(6) In case of emergencies, the button can be pressed to make red light on in both Channel A
and Channel B, which is shown as follows:

Figure 5 Red Light in both Channel A and Channel B

3. Summary
The paper conducts examination and simulation on the designed traffic system based on the
proteus simulation software. By the simulation exercises, the functions of pins in 8086 chips can be
understood more profoundly, such as how to use 8255 programmable parallel interface chips, how
to take advantage of 8253 to make timing or output the pulses of certain frequency and how could
the 8259 produce maskable interruption, etc. After the comparison between the simulation and the
practical wirings and some slight adjustments on the program, the simulative traffic light system is
easily built on the experiment box.

3
References
[1] Hong Yongquan. Microcomputer Principles and Interfacing Techniques [M]. Beijing: Science
Press, 2009
[2] Xu Zeming. Control Traffic Lights by Microcomputer [J]. Software Guide, 2007 (5)
[3] Xiang Xinjian. Microcomputer Traffic Light Control System [J]. ASPT Source Journal, 1997 (09)

You might also like