在车辆高速行驶的过程中,车速里程表是为驾驶员及时提供动态驾驶信息的重要仪表,它的好坏直接影响到车辆行驶安全。而传统的车速里程表存在两大缺陷:一是用软轴驱动的传统车速里程表在车辆高速行驶状态下,软轴高速旋转,由于软轴钢丝应力极限的限制,常常造成钢丝软轴的疲劳断裂,从而使车速里程表失效;二是由于软轴布线过长,出现形变过大和运动迟滞现象,导致动态指示迟钝或指示错误。为了更加及时可靠的为驾驶员提供动态驾驶信息,保证车辆行驶安全,克服传统软轴驱动车速里程表故障率高、动态指示迟钝等问题,运用先进的电子技术、传感器测量技术和计算机智能技术,改进传统的里程表是非常必要的。由此给出了以AT89C2051为核心,利用单片机的运算和控制能力,并采用串口液晶显示模块实时显示所测速度和里程表的速度里程表设计方案。该方案由于于使用了串口液晶显示模块和E2PROM,以及高效快速算法,因而可在节约系统资源和简化程序设计的基础上保证测量精度和系统实时性。
In the process of high-speed vehicles, vehicle speed odometer is important instrument driver to provide dynamic driving information, which directly affects the running safety of vehicles. The speedometer tradition has two defects: one is the traditional speedometer flexible shaft driving the vehicle high speed running condition, the shaft rotating speed, the flexible shaft steel wire stress limit, often resulting in fatigue fracture of the wire flexible shaft, so that the speedometer failure; two is a flexible wiring is too long due to deformation, appear too large and the motion lag, lead to dynamic indicating slow or indication error. In order to be more reliable and timely to the driver’s driving dynamic information, guarantee the driving safety, the problem of high failure rate, the speedometer dynamic indicating slow service traditional flexible shaft driving, the use of electronic technology, sensor technology and computer intelligence technology advanced, the improvement of the traditional odometer is very necessary. Which gives the AT89C2051 as the core, using single-chip microcomputer operation and control, and USES the serial LCD display module, real time display measured design speed and odometer speed odometer.Because of the use of serial LCD display module and E2PROM, as well as efficient and fast algorithm, this method can guarantee the measurement accuracy and real-time performance based on the saving of system resources and simplify program design.
Keywords:microcontrollerAT89C2051 hall sensors the speedometer
摘 要…………………………………………………………………………………………………………….. I
Abstract………………………………………………………………………………………………………….. II
第一章 绪论…………………………………………………………………………………………………… 1
第二章 系统概述…………………………………………………………………………………………… 2
2.1系统组成……………………………………………………………………………………………… 2
2.2系统工作原理………………………………………………………………………………………. 2
第三章 基本器件及原理……………………………………………………………………………….. 4
3.1 霍尔传感器简介………………………………………………………………………………… 4
3.2 AT89C2051芯片简介………………………………………………………………………… 5
3.3 液晶显示模块SED1520芯片介绍………………………………………………………. 6
3.3.1 SED1520芯片介绍……………………………………………………………………. 6
3.3.2 SED1520的特性……………………………………………………………………….. 7
3.3.3 SED1520指令与显示RAM结构……………………………………………….. 7
3.4 定时器/计数器的结构………………………………………………………………………… 8
3.5 定时计数器的原理…………………………………………………………………………….. 8
3.6 频率测量…………………………………………………………………………………………… 9
第四章 系统硬件设计………………………………………………………………………………….. 10
4.1 信号预处理电路………………………………………………………………………………. 10
4.2 施密特触发器………………………………………………………………………………….. 10
4.3 液晶显示电路和数据存储电路…………………………………………………………. 11
第五章 系统软件设计………………………………………………………………………………….. 12
5.1 电机转速控制模块程序设计…………………………………………………………….. 13
5.2 频率测量模块程序设计……………………………………………………………………. 13
5.3 液晶显示程序的设计……………………………………………………………………….. 16
5.4 速度、里程显示程序的设计…………………………………………………………….. 16
第六章 软件调试……………………………………………………………………………………….. 21
6.1 程序的查错手段………………………………………………………………………………. 21
6.2 源程序的检测………………………………………………………………………………….. 21
6.3 源程序的调试………………………………………………………………………………….. 22
第七章 总结与展望……………………………………………………………………………………. 23
7.1全文总结……………………………………………………………………………………………. 23
7.2工作展望……………………………………………………………………………………………. 23
致谢……………………………………………………………………………………………………………… 24
参考文献………………………………………………………………………………………………………. 25