摘要:随着出租车行业的发展,出租车已成为城市交通的重要组成部分,同时出租车计价器的发展也备受关注。本次出租车计价器利用AT89S51单片机为核心,通过时钟电路,掉电保护电路,显示电路和按键电路来完成主电路的设计。通过传感器产生脉冲测量距离,实时显示路程和总价,可以通过菜单设置调整价格。当乘客上车时通过单片机上电开始计数,在液晶屏上实时显示路程和总价。利用C语言编写程序,通过调用菜单子程序,时间子程序和显示子程序等来完成主程序的设计。利用Protues绘制电路图和仿真,利用Keil编写程序。在仿真成功后制作出租车计价器实物。通过仿真和实物实验,出租车计价器能够实现价格调整和实时计价等功能。59263
毕业论文关键字:出租车计价器,AT89S51单片机,LCD液晶显示,Protues
Abstract: with the development of the taxi industry, taxi has become an important part of the city transportation, while the development of the taxi meter is also concerned. This taxi meter uses the AT89S51 microcontroller as the core, through the clock circuit, the power circuit, the display circuit and the key circuit to complete the design of the main circuit. It measures the distance through the sensor to produce the pulse, displaying the real-time distance and total price. The price can also be adjusted through the menu setting. When the passenger gets on the car, it starts to count through the microcontroller, displaying the real-time distance and total price on the LCD screen. The design of the main program can be completed through the menu subroutine, time subroutine, and display subroutine, using the C language programming. It uses the Protues to draw the circuit diagram and simultation, and writes programs using Keil. After the successful simulation, the taxi meter material object is made. Through the simulation and material object experiment, the taxi can realize the function of price adjustment and real-time pricing.
Keywords: taxi meter, AT89S51 microcontroller, LCD liquid-crystal display, Protues
1 绪 论 4
1.1课题背景与意义 4
1.2 单片机的概述 4
1.3 本文研究内容 5
2 出租车计价器总体方案设计 5
2.1 设计要求 5
2.2 设计方案 6
3 硬件系统的设计 7
3.1 硬件电路系统设计 7
3.2 显示电路 9
3.3 复位电路 10
3.4 掉电保护电路 10
3.5 时钟电路 11
3.6 按键电路 11
4系统软件设计 12
4.1 软件总体设计 12
4.2系统程序设计 12
4.3 判键子函数 14
4.4 显示子程序 15
4.5 菜单子程序 15
5 系统调试 16
5.1软件调试 17
5.2系统仿真 18
5.3实验 20
总结 23
致谢 24
参考文献 25