基于单片机的出租车计价器的设计
来源:56doc.com 资料编号:5D17332 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9A5D17332
资料以网页介绍的为准,下载后不会有水印.资料仅供学习参考之用. 密 保 惠 帮助
资料介绍
基于单片机的出租车计价器的设计(论文12000字)
摘要:出租车计价器的整体设计分为硬件和软件两个部分,两个部分均采用模块化设计。硬件部分的设计:计价器的控制核心以宏晶科技的STC89C51单片机为核心主控件模块;掉电保护模块采用AT24C02实现;输出模块使用6位LED数码管实现,以及一键复位。通过四个开关实现总金额、单价、总路程的显示。软件部分的设计:采用C语言编程,包括设备初始化模块、中断模块、路程计数模块、LED显示模块、以及键盘程序控制模块等组成。可以实现数据的存储、复位、输出、调整价格等功能并计算和显示出乘客乘坐出租车应付的费用。公里计数的实现:采用霍尔开关型器件A44E 霍尔传感器测距,车轮安装小磁铁,根据霍尔效应把车速变为脉冲信号,根据换算采集脉冲信号的频率就可以得到车速,可以用到单片机的捕获脉冲信号测量路程公里数。
关键词:模块化;单片机;A44E;数码管
The design of Taxi Meter based on Single chip microcomputer
Abstract:Taxi meter's integrity design is divided into two parts of hardware and software which are both taking on modularity design. The design of the hardware part uses STC89C51 MCU of Macro Silicon Technology Co.Ltd as core controller module of the meter. It implements power-fail protection based on AT24C02 and uses 6-LED digital tube as the output module, as well as the reset key. The total amount, unit price and total distance are displayed through 4 switches respectively. The design of the software part uses C language programming which consists of device initialization module, interrupter module, distance counting module, LED display module and keyboard control module so as to implement the function such as storage, reset, output of data and adjust price, which can also calculate and display the passage money. Implement the function of mileage counting based on A44E Hall-Effect Sensors of Hall component, the tiny magnet was installed in wheels. The speed will transform into the pulse signal among the Hall-Effect, according to the frequency conversion of pulse signal we could get the data of speed, which means that we can use the pulse signal captured by single chip microcomputer to measure the distance mileage.
Key words: Modularization; Single chip microcomputer; A44E; Digital tube
目 录
中文摘要 I
英文摘要 II
1 绪论 1
1.1出租车计价器概述 1
1.2 整体方案概述 2
1.3硬件设计概述 2
2 系统硬件设计 4
2.1 核心控制器(介绍STC89c51) 4
2.2 功能模块设计 6
2.2.1测量里程模块选取 6
2.2.2 数据显示模块设计 9
2.2.3 数据存储模块设计 12
2.2.4 开关模块设计 13
2.3 整体电路图 14
3 系统软件设计 15
3.1 主程序功能介绍 15
3.2 各程序模块设计 15
3.2.1 主程序模块 15
3.2.2 里程计数程序模块 16
3.2.3 LED数码管显示模块 17
3.2.4键盘模块 17
3.2.5其它外围硬件初始化模块 18
结论 19
参考文献 20
附录 21
致谢 29
|