当前位置:首页 > 交通灯单片机课程设计报告
单片机原理及应用 课程设计报告
题 目:交通灯控制系统的设计 专 业:电子信息工程 年 级:2010级 学 号: 学生姓名: 联系电话: 指导老师:曾繁政
2013 年 5 月 17
完成日期:日
交通灯控制系统的设计
摘 要
利用STC89C51,晶振,数码管,按键等元件,制作一个简易的程序控制的交通灯,
实现对南北东西路口的倒计时控制,同时用ST188与比较器LM393构成电路,可以实现对车流量的检测,本系统实现了通过P2口设置红、绿灯点亮时间的功能。红绿灯循环点亮,倒计时剩5秒时黄灯闪烁警示(交通灯信号通过P1口输出,显示时间通过P0口输出至两位数码管)。经测试,系统达到课程设计的基本要求的要求,具有计周期短、可靠性高、实用性强、操作简单、维护方便、扩展功能强等优点。 关键词:STC89C51,LM393,ST188,定时器,中断。
ABSTRACT
Using STC8951crystals,digital tube,elements such as buttons, make a simple program
I
control of traffic lights, countdown of north-south thing intersection control,at the same time with ST188and comparator LM393 circuit, can realize the traffic detection, this system real- ized through P2 port setting the function of red and green light burning time; Lit cycle traffic lights, countdown with 5 seconds left yellow lights flashing warning (The traffic light signal through P1 port output, display time by P0 mouth output to two digitals tube) . After testing , the system to achieve the requirement of the basic requirements of the curriculum excogitat- ion, with meter shorter in high reliability strong practical operation simple maintenance and convenient extension function, etc.
Key Words: STC8951, ST188,LM393,reset circuit, timer, interrupt.
摘 要 ................................................................. I ABSTRACT .......................................................... I
II
1设计要求及方案选择.................................................. 1
1.1设计要求 ......................................................... 1 1.2方案选择 ......................................................... 1
2理论分析与设计 ...................................................... 1
2.1交通灯控制系统的总电路的分析及设计 ............................... 1 2.2单片机交通控制系统的基本构成及原理设计 ........................... 4
3电路设计 ............................................................. 5
3.1总原理图电路设计 ................................................. 5 3.2最小系统电路设计 ................................................. 8 3.3按键电路设计 ..................................................... 9 3.4车流量控制电路设计 ............................................... 9 3.5数码管显示电路设计 .............................................. 11 3.6红绿灯显示电路设计 .............................................. 12 3.7软件的设计 ...................................................... 12
4系统测试 ............................................................ 14
4.1调试所用的基本仪器清单 .......................................... 14 4.2仿真调试 ........................................................ 14 4.3硬件电路调试 .................................................... 14 4.4测试结果分析 .................................................... 15
5总结 ................................................. 错误!未定义书签。 参考文献 .............................................................. 16 附录 ................................................... 错误!未定义书签。
III
共分享92篇相关文档