摘要:在现今这个经济和科学技术不断发展的社会,汽车的使用数量不断增加,导致了一系列交通事故。在这种情况下,涉及的汽车辅助安全系统也越来越多。本设计是在AT89C51单片机的基础上结合超声波传感器设计出的测距仪。在倒车及行驶过程中,当驾驶员无法目测车身与障碍物距离时,该测距仪可进行危险距离警报。本系统设计的整个硬件电路为:超声波发射、接收电路,电源电路、显示电路、复位电路、晶振电路、蜂鸣器报警电路。软件设计是由主程序、中断服务程序、显示距离子程序和延时子程序组成。最后利用Proteus软件仿真将软硬件结合,实现各个功能模块。该系统的优点是:易控制、测距精确度高、流程清晰,可实时进行车距检测。设计完成后的超声波测距仪能够在各种测量参数的场合发挥作用。62804
毕业论文关键词:AT89C51,超声波,测距,蜂鸣报警器
Abstract: Nowadays, economy, science and technology are continuously developing in the society. And the increase of car-using number leads to a series of accidents. In this case, the car involved in the secondary security systems is also increasing. Based on the AT89C51 microcontroller and combining ultrasonic sensors, the design designs a range finder which can make dangerous distance alarm during car reversing and the process of moving, when the driver cannot measure the distance between the car and an obstacle. The entire hardware circuit design: ultrasonic transmitter and receiver circuits, power circuits, display circuit, reset circuit, crystal oscillator circuit, and buzzer alarm circuit. Software design is by the main program, the interrupt service routine, displays the distance and time delay subroutine subprograms. Finally, using the Proteus simulation to combine hardware and software, the design implements various functional modules. The advantages of this system are: easy to control, ranging accuracy, process clear, can detect real-time distance between vehicles. After the design is complete ultrasonic range finder can play a role in the case of various measurement parameters.
Key words: AT89C51, ultrasonic wave, measure distance, buzzer alarm
1 绪论 4
1.1 课题研究背景 4
1.2 课题研究意义 4
1.3 应解决的关键问题 4
1.4 论文结构 5
2 系统方法论证 5
2.1 超声波简介 5
2.2 超声波测距原理 5
2.3 方案论证 6
2.4 主要元件介绍 7
3 硬件电路设计 8
3.1 超声波发射电路 8
3.2 超声波接收电路 9
3.3 显示电路 10
3.4 电源电路 11
3.5 复位电路 12
3.6 蜂鸣器报警电路 12
3.7 晶振电路 13
4 软件设计 13
4.1 主程序流图及编制 13
4.2 中断服务程序的流程图及编制 17
4.3 显示距离子程序和延时子程序 18
5 软件调试及系统仿真 19
5.1 软件编译调试环境----Keil