当前位置:首页 > 基于单片机的出租车计费器系统设计 - 毕业设计
编号
河南机电高等专科学校 毕业设计(论文)
基于AT80C51
系 部: 专 业: 班 级: 姓 名: 学 号: 指导老师:
二零一五年五月
1
单片机的出租车计费系统设计摘要
摘要
随着出租车行业的发展,出租车行业已经是城市交通的重要组成部分,对出租车的开发变得尤为重要。
本文阐述了以单片机为基础的出租车计费系统的设计,该系统采用80C51单片机为核心控制器,利用A44E霍尔传感器测车辆行驶距离,输出车辆行驶距离和车费到数码显示管。文章中还介绍了霍尔传感器的工作原理,霍尔传感器以霍尔效应为其工作基础,当霍尔传感器在变化的磁场中时就会产生脉冲波,单片机接收脉冲波从而计算出车辆的行驶距离,然后算出总车费。显示电路中运用了8位数码显示管,其中4位用来显示距离,4位用来显示总车费。该系统不但能实现出租车基本的测距和计价,还能计算中途等待时间来调节车价,同时在空车状态下可对起步价进行设置。文章中不仅详细地介绍了电路各个模块的硬件结构,还对软件设计进行了详细说明。
关键词:出租车,80C51,霍尔传感器
2
Abstract
Abstract:
As the taxi development, urban taxi industry is an important component of the traffic, developing the taxi becomes more and more important.
In this paper, it shows the design of microcontroller-based taxi billing system, the system uses 80C51 microcontroller core, uses A44E Hall sensor measuring vehicle distance and make the vehicle and the fare output to the digital display tube. The article also describes the working principle of the Hall sensor, Hall sensor bases its work on the Hall effect, when the Hall sensor is in a changing magnetic filed it can generate the pluse which is received by microcontroller to calculate the vehicle distance, and then calculate the total fare. The show circuit uses the 8-bit digital display tubes, of which 4 used to show distance,4 to display the total fare. The system can not only achieve the basic taxi distance and fare, but also can calculate the intermediate wait time to adjust the prices, when the taxi is empty the starting can be set.The article not only describes the hardware structure of each module in the circuit in detail,but also describe the software design in detail.
Key words: Taxi 80C51 Hall sensor
1
目录
目 录
1 绪论.................................................................................................................... 1 1.1单片机应用的发展及现状 ........................................................................... 1
1.1.1单片机概述 ....................................................................................... 1 1.1.2单片机的应用 ................................................................................... 1 1.2现今对出租车计费系统的有关研究 .......................................................... 1 2 出租车计费系统设计目标................................................................................ 2 2.1 出租车计费系统原理概述 .......................................................................... 2 2.2 出租车计费系统实现的功能 ...................................................................... 2 3系统硬件设计..................................................................................................... 4 3.1 系统设计框图 .............................................................................................. 4
3.2.1 80C51单片机的内部逻辑结构 ...................................................... 5 3.2.2单片机的引脚 ................................................................................... 7 3.2.3 单片机的中断系统 .......................................................................... 9 3.2.4单片机最小系统 ............................................................................. 11 3.3.1 霍尔传感器介绍 ............................................................................ 14 3.3.2霍尔效应 .......................................................................................... 14 3.4 I/O扩展电路 ............................................................................................. 18
3.4.1 8155的结构和引脚图 ................................................................... 19 3.4.3 8155的工作方式与基本操作 ...................................................... 20 3.4.4 8155的地址编码 ........................................................................... 21 3.4.5 单片机I/O扩展电路 .................................................................... 21 3.5.1 74HC244芯片介绍 ......................................................................... 22 3.5.2 LED显示器介绍 ............................................................................. 23 3.5.3 数码管显示原理 ............................................................................ 24 3.5.4 显示电路......................................................................................... 25 4 系统软件设计.................................................................................................. 27 4.1 出租车计费系统软件总体设计思想 ....................................................... 27 4.2 软件设计各个模块介绍 ............................................................................ 28
4.2.1 里程、车费计算及显示模块 ....................................................... 28 4.2.2 等待时间计时加费模块 ................................................................ 29 4.2.3 设置起步价模块 ............................................................................ 30 5 总结.................................................................................................................. 32 致谢...................................................................................................................... 33 参考文献.............................................................................................................. 34
2
共分享92篇相关文档