基于单片机的交通灯毕业设计论文.doc
约25页DOC格式手机打开展开
基于单片机的交通灯毕业设计论文,基于单片机的交通灯系统设计目录摘要1引言21单片机概述22芯片简介32.1 msc-51芯片简介32.2 8255芯片简介42.2.1 74ls373简介43系统硬件设计53.1 交通管理的方案论证53.2 系统硬件设计53.2.1 系统总框图如下63.2.2 交通灯硬件线路图........................
内容介绍
此文档由会员 陈海峰 发布
基于单片机的交通灯系统设计
目录
摘要……………………………………………………………1
引 言2
1 单片机概述 2
2 芯片简介 3
2.1 MSC-51芯片简介 3
2.2 8255芯片简介 4
2.2.1 74LS373简介 4
3 系统硬件设计 5
3.1 交通管理的方案论证 5
3.2 系统硬件设计 5
3.2.1 系统总框图如下 6
3.2.2 交通灯硬件线路图............................. . . . ........ 6
3.2.3 系统工作原理 7
4 控制器的软件设计 7
4.1 每秒钟的设定 7
4.2 计数器硬件延时 8
4.2.1 计数器初值计算 9
4.2.2 计算公式 10
4.2.3 1秒的方法 11
4.2.4 相应程序代码 12
4.3 软件延时 13
4.4 时间及信号灯的显示 14
4.4.1 8051并行口的扩展 15
4.4.2 显示原理 16
4.4.3 8255PA口输出信号接信号灯 16
4.4.4 8255输出信号与数码管的连接 16
4.4.5 8255与8051的连接 17
4.5程序设计 18
4.5.1 流程图如图所示 18
4.5.2 程序源代码 18
结论 22
参考文献........ . .................................. . ...........23
摘要:
近年来随着科技的飞速发展,单片机的应用正在不断深入,同时带动传统控制检测技术日益更新。在实时检测和自动控制的单片机应用系统中,单片机往往作为一个核心部件来使用,仅单片机方面知识是不够的,还应根据具体硬件结构软硬件结合,加以完善。
十字路口车辆穿梭,行人熙攘,车行车道,人行人道,有条不紊。那么靠什么来实现这井然秩序呢?靠的就是交通信号灯的自动指挥系统。交通信号灯控制方式很多。本系统采用MSC-51系列单片机ATSC51和可编程并行I/O接口芯片8255A为中心器件来设计交通灯控制器,实现了能根据实际车流量通过8051芯片的P1口设置红、绿灯燃亮时间的功能;红绿灯循环点亮,倒计时剩5秒时黄灯闪烁警示(交通灯信号通过PA口输出,显示时间直接通过8255的PC口输出至双位数码管);车辆闯红灯报警;绿灯时间可检测车流量并可通过双位数码管显示。本系统实用性强、操作简单、扩展功能强。
关键词:单片机, 交通灯, 闯红灯,检测车流量
abstract
In recent years, with the rapid development of science and technology, the application of SCM is unceasingly thorough, while traditional control testing technology is updated. In real-time detection and automatic control of single-chip microcomputer application system, often used as a core component, knowledge is not only the MCU, still should according to specific hardware structure, software and hardware, the perfect combination.
Pedestrian crossing transports, bustling, garage, pedestrian humanitarian, orderly driveway. So what to realize it in order? The traffic light automatic command system. Traffic light control many ways. This system USES MSC - 51 series microcontroller ATSC51 and programmable parallel the I/O devices for the center 8255A interface chip to design the controller, lights, can according to actual traffic through the 8051 chips red, green, P1 mouth setting time function; the depth Traffic light, circulation for 5 seconds remaining countdown yellow lights flashing warning (when the traffic signal output by mouth that time, PA directly through the mouth 8255 PC output to double a digital tube), Traffic police; red Green time can be detected by double bits of cars and digital tube display. This system is practical, simple operation and function expansion.
Keywords: red lights, SCM, traffic, detection
目录
摘要……………………………………………………………1
引 言2
1 单片机概述 2
2 芯片简介 3
2.1 MSC-51芯片简介 3
2.2 8255芯片简介 4
2.2.1 74LS373简介 4
3 系统硬件设计 5
3.1 交通管理的方案论证 5
3.2 系统硬件设计 5
3.2.1 系统总框图如下 6
3.2.2 交通灯硬件线路图............................. . . . ........ 6
3.2.3 系统工作原理 7
4 控制器的软件设计 7
4.1 每秒钟的设定 7
4.2 计数器硬件延时 8
4.2.1 计数器初值计算 9
4.2.2 计算公式 10
4.2.3 1秒的方法 11
4.2.4 相应程序代码 12
4.3 软件延时 13
4.4 时间及信号灯的显示 14
4.4.1 8051并行口的扩展 15
4.4.2 显示原理 16
4.4.3 8255PA口输出信号接信号灯 16
4.4.4 8255输出信号与数码管的连接 16
4.4.5 8255与8051的连接 17
4.5程序设计 18
4.5.1 流程图如图所示 18
4.5.2 程序源代码 18
结论 22
参考文献........ . .................................. . ...........23
摘要:
近年来随着科技的飞速发展,单片机的应用正在不断深入,同时带动传统控制检测技术日益更新。在实时检测和自动控制的单片机应用系统中,单片机往往作为一个核心部件来使用,仅单片机方面知识是不够的,还应根据具体硬件结构软硬件结合,加以完善。
十字路口车辆穿梭,行人熙攘,车行车道,人行人道,有条不紊。那么靠什么来实现这井然秩序呢?靠的就是交通信号灯的自动指挥系统。交通信号灯控制方式很多。本系统采用MSC-51系列单片机ATSC51和可编程并行I/O接口芯片8255A为中心器件来设计交通灯控制器,实现了能根据实际车流量通过8051芯片的P1口设置红、绿灯燃亮时间的功能;红绿灯循环点亮,倒计时剩5秒时黄灯闪烁警示(交通灯信号通过PA口输出,显示时间直接通过8255的PC口输出至双位数码管);车辆闯红灯报警;绿灯时间可检测车流量并可通过双位数码管显示。本系统实用性强、操作简单、扩展功能强。
关键词:单片机, 交通灯, 闯红灯,检测车流量
abstract
In recent years, with the rapid development of science and technology, the application of SCM is unceasingly thorough, while traditional control testing technology is updated. In real-time detection and automatic control of single-chip microcomputer application system, often used as a core component, knowledge is not only the MCU, still should according to specific hardware structure, software and hardware, the perfect combination.
Pedestrian crossing transports, bustling, garage, pedestrian humanitarian, orderly driveway. So what to realize it in order? The traffic light automatic command system. Traffic light control many ways. This system USES MSC - 51 series microcontroller ATSC51 and programmable parallel the I/O devices for the center 8255A interface chip to design the controller, lights, can according to actual traffic through the 8051 chips red, green, P1 mouth setting time function; the depth Traffic light, circulation for 5 seconds remaining countdown yellow lights flashing warning (when the traffic signal output by mouth that time, PA directly through the mouth 8255 PC output to double a digital tube), Traffic police; red Green time can be detected by double bits of cars and digital tube display. This system is practical, simple operation and function expansion.
Keywords: red lights, SCM, traffic, detection