Description:
I. experimental purpose
Through parallel interface 8255, the simulation control of intersection traffic lights is realized, and the use of parallel port is further mastered.
2. Experimental contents
As shown in figure 8-1, L7, L6 and L5 are connected with PC7, PC6 and PC5 as the traffic lights of the north-south intersections. The traffic lights of L2, L1 and L0 are connected to PC2, PC1 and PC0 as the traffic lights of the intersections. Programmed to light up the six lights according to the traffic light.
3. Programming tips: changing rules of traffic lights at intersections:
(1) the green light at the intersection and the red light at the intersection will be brighter for 30 seconds.
(2) the yellow light of the north-south intersection flashes a number of times while the red light at the intersections continues to light.
(3) at the red light at the intersection, the green light at the intersection will be brighter for 30 seconds.
(4) the red light in the north-south intersection continues to light and the yellow light on the intersections flashes several times.
(5) turn (1) repeat.
To Search:
File list (Check if you may need any files):