1、 题目:题目: 交通灯单片机课程设计交通灯单片机课程设计 学院:学院: 物理与电子学院物理与电子学院 摘摘 要要: 本系统采用美国 ATMEL 公司生产的单片机 AT89S51,以及其它芯片来设 计交通灯控制器。本方案为了简化对路口的操作,采取了四相位对称(不对称) 放行的方式进行控制。实现了通过 AT89S51芯片的 P0口和 P2口中的 P2.0-P2.4 口控制数码管的显示功能,用 P1 口控制红、绿、黄灯点亮的功能及上电时通过 P1 口中的 P1.0-P1.4 口接按键实现方案选择功能。用 P1 口和 P3.0-P3.1、P3.6- P3.7 模拟路口红绿灯情况并及人行道红绿灯情况。使
2、用外部中断进入修改参数 状态和紧急状态,修改参数使用 P1.4-P1.7(按键分别是相位选择,加一,减一 及确定修改功能) 。系统实用性强、操作简单、扩展性好。 关键词:关键词:AT89C51、单片机、交通信号灯、单片机、交通信号灯 Abstract: The system used by the U.S. company ATMEL microcontroller AT89S51, as well as other chips to design traffic light control. To simplify the programs operation of intersection
3、, take a four-phase symmetric (asymmetric) controlled release manner. Achieved through the AT89S51 chip port P0 and P2 in the mouth of the P2.0-P2.4 port to control the digital tube display, with the P1 port to control the red, green and yellow light on the function and power through the mouth of th
4、e P1 P1 .0-P1 .4 port access key implementations options. With the P1 port and P3.0-P3.1, P3.6-P3.7 analog intersection traffic lights and sidewalks and traffic lights of the situation. Modify parameters using external interrupt status and enter a state of emergency, to modify parameters using the P
5、1.4-P1.7 (respectively, phase selection buttons, plus one, minus one, and determine the modified functions). System is practical, simple and good scalability. Keywords: AT89C51, single-chip, traffic lights 目录 前言: 4 实验开始: 4 1.设计任务 4 2.设计方案 5 2.1 任务分析 5 2.2 方案设计 5 2.3 硬件方案 5 2.4 软件方案 6 3 系统组成 8 AT89S5
6、1 芯片 8 LED 灯 . 11 蜂鸣器. 12 4程序设计 13 4.1 Altium Designer 原理 . 13 4.2 Proteus 仿真图 . 13 4.3 PCB 板 . 14 4.4 程序 . 14 5 实物. 19 6 心得体会. 21 前言:前言: 随着社会经济的发展,城市交通问题越来越引起人们的关注。人、车、路 三者关系的协调,已成为交通管理部门需要解决的重要问题之一。城市交通控 制系统是用于城市交通数据监测、交通信号灯控制与交通疏导的计算机综合管 理系统,它是现代城市交通监控指挥系统中最重要的组成部分。 同时也随着城市机动车量的不断增加,许多大城市如北京、上海、南京等 出现了交通超负荷运行的情况,因此,自 80 年代后期,这些城市纷纷修建城市 高速道路,在高速道路建设完成的初期,它们也曾有效地改善了交通状况。然 而,随着交通量的快速增长和缺乏对高速道路的系统研究和控制,高速道路没 有充分发挥出预期的作用。而城市高速道路在构造上的特点,也决定了城市高 速道路的交通状况必然受高速道路与普通道路耦合处交通状况的制约。所以, 如何采用合适的控制