application system
2.1 is the smallest application system
In the system, a reset circuit, clock circuit and single chip microcomputer 51minimum application system, so that the traffic control system can work normally. The reset circuit reset by button, as shown in figure 2.
2.2 digital time display circuit
The seven LED digital tube is composed of eight light emitting diodes which, through to the pins of different level, thus showing 0~ 9 figures and the decimal point,dab4d55ck through one of four digital tube and pass through the P3 port of P3.0and P3.1and the STATIC DISPLAY module to control digital tube display of time, as shown in figure 2.
2.3signal lamp circuit design
The circuit design, application of SCM P2 port of P2.1 ~P2.6through the 7405 chip to control the12 light emitting diode simulated traffic lights work, including P2.1, P2.2, P2.3 respectively through 7405 to control A road light, yellow light and the red light, P2.4, P2.5, P2.6 respectively through 7405 to control B road light, yellow light and the red light. Using anode connection way, so when P2.1~ P2.6corresponding to output high level after 7405inverted into low level corresponding to the light emitting diode light.
According to the above each part of the system circuit design,coriolus versicolor this paper designs the complete system circuit diagram as shown in figure 2.
The 2.4control switch
When the need according to the real-time traffic jam of artificial control or in case of emergency, switch to control function, and can make various transport back to the initial state.
3 software design
The main program to complete the traffic light system initialization, the trunk and branch to the normal conversion work, in this system, due to the seven LED Light manufacturer digital tube display traffic countdown time, in the main program, are called the three subroutines, is a delay subroutine, delay in500ms, with one register to count cycles, cycle 2 times, to achieve timing1 s, respectively, for the lights to call time call time, digital tube display, a display subroutine, used to display the trunk and branch channel time, another is the interrupt program. The main program flow diagram as shown in figure 3.
The system uses two to achieve interruption of traffic light controller functions.
Set the INT0 external interrupt, the interrupt is used to deal with an emergency, when the traffic light controller failure or traffic in case of a serious accident to blocked roads,LED Bulb Manufacturer called the interrupt, the main road branch road and the traffic lights are red20 s. The interrupt having the highest priority level.
Set the INT1 external interrupt, the interrupt is used for processing according to the main road and a road vehicle real-time traffic condition much practiced extended time traffic, traffic delay30s.