摘 要
根据STC10F04单片机的特点及交通灯在实际控制中的特点,本文提出一种用单片机自动控制交通灯及时间显示的方法。同时给出了软硬件设计方法,设计过程包括硬件电路设计和程序设计两大步骤,对在单片机应用中可能遇到的重要设计问题都有涉足。本文对十字路口状态预设为三种,一种是正常状态,一种是紧急状态,另一种是方程式状态。增设路段遇忙调整时方程式控制状态和紧急情况处理模块,通过手动控制开关按钮A0和A1方便系统在正常状态和紧急状态、方程式控制间来回切换,进一步完善了交通灯控制系统。并分别用红、黄、绿灯的不同组合来指挥两个方向通车与禁行,用LED数码管作为倒计时指示,实时的控制当前交通灯时间使LED显示器进行倒计时工作并与状态灯保持同步,在保持交通安全的同时最大限度的提高交通能顺畅交替运行。本文介绍了控制基本原理以及控制的表现,同时,论述了系统中交通现状、交通管理、交通规则及背景信息。
关键词:自动控制,时间显示器,外部中断,延时,方程式控制
Abstract
According to the characteristics of single-chip STC10F04 and traffic lights in the actual control of the characteristics of this paper, a single-chip automatic control with traffic lights and the method of time display. At the same time, given the hardware and software design methodology, design process, including the hardware circuit design and program design two major steps in the single-chip applications that may be encountered in the design of the important issues are involved. In this paper, the default state of the crossroads for three, one is the normal state is a state of emergency, and the other is a state formula. Additional sections of busy status adjustment formula and an emergency control module Through the manual control switch button convenience A0 and A1 system in the normal state and a state of emergency, the equation between the control switch back and forth, and further improve the traffic light control system. And were red, yellow and green light to direct different combinations of traffic in both directions and cut-line, with LED digital tube as a countdown to the instructions, real-time control of the current time for traffic lights to LED countdown display work and to keep pace with the state of light in the to maintain safety while minimizing the increase in traffic to alternate running smoothly. This paper introduces the basic principles of control, as well as the performance of control at the same time, traffic on the system status, traffic management, traffic regulations and background information.
Key words: automatic control; time display; external interrupt; delay; control equation
目 录