C51单片机--交通灯课程设计-副本.doc
文本预览下载声明
《单片机技术》课程设计说明书
交通灯
系 、 部: 电气与信息工程系
学生姓名:___龙啸九天
指导教师: 王韧 职称 副教授
专 业: 电子信息工程
班 级: 电子0901班
完成时间: 2011-12-30
摘 要
十字路口车辆穿梭,行人熙攘,车行车道人行人道,有条不紊靠的就是交通信号灯的自动指挥系统。本由单片机、按键、八位数码管显示组成设计一个用于东西、南北走向的交通管理。本系统结构简单,操作方便可实现自动控制,具有一定的智能性ABSTRACT
Crossroads shuttle vehicles, pedestrians bustling, car dealership traffic lane, people walkways, everything in good order and well arranged, the traffic lights on the automatic command system. So we as the electronic information engineering of the contemporary college students is necessary to understand its working principle, the design of this issue will also e This course is designed by the AT89S52 single-chip, keys, eight digital tube display, a scheme for the east-west, north-south traffic management system. Using assembly programming, microcontroller crystal 12MHz.
The hardware system has been completed ahead of schedule, program design in the Keil4 environment prepared, using USB procedures to generate the 16 hex file downloaded to the MCU, the realization of the hardware and software combination.
After repeated tests, the curriculum design of the indicators have reached the task book requirements. This system has the advantages of simple structure, convenient operation, and can realize automatic control, has certain intelligence. Because the timing of programming with the delay, so the timing is not very accurate, there will be a little bit error, but does not affect the normal use.
Key words: the traffic lights ;single-chip microcomputer;digital tube;timing;assembly
目 录
1 功能概述 1
1.1 课题任务与功能要求 1
1.2 方案概述 1
2 课题硬件系统设计 2
2.1 各模块电路简介 2
2.1.1 单片机最小系统 2
2.1.2 按键电路 2
2.1.3 流水灯电路 2
2.1.4 数码管电路 2
2.1.5 下载口电路 2
2.1.6 硬件测试 2
3 课题软件系统设计 3
3.1 单片机资源使用情况 3
3.2 软件各模块简要介绍 3
3.2.1 显示子程序 3
3.2.2 键扫描和键处理子程序 3
3.2.3 延时子程序 3
3.2.4 外部中断服务程序 3
3.2.5 主程序 4
3.2.6 主程序流程图 4
3.2.7
显示全部