(完整版)基于单片机的十字路口交通灯设计毕业设计

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

以下文档格式全部为word格式,下载后您可以任意修改编辑。

摘要

近年来随着科技的飞速发展,单片机的应用正在不断深入,同时带动传统控制检测技术日益更新。在实时检测和自动控制的单片机应用系统中,单片机往往作为一个核心部件来使用,仅单片机方面知识是不够的,还应根据具体硬件结构软硬件结合,加以完善。

十字路口车辆穿梭,行人熙攘,车行车道,人行人道,有条不紊。那么靠什么来实现这井然秩序呢?靠的就是交通信号灯的自动指挥系统。交通信号灯控制方式很多。本系统采用MCS-51系列单片机AT89C51为中心器件来设计交通灯控制器,实现了能根据实际车流量通过8051芯片的P3口设置红、绿灯燃亮时间的功能;红绿灯循环点亮,倒计时剩5秒时黄灯闪烁警示(交通灯信号通过P1口输出,显示时间通过P0口输出至双位数码管)。本系统设计周期短、可靠性高、实用性强、操作简单、维护方便、扩展功能强。

关键词:单片机;交通灯

Abstract

In recent years, with the rapid development of science and technology, the application of SCM is going deep, driving the traditional detection techniques to renew day by day. In the real-time examination and in the automatic control monolithic

integrated circuit application system, the monolithic integrated

circuit often took a core part uses. The monolithic integrated

circuit aspect knowledge is only insufficient, but should also act according to the concrete , to be improved.

The intersection vehicles shuttle, the pedestrian is bustling,

car dealership traffic lane, person sidewalk, methodical. Then depending on what to realizes this orderly order? the traffic

lights on the automatic control system. There are great number kinds

of modes to control the traffic lights. The system uses a series

of MCS-51 as the center AT89C51 single-chip device designed to

control the traffic lights, so as to realize the function of setting

red, green light time by 8051 chip’s P3 port according to the actual

traffic flows, lighting the red-light and green-light by turn and

lighting the yellow-light to warm while 5 seconds left(outputting

the traffic light signal by P1,outpuing the time by P0 and showing

the time on double-digits nixie tube). Short of the design cycle, ,

easy maintenance, the expansion of powerful is this system.

Key words:SCM; MCU; traffic light

目录

中英文摘要························1 设计要求·························2设计目的·························3 方案比较、设计与论证···················

4 原理分析·························

4.1 交通灯显示时序的理论分析···············

4.2 交通灯显示的理论分析·················

5 程序设计流程图······················

6 总体设计与电路图·····················

6.1 芯片选择·······················

6.2 设计电路图 (1)

6.3 PROTEUS仿真图: (1)

6.4 交通灯程序 (1)

7 仿真测试、数据及结果分析 (1)

8 总结与展望 (1)

致谢 (2)

参考文献: (2)

附录 (2)

1 设计要求

1.1 程序开始运行先南北段通行、东西段禁止60s,后东西段通行、南北

段禁止60s,依此循环。

1.2 系统分三种工作模式:正常模式、繁忙模式、特殊模式,并且通过

三个按钮“正常”、“繁忙”、“特殊”可相互转化。

1.3 正常模式:

直行时间显示数码管显示60。此时南北段直行通行(绿灯)、东西段禁止(红灯)40s,南北段人行道通行(绿灯),东西段人行道禁止(红灯),同时南北段和东西段方向的数码管分别从40s和60s开始倒计时,至最后5s时南北段绿灯变成黄灯闪烁;此后南北段左拐(左拐灯亮)通行、东西段禁止(红灯)20s,南北段、东西段人行道都禁止(红灯),同时南北段和东西段方向的数码管都从20s开始倒计时,至最后5s时南北段左拐灯变成黄灯闪烁;再后东西段直行通行(绿灯)、南北段禁止(红灯)40s,东西段人行道通行(绿灯),南北段人行道禁止(红灯),同时东西段和南北段方向的数码管分别从40s和60s开始倒计时,至最后5s时东西段绿灯变成黄灯闪烁;最后东西段左拐(左拐灯亮)通行、南北段禁止(红灯)20s,东西段、南北段人行道都禁止(红灯),同时东西段和南北段方向的数码管都从20s开始倒计时,至最后5s时东西段左拐灯变成黄灯闪烁。

1.4 繁忙模式:

繁忙指示灯亮,南北段、东西段的通行时间改为45s,其中左拐的时间改为15s,其它与正常模式类似。

1.5 特殊模式:

特殊模式灯亮,南北段、东西段的通行时间改为75s,其中左拐的时间改

为20s,其它与正常模式类似。2设计目的

2.1 了解交通灯管理的基本工作原理

2.2 熟悉AT89C51的工作原理和应用编程

2.3 熟悉AT89C51并行接口的各种工作方式和应用

2.4 熟悉AT89C51计数器定时器的工作方式和应用编程外部中断的方法2.5 掌握多位LED显示问题的解决3 方案比较、设计与论

相关文档
最新文档