1、 毕业设计毕业设计 基于单片机的交通灯设计的设计与实现基于单片机的交通灯设计的设计与实现 学生姓名学生姓名 学学 号号 所所 在在 系系 电子工程系电子工程系 专业名称专业名称 应用电子技术应用电子技术 班班 级级 20092009 级级 指导教师指导教师 二一一年五月二一一年五月 42 I 基于单片机的交通灯设计的设计与实现 内容摘要:随着全球城市化进程加快,机动车的数量越来越多,造成城市交通上 得各种问题如何控制好城市交通已成为一个全球化的问题。交通灯的出现使得交通得以 有效管制,对于疏导交通量,提高道路通行能力,减少交通事故有明显效果。 单片机是由运算器、控制器、存储器、输入设备以及输出
2、设备共五个基本部分组成 的。单片机是把包括运算器、控制器、少量的存储器、最基本的输入输出口电路、串行 口电路、中断和定时电路等都集成在一个尺寸有限的芯片上。 通常,单片机由单个集成电路芯片构成,内部包含有计算机的基本功能部件:中央 处理器、存储器和 I/O 接口电路等。因此,单片机只需要和适当的软件及外部设备相结 合,便可成为一个单片机控制系统。 本系统采用MCAS-51 系统单片机来设计交通灯控制器,实现各个方向的车辆、行人 轮流通行的功能,此外还设置了人性化倒计时显示。同时还具有南北、东西方向强制通 行的功能。各个方向红绿灯由P1口控制,倒计时显示数码管由P2口控制,强制通行靠中 断来实现
3、。系统用74LS245用来驱动LED灯和数码管显示。本系统使用性强操作简单、扩 张功能强、便于维护。 关键词:单片机 交通灯 数码管 倒计时 42 II Based on SCM traffic lights design of design and implementation Abstract:Abstract: With the global of urbanization, the number of motor vehicles, more and more cities have all kinds of traffic caused problem how to control
4、the urban traffic has become a global problem. The traffic light appears make traffic to effectively control, for counseling traffic, improve road capacity, reduce traffic accidents have obvious effect. A single chip computer is by unit, controller, memory, input and output devices were equipment fi
5、ve basic parts. The single chip computer is including unit, controller, a small amount of memory, the most basic input output circuit, a serial port circuit, interrupt and timing circuits are integrated in a limited size of the chip. Usually, the SCM by a single integrated circuit chip structure, in
6、ternal contains the basic function of computer parts: the central processor, memory and I/O interface circuit, etc. Therefore, SCM only need and the appropriate software and external equipment combination, can become a single-chip microcomputer control system. The system USES MCAS-51 single-chip microcomputer system to designing traffic light controller, realize every direction vehicles, pedestrians passage in turn function, in addition is also equipped with humanizatio