目录
摘要:.............................................................. 3 Abstract ........................................................... 4 第一章绪论 ......................................................... 5
1.1 引言 ....................................................... 5 1.2 超声波测距原理以及理论分析 ................................. 5 第二章系统概述 ..................................................... 6
2.1 方案选择 ................................................... 6
2.1.1 方案一 ............................................... 6 2.1.2 方案二 ............................................... 7 2.2 系统设计原理 ............................................... 7 2.3 系统组成 ................................................... 8
2.3.1 主控制器 ............................................. 8 2.3.2 显示电路 ............................................. 8 2.3.3 HC-SR04超声波模块 .................................... 8
第3章系统硬件设计 ................................................. 9
3.1 主控芯片STC89C51 .......................................... 9
3.1.1 单片机特点: ......................................... 9 3.1.2 内部结构 ............................................. 9 3.1.3 引脚图以及部分引脚功能 ............................... 9 3.2 液晶显示模块 .............................................. 10
3.2.1 模块简介: .......................................... 10 3.2.2 引脚功能说明: ...................................... 11 3.2.3 系统显示模块电路 .................................... 11 3.3 超声波测距模块 ............................................ 12
3.3.1 模块简介 ............................................ 12 3.3.2 模块工作原理: ...................................... 12 3.3.3 模块电气参数 ........................................ 12 3.3.4 系统超声波模块电路 .................................. 12 3.4 报警电路模块 .............................................. 13
3.4.1 蜂蜜器简介 .......................................... 13 3.4.2 系统报警电路模块 .................................... 13
第四章系统软件设计 ................................................ 14
4.1 主程序设计 ................................................ 14
4.1.1 主程序简介 .......................................... 14 4.1.2 程序代码 ............................................ 14 4.2 LCD显示模块程序设计 ...................................... 16
4.2.1 模块简介 ............................................ 16 4.2.2 程序代码 ............................................ 16 4.3 超声波测距模块程序设计 .................................... 19
4.3.1 模块简介 ............................................ 19 4.3.2 模块代码 ............................................ 19
1
4.4 报警模块程序设计 .......................................... 21
4.4.1 模块简介 ............................................ 21 4.4.2 模块代码 ............................................ 21 4.5 辅助代码 .................................................. 21 结论............................................................... 25
2
超声波倒车雷达系统设计
摘 要:基于超声波测距的汽车倒车雷达系统是在了解超声波测距原理以及51单片机基本原理的基础上提出并实现的,该系统工作时,在单片机控制下超声波传感器发出脉冲信号,超声波在传播过程中遇到障碍物后反射,反射波由超声波接收装置接收后送至51单片机处理,从而实现汽车倒车过程中障碍物的实时监测并通过显示屏以及警报器提醒驾驶员。本系统是由以STC89C51单片机作为主控模块,超声波发射接收模块构成传感器模块,LCD显示模块,蜂鸣器报警模块等硬件系统以及软件程序设计组成。
关键词:单片机;超声波测距;LCD显示;报警;程序设计
3
The design of ultrasonic reversing radar system
Abstract:Automobile reversing radar system based on ultrasonic distance measurement is in the understanding of the principle of ultrasonic distance measurement and the basic principle of 51 single chip microcomputer based on the proposed and implemented , The system is working, Under the control of the microcontroller ultrasonic sensor sends out pulse signals , Ultrasonic obstacle in the process of propagation after reflectionThe reflected wave from the ultrasonic receiving device receives the evacuation to 51 single chip processing, So as to realize real-time monitoring obstacles car reversing the process object and through the display and alarm to remind the driver . This system is composed of MCU STC89C51 as the main control module , Ultrasonic transmitting and receiving modules sensor module , LCD display module , The buzzer alarm module of hardware system and software program design composition.
Key words:Single chip microcomputer;Ultrasonic ranging;LCD display;Alarm;Program
design
4