单片机交通灯设计论文.doc

约48页DOC格式手机打开展开

单片机交通灯设计论文,2.5万字 48页摘 要根据8051单片机的特点及交通灯在实际控制中的特点,本文提出一种用单片机自动控制交通灯及时间显示的方法。同时给出了软硬件设计方法,设计过程包括硬件电路设计和程序设计两大步骤,对在单片机应用中可能遇到的重要技术问题都有涉足。本文对十字路口状态预设为两种,一种是正常状态,另一种是...
编号:10-4086大小:663.00K
分类: 论文>通信/电子论文

内容介绍

此文档由会员 space 发布

单片机交通灯设计论文
2.5万字 48页


摘 要

根据8051单片机的特点及交通灯在实际控制中的特点,本文提出一种用单片机自动控制交通灯及时间显示的方法。同时给出了软硬件设计方法,设计过程包括硬件电路设计和程序设计两大步骤,对在单片机应用中可能遇到的重要技术问题都有涉足。本文对十字路口状态预设为两种,一种是正常状态,另一种是故障或紧急状态,并分别用黄、红、绿色灯的不同组合来表示。本文介绍了控制基本原理以及控制的表现,同时也介绍了城市交通信息系统的设计目标, 开发途径及其系统结构与功能和数据地理编码、建库, 同时, 论述了系统中交通现状、交通管理、交通规划及背景信息查询模块的建造及应用。介绍了用于城市交叉路口的三色程控交通信号时间显示器的研制方案,对其电源供电、发光二极管构成的负载结构、灯色时间检测都给出了精巧合理的优化结构,大幅度地提高了产品可靠性并降低了制造成本。


关键词:8051单片机;交通灯;自动控制;时间显示器;软件;硬件;定时器;延时;外部中断


Abstract

According to the feature of SCM8051 and the characteristics of traffic lights in real control,the article puts forward the method of using sigle-chip microcomputer to control automatically the traffic signal lights and time-show.The method of realization of hardware has also been given,the whole process included hardware circuit designing and program designing,in which some important technique problem that may meet during the use of Singlechip involved.In this paper,the state of crossing was designed as two states.One is normal,another breackdown or urgent,which are expressed with different colour lamp named yellow、red and green.The basic principle and method of controlling are introduced.In this paper, the design goals, development ways, system structure, system functions, geographic codes and data base of the Urban Traffic Information System (U T IS) were presented. Furthermore, the development and the application tests of the traffic situation model, the
traffic management model, the traffic plan model and the background information inquirement model of U T IS were discussed.This paper introduces the development scheme of three-colour programmable traffic signal time indicator used in the level-crossing of our city,and gives its power supply,load construction made by LED and time detection of traffic lamp colour a reasonable optimize structure.The reliability of Product is substantially
improved while the cost is reduced.

Key Words:SCM8051;traffic lights;automatic control;time indicator;hardwore;softwore timer;delay;external interrupt

引言
一. 交通信号灯硬件电路的设计
1.1交通信号灯的作用及工作原理:
1.2设计要求
1.3 设计方法
二. 系统组成
2.1 控制要求
2.2 硬件控制线路图
2.3 工作原理
2.4 器件和原理
2.4.1.什么是单片机
2.4.2 什么是单片机系统
2.4.3 单片机系统的应用
2.5 部分电路功能
2.5.1 晶振电路
2.5.2 复位电路
2.5.3 信号灯控制电路
2.5.4 LED显示及显示接口
三、交通信号灯软件的系统编程
3.1单片机的C语言程序设计
3.2 C语言与MCS—51
3.2.1 MCS—51酌编程语言
3.2.2 C51编译器与程序开发过程
3.2.3 C51程序结构
3.3 利用C51程序编写延时程序
3.4 信号灯亮灭的定时功能
3.4.1 单片机的定时器
3.4.2 如何使用MCS-51单片机的定时器呢?
3.4.3 定时器数值的设置应该注意的事项
3.4.4 定时1ms的程序代码
3.5 51单片机的中断系统
3.5.1 中断系统的概念
3.5.2 单片机的中断系统的作用
3.5.3 如何实现单片机的中断
3.5.4 单片机系统的中断过程
3.6 数码管显示程序功能
3.7 软件流程图
四、系统的组装与调试
4.1制板
4.2 组装及调试
4.2.1 AT89S51单片机实验及实践系统板简介
4.2.2 Keil C软件和AT89S51单片机下载器软件的使用
4.2.3 调试过程
五.总结
谢 辞
参考文献
附录一:主程序流程图
附录二:中断服务流程图
附录三:主程序代码



控制要求
⑴主、支干道交替通行,主干道每次放行30秒,支干道每次放行20秒;
⑵绿灯亮时表示可以通行,红灯亮时表示禁止通行;
⑶每次绿灯变红灯时,黄灯先亮5秒(此时另一干道上的红灯不变);
⑷十字路口要求有数字显示,作为时间提示,以便人们更直观地把握时间,具体
要求主、支干道通行时间及黄灯亮的时间均以秒为单位做减数器;
⑸ 在黄灯亮时,原红灯按1HZ的频率闪烁;
⑹ 当有急救车到达时,路口的信号灯全部变红,让急救车通过。假定急救车通过
时间为10s,急救车通过后,交通灯恢复先前状态。




参考文献
[1] 林华兵编著.MCS-51单片机原理及应用.武汉:华中科技大学出版社
[2] 先锋工作室编著.单片机程序设计实例.清华大学出版社
[3] 陈明荧编著.8051单片机课程设计实训教材.清华大学出版社
[4] 王晓明、曾红编著.单片机教程.东北大学出版社
[5] 张洪润、蓝清华编著.单片机应用技术教程.清华大学出版社



附录一:主程序流程图
附录二:中断服务流程图
附录三:主程序代码