摘要
基于STC89C52单片机设计一十字路口的交通灯控制电路,实现十字路口两条交叉道路上的车辆交替运行,主道南北方向每次通行50s,干道东西方向通行时间为30s,并以数码倒计时的方式对时间进行显示,倒计时5s时,切换到黄灯闪烁。由单片机I/O口P2.6和P2.7作为数码管位选开关实现动态扫描,P0口用于段选,用来显示数码管数据,从而实现十字路口交通灯的自动切换。黄灯闪烁时,蜂鸣器报警进行提示,当有紧急情况时,操作人员可通过紧急按钮强行控制主道或干道通行,通行时间均为80s。该交通灯系统设计具有周期短、实用性强、操作简单、维护方便、扩展功能强等优点。
Traffic lights control circuit at the crossroads,which based on STC89C52 MCU.To achieve alternate intersection on the road of a cross,the traffic lights give vehicles on the north-south main road 50 seconds to pass while vehicles on the east-west main road will be given 30 seconds to pass.The time is displayed in digital countdown mode,which switch to amber flashing after 5 seconds.By using P2.6&P2.7 interfaces in MCU as a digital tube switch to achieve dynamic scanning,it realizes automatic switch on crossroads traffic lights with P0 interface to show LED data.When yellow lights flashing,the alarm sounds and the operator could control the trunk to 80 seconds with the emergency button.
出处
《工业控制计算机》
2017年第6期138-139,共2页
Industrial Control Computer