摘要
交通灯安装在各个路口上,成为疏导交通工具有效的手段,单片机是微型计算机的一个重要分支,特别适用于控制领域,故又称为微控制器,对基于单片机的交通灯控制系统进行了设计。本系统采用美国ATMEL公司生产的单片机AT89S51,以及其它芯片来设计交通灯控制。实现了通过AT89S51芯片的P1口设置红、绿灯点亮的功能,通过AT89S51芯片的RXD、TXD输入、输出设置显示时间。单片机系统采用的直流供电。系统功能为:以MCS-51系列单片机作为控制核心,设计并制作交通灯控制系统,东西南北四个方向具有直行通行指示灯。
在对系统功能分析的基础上,提出了三种设计方案,经比较,选择性能较优的LED动态循环显示方案进行了设计。设计包括硬件和软件两大部分。硬件部分包括单片机时钟电路、时间显示、交通灯显示,报警模块等部分。选用Atmel公司的AT89S51单片机作为控制核心,东西南北四个方向设置了LED时间显示和交通灯显示,时间显示采用二位LED显示器,交通灯显示则采用红绿黄单色高亮发光二极管来模拟。软件采用了模块化的设计方法,主要分为主程序、定时器中断服务子程序、倒计时显示子程序、交通灯模拟显示子程序四部分。
关键词: 交通灯;单片机;AT89S51
Abstract
Traffic light control system based on SCM (Single Chip puter) is designed in this paper. System requires that MCS-51 series SCM is used as CPU. Traffic light control system should be designed and made .There are four groups light which indicate to turn left, turn right, and go straight ahead and pedestrian access in east, west, north and south four directions. Timer shows traffic conversion remainder time. When special vehicles, such as 119,120 go through, the system can automatically allow special vehicles running and other vehicles is prohibited.
Based on analysis of the system functions, three schemes are put forward .parison, LED dynamic cycle display scheme has better functions and it is selected to be designed. The design includes hardware part and software part. Hardware has three parts .They are SCM system, LED time display, traffic lights. AT89S51 SCM is selected as control CPU. LED display and traffic lights are set in east, west, north and south four directions. Three LED monitors are used to show time. Highlight and red-green two color traffic lights are used as traffic lights. Software is designed by module. It is divided into main program, timer interrupting service subroutine, LED display subroutine, traffic display subroutine.
Key words: Traffic light; SCM; AT89S51
目录
摘要 I
1、绪论 1
课题背景 1
1
1
课题内容 2
2
2
2、系统工作原理及设计方案 3
设计原理 3
4
单片机的简单交通灯控制设计 来自淘豆网m.daumloan.com转载请标明出处.