In recent years, with the rapid development of science and technology, the application of single-chip microcomputers is becoming more and more in-depth, while driving the traditional control and detection technology to be updated day by day. In the single-chip microcomputer application system of real-time detection and automatic control, the single-chip microcomputer is often used as a core component. Only the knowledge of single-chip microcomputer is not enough, and it should be improved according to the specific hardware structure and the combination of software and hardware. At the intersection, vehicles shuttle, pedestrians are bustling, and the lanes and sidewalks are orderly. So what can achieve this orderly order? It depends on the automatic command system of traffic lights. There are many ways to control traffic lights. This system uses the MSC-51 series single-chip microcomputer ATSC51 and the programmable parallel I/O interface chip 8255A as the core components to design a traffic light controller, which realizes the function of setting the red and green light lighting time through the P1 port of the 8051 chip according to the actual traffic flow; the red and green lights are cycled, and the yellow light flashes as a warning when there are 5 seconds left in the countdown (the traffic light signal is output through the PA port, and the display time is directly output to the double-digit digital tube through the PC port of the 8255); vehicles running red lights alarm; the green light time can detect traffic flow and can be displayed through the double-digit digital tube. This system is highly practical, simple to operate, and has strong expansion functions. Program source code ORG 0000H; Entry address of the main program LJMP MAIN; Jump to the beginning of the main program ORG 0003H; Interrupt program entry address of external interrupt 0 ORG 000BH; Interrupt program entry address of timer 0
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore