毕业论文-基于AT89S51单片机的出租车计价器设计.docx
文本预览下载声明
湖南科技大学毕业设计(论文)题目基于AT89S51单片机的出租车计价器设计作者学院信息与电气工程学院专业电气工程及其自动化学号指导教师二〇一六年五月十三日摘要本论文讲述的是基于AT89S51单片机的出租车计价器设计。在本次设计中,硬件部分主要包括:单片机最小系统、里程计算和计价电路、数码管显示电路、掉电存储电路、按键电路、时钟电路、电源电路。具体表现为:单片机最小系统包括单片机、晶振电路和复位电路,单片机主要是用来控制与外围电路的联系,晶振电路为单片机系统提供基本的时钟信号,复位电路则是用来复位;里程计算主要是利用霍尔传感器A44E,通过在车轮上来安装小磁铁,车轮每转一圈,然后霍尔传感器靠近磁场就会产生一个信号来引起单片机中断,通过计算单片机次数来判断行驶的路程;数码显示电路采用LED数码管显示屏,可以显示金额、路程、时钟等信心;掉电存储电路就是采用AT89S51芯片,当电源断开的时候用来存储当前设定的单价信息;按键电路主要是通过开关按键来控制出租车白天/晚上的计价切换,还可以用于时钟显示的切换;时钟电路采用DS1302芯片,这种芯片能够给单片机系统提供精确的时间与日期显示;电源电路就是给单片机提供+5V的额定工作电压,因为出租车提供的车载电源是+12V,所以需要采用稳压芯片7805将+12V的电压稳压到+5V。系统的软件设计主要包括:主程序模块、里程计数中断程序、定时中断程序、中途等待服务程序、显示服务子程序和键盘服务程序。主程序模块主要就是对出租车起步价格和单价进行初始化、对各个接口芯片进行初始化设置、设计循环等待以及对中断向量的设计、开中断设计;里程计数中断程序就是对单片机中断进行计数,然后计算出里程和金额;定时中断服务程序就是将数据送到相应的显示缓冲单元;中途等待服务程序主要就是对中途等待时计价;显示服务子程序就是对金额、路程、时间等数据的显示设计;键盘服务程序则是将程序运行转到相对应的子程序中。关键词:单片机;霍尔传感器;数码显示管;时钟显示;计价显示;里程显示。ABSTRACT This paper tells the is based on AT89S51 taxi valuation is designed. In this design, hardware part mainly includes: MCU minimum system, mileage calculation and valuation circuit, digital tube display circuit, power down memory circuit, key circuit, clock circuit, power supply circuit. Specific performance is that MCU minimum system consists of microcomputer, crystal oscillator circuit and reset circuit, MCU is mainly used to control and peripheral circuit, crystal oscillator circuit for single chip microcomputer system provides the basic clock signal and reset circuit is used to reset; mileage calculation is mainly using a44e Hall sensor, through the wheel up installation Small magnets, per wheel turn a circle, and Hall sensor near the magnetic field will produce a signal by MCU interrupt, by calculating the number of single-chip microcomputer to judge the running away; digital display circuit with LED digital tube display, can display the amount, confidence in the journey, clock, etc.; off electricity storage circuit is adopted AT89S51 chip. When the power supply is disconnected to set the current storage unit price infor
显示全部