1、 I 摘摘 要要 现在各大中城市出租车行业都已普及自动计价器, 所以计价器技术的发展已成定 局。而部分小城市尚未普及,但随着城市建设加快,象征着城市面貌的出租车行业也 将加速发展,计价器的普及也是毫无疑问的,所以未来汽车计价器的市场还是十分有 潜力的。本系统以 STC89C54 单片机为核心,用电机模拟车轮运转,A04E 霍尔传感 器测电机转数。文章详细介绍了出租车计价器的硬件电路和软件设计。硬件部分利用 霍尔元件将电机每转一圈的脉冲数传入单片机系统, 然后单片机系统将信号经过处理 送显示。软件部分用 C 语言进行编程,采用模块化设计思想。该系统实现了对出租 车里程的测量统计,并能将出租车的里
2、程数、候时时间、时距并计总价用 LCD 实时 显示。 关键词:里程,霍尔元件,LCD 显示,时距并计 II Abstract It is the major cities in the taxi industry has universal automatic meter now, and meter technology development is a foregone conclusion. And some small cities not yet universal, but with increasing speed up urban construction, a symbol
3、of taxi industry will also accelerate development, and the popularity meter is no doubt, therefore, the future of the automobile market valuation is still potential. By STC89C54 as kernel, electric motor imitating wheel revolving, using A04E Hall element to measure revolution, the measure and statis
4、tic are achieved. In this article, the hardware circuit and software design of taximeter are introduced in detail. About the hardware, the pulse number is transmitted of one cycle of the electric motor into Single Chip Microcomputer system. Then the signal processed by Single Chip Microcomputer syst
5、em is sent to display scream. About the software, in C language, the program is designed in the mode of modules. The system has realized the taxi mileage waiting time and total price of time and mileage counting together can be displayed on LCD. Keywords: Mileage,Hall element,LCD,Time and mileage co
6、unting together III 目目 录录 第一章 绪论 . 1 1.1 课题背景 1 1.2 课题的主要任务及内容 2 第二章 出租车计价器系统总体方案设计 . 4 2.1 任务分析与实现 . 4 2.2 出租车计价器系统硬件方案设计 . 4 2.2.1 里程测量传感器的设计 5 2.2.2 方案的确定 6 2.3 出租车计价器系统软件方案设计 . 7 第三章 出租车计价器系统硬件电路设计 . 9 3.1 概述 . 9 3.2 传感器及其测量系统 . 9 3.2.1 霍尔传感器的测量原理 10 3.2.2 集成开关型霍尔传感器 10 3.3 单片机的原理及应用 . 12 3.3.1 单片机原理简介 12 3.3.2 单片机的引脚功能介绍 13 3.3.3 单片机中断系统介绍 16 3.3.4 单片机定时/计数功能介绍 . 18 3.4 单片机外围电路的设计 . 19 3.4.1 时钟电路的设计 19 3.4.2 复位电路的设计 20 3.4.3 显示电路的设计 22 第四章 出租车计价器系统软件程序设计 . 25 4.1 概述 . 25 4.2 出租车计价器系统总体程序