摘要本设计详细叙述了基于8051单片机的超声波测距仪。利用超声波从发射到反射回来的时间差来计算距离,采用STC89C52RC单片机作为主控制器,用动态扫描法实现LED数码显示,超声波驱动信号用单片机的定时器完成。本设计主要是由超声波的发射和接收电路、单片机系统、LED显示电路、超声波传感器和报警处理电路组成,在此基础上设计了系统的总体方案,最后通过硬件和软件实现了各个功能模块,相关部分附有硬件电路图、程序流程图,系统主要功能包括:64595
(1)超声波的发射、接收,并根据计时时间计算测量距离;
(2)LED数码管显示距离;
(3)测量值低于盲区值时发出报警信号。
毕业论文关键词 超声波测距 STC89C52RC单片机 时间差 传感器
毕业设计说明书(论文)外文摘要
Title Design of Ultrasonic Range Finder
Abstract
The design described in detail the ultrasonic range finder based on 8051 single chip microcomputer, to calculate the distance by ultrasonic time from launch to bounce back, this paper uses STC89C52RC MCU as the main controller, and using the dynamic scanning method to achieve LED digital display, ultrasonic drive signal with single-chip timer completion. The system is mainly composed of ultrasonic transmitting and receiving circuit, SCM system, LED display circuit, ultrasonic sensor and alarm circuit. On this basis,we design the overall scheme of the system, and finally through the hardware and software implementation of the various functional modules, accompanied by the relevant part of the hardware circuit, program flowchart.The main functions of the system include:
(1) ultrasonic transmitter, receiver, and measures the distance according to the time;
(2) LED digital tube display distance;
(3) sends out the alarm signal when the measured value is lower than the spot value;
Keywords Ultrasonic range finder Time difference sensor STC89C52RC
目 次
1 引言 1
1.1 课题背景及意义 1
1.2 超声波测距发展现状 1
1.3 本课题研究内容 2
2 超声波测距简介 3
2.1 超声波概述 3
2.2 超声波发生器 3
2.3 超声波测距原理 4
2.4 STC89C52RC介绍 5
3 系统方案设计 8
4 系统硬件电路的设计 8
4.1 单片机系统及显示电路 9
4.2 超声波发射电路 10
4.3 超声波检测接收电路 10
5 系统程序的设计 11
5.1 超声波测距仪的算法设计 11
5.2 主程序 12
5.3 超声波发生子程序和超声波接收中断程序 12
5.4 超声波测距程序流程图 15
6 调试及性能分析 17
6.1调试 17
6.2性能分析 18
结 论 19
致 谢 20