基于单片机AT89S51交通灯的仿真设计
2018-07-27王刚
王刚
摘要: 本文设计了基于AT89S51单片机的交通灯控制系统。该系统由单片机最小系统、交通灯显示电路、倒计时显示电路、紧急和特殊情况处理电路组成。通过Proteus、Keil软件搭建硬件仿真电路与软件设计、软硬联调,实现了交通灯的基本功能及紧急、特殊情况交通处理功能。仿真结果表明:本系统具有电路设计简单,性价比高,稳定性好,操作性强等特点。为进一步扩展交通灯功能的多样化、智能化提供了参考方案,具有一定的实用价值。
Abstract: This paper designs a traffic light control system based on AT89S51 single-chip microcomputer. The system consists of a single-chip minimum system, a traffic light display circuit, a countdown display circuit, and emergency and special case processing circuits. Proteus and Keil software are used to build hardware simulation circuit and software design, hardware and software joint debugging, to achieve the basic functions of traffic lights and emergency and special circumstances of traffic handling. The simulation results show that this system has the characteristics of simple circuit design, high performance-to-price ratio, good stability, and strong operability, which provides a reference program for further diversification and intelligentization of traffic light functions, and has certain practical value.
关键词: AT89S51;显示电路;处理功能;硬件仿真
Key words: AT89S51;display circuit;processing function;hardware simulation
中图分类号:U491.5+1 文献标识码:A 文章编号:1006-4311(2018)17-0131-02
0 引言
近年来,我国汽车数量增长迅速,大中型城市的交通压力也日趋增大。随着微控制器技术的不断发展,功能日益完善,在工业控制、仪器仪表、武器装备、通信等领域获得广泛应用。在此背景下,采用单片机设计出智能化、人性化的交通灯控制电路,为缓解交通压力提供了可行性的解决方案。
1 系统总体设计
根据系统的功能,本设计的硬件仿真分为三个模块:单片机最小系统、交通灯显示模块、紧急、特殊情况处理模块。最小系统采用核心芯片AT89S51;显示模块采用发光二极管为交通灯、四位一体七段数码管为倒计时显示;非自锁按键构成紧急和特殊情况处理电路。系统组成框图如图1所示。系统的软件设计分为四个模块:动态显示模块、交通灯工作模块、中断模块、定时/计数器模块。
2 硬件仿真设计
本系统的硬件仿真采用Proteus软件。Proteus软件是EDA工具软件,它是目前比较好的仿真单片机及外围器件的工具。……
