资源描述:
《基于单片机的出租车计价器设计【毕业论文】》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、毕业论文(20__届)基于单片机的出租车计价器设计摘要本系统以AT89S51单片机为核心,主要包括电源电路、霍尔传感器路程测量电路、数据显示电路、数据存储电路等,各电路端口分别与单片机AT89S51相连,通过单片机的控制来实现计价器的功能。单片机采集并判断空车灯信号及路程检测传感器信号,当出租车启动时,单片机检测到霍尔传感器的脉冲信号并进行里程计算。当无乘客时,单片机调用实时时间芯片DS1302程序,用8个数码管进行时钟显示;当空车灯掰下乘客上车时:通过DS1302获取时间信息分辨白天/晚上,然后调用AT24C02程序获
2、取白天/晚上的单价及起始价,便开始计价并显示时间、里程和金额等信息;当空车灯打上乘客下车时:单片机将营运数据信息存储到AT24C02中,等待出租车再次启动后单次金额与里程等信息清零复位,就此完成一次计价。结果表明计价器具有实时显示行驶里程和费用、能够显示时钟。与已有的系统相比简单明了,此系统能更好的为乘客和司机服务。关键词:出租车计价器;AT89S51;DS1302;AT24C02AbstractThissystemregardsAT89S51one-chipcomputerasthecore.Systematicsch
3、emeincludingjourney,circuitofpowerandtransducerofHallmeasurecircuit,datarevealcircuit,datastorecircuit,etc.mainly.Everycircuitportlinkswithoutputmouthoftheone-chipcomputerAT89S51separately,realizethefunctionofthemeterbycontroloftheone-chipcomputer.Theone-chipcomp
4、utergathersandjudgesemptycarlightsignalandjourneymeasurethetransducersignal,whenthetaxistarts,theone-chipcomputermeasurestothepulsesignalofHall'stransducerandcalculatesthemileage.Whentherearenopassengersing,theone-chipcomputertransfersforreal-timetimechipDS1302pr
5、ocedure,revealstheclockwith8digitaltubes;Whentheairandbrokeoffthelightswhenboarding:DS1302togettimeinformationthroughtheresolutionday/night,andthencalltheAT24C02proceduresforday/nightunitpriceandthestartingprice,theystartpricinganddisplaystime,distanceandamountof
6、suchinformation;Whenairpassengersgotoffthelightsmarked:MCUoperatingdatawillbestoredinAT24CO2,waitingforataxitostartagainafterasingleamountandthemileageandotherinformationclearingreset,thuscompletingavaluation.Theartificialresultindicatesthemeterrevealsdistancetra
7、velledandexpenses,canrevealtheclockinrealtime.Comparedwiththeexistingsystem,thissystemhasstrongerfunction,suchasremindingoftheexcessivespeedandsoon.Keywords:Taximeter;AT89S51;DS1302;AT24C02目录引言12总体设计22.1方案论证及比较22.1.1主控模块的选择22.1.2传感器模块的选择22.1.3显示模块的选择32.2系统总体方案33硬
8、件设计53.1AT89S51单片机系统53.1.1AT89S51单片机53.1.2单片机最小系统63.2电源模块73.3路程测量模块73.4数据显示模块103.5时钟模块113.6数据存储模块133.7按键设置模块144系统软件设计164.1主程序164.2中断程序174.2.1里程计数中断程序174.2.2中途等待