基于单片机的汽车超速报警器的设计
摘 要
为了降低车辆超速造成的交通事故,设计了一种利用89C51单片机对机动车超速行驶情况进行蜂鸣报警和灯光报警的系统。随着国民经济的发展,机动车辆规模及流量大幅度增加。为了保护司乘人员安全,降低事故发生率成为当务之急,在汽车装置中,设置超速警示系统,为车辆驾驶人员提供警示标志,以便驾驶人员提前减速,成为一种必要手段。详细阐述了系统的总体设计方案,给出了界面模块与89C51接口电路,最后介绍了软件设计方法及程序流程图。
关键词: 89C51;传感器;界面模块
临沂大学2012届本科毕业论文
ABSTRACT
Design a sound alarming system using 89C51 single chip which can exam the over speed motor vehicle and meanwhile give out sound. With the development of the national economy Scales of motor vehicles are experiencing a substantially incensement. Assorting with and inducing traffic to protect the safety of drivers and passengers,reducing the accident rate become a urgent affair. Setting up speeding alert system and supplying the drivers with
The system with simple structure,high reliability and convenient operation can widely used on motorbike ,car and so on. This paper detailedly introduces the whole design scheme of the system、the circuit on interface module and 89C51,the method of the software design and program flow chart. Keyword:89C51; transducer; Interface-Modul
临沂大学2012届本科毕业论文
目 录
第一章 绪论 .................................................................................................................. 1
1.1 研究背景 ....................................................................................................... 1 1.2 系统设计方法 ............................................................................................... 1 1.3 研究目的与意义 ........................................................................................... 1
1.3.1 研究目的 ............................................................................................ 1 1.3.2 研究意义 ............................................................................................ 2 1.4 研究现状 ....................................................................................................... 2
1.4.1 国内外研究现状 ................................................................................ 2 1.5 研究内容 ....................................................................................................... 4 第二章 硬件部分设计 ................................................................................................ 4
2.1 AT89C51单片机简介 .................................................................................... 4
2.1.1 管脚说明 ............................................................................................ 6
第三章 系统总体设计 .............................................................................................. 7
3.1 设计方案 ....................................................................................................... 7 3.2 测速传感器 ................................................................................................... 8 3.3 界面模块 ....................................................................................................... 9 3.4 存储器扩展 ................................................................................................. 10 3.5 抗干扰设计 ................................................................................................. 11 3.6 软件设计 ..................................................................................................... 11 3.7 主程序 ......................................................................................................... 11 3.8 监测车辆速度 ............................................................................................. 12
3.8.1 GPS车速检测 ................................................................................... 12 3.8.2 跟踪流程 .......................................................................................... 13 3.9 键盘中断子程序 ......................................................................................... 15 3.10 报警子程序 ............................................................................................... 15 3.11 显示子程序设计 ....................................................................................... 15
3.11.1 信息显示的方式选择 ...................................................................... 15 3.11.2 LED显示屏的优点 ......................................................................... 16 3.12 RAM数据保护的条件陷阱 ........................................................................ 16 4 总结 ........................................................................................................................ 17 参考文献 ...................................................................................................................... 18 致 谢 ...................................................................................................................... 19