课程设计--出租车计价器.doc
文本预览下载声明
摘 要
本设计的是一个基于c51单片机的出租车自动计费设计,附有复位电路,时钟电路,键盘电路和显示电路等。复位电路是单片机的初始化操作,除了正常的初始化外,为摆脱困境,通过复位电路可以重新开始。时钟电路采用12MHz的晶振,作为系统的时钟源,具有较高的准确性。
在上电时字符型数码显示器显示最初的起步价,但超过3km时计价器会在起步价的基础上再按每里程收费,通过按键可以启动,清除显示器的显示价钱。通过计算可以得出总共的费用和总的路程。在这里主要是以AT89S51单片机为核心控制器,P0口和P2口接七段显示器模块,P1口接按键的,通过按键输入启动和清除总价格。
关键词:单片机AT89C51;七段数码显示器7SEG-MPX4-CA;出租车计费器。This design is a based on c51 taxi automatic bill design, with reset circuit, clocking circuit, the keyboard circuit and show circuit, etc. Reset circuit are the initialization of single chip, in addition to the normal operation of the initial barbarian, difficulty, through to reset circuit can start again. The 12 MHz clock circuit of crystals, as the system clock source, has enough precision.
When power in character type digital display shows the first started value, but more than 3 km the meter will start in price when on the basis of every mileage charge, then press the button can be activated by the display of the display, clear price. Can be obtained by the computation of the total cost, and general journey. Here are based on AT89S51 as the core controller, mouth and P2 P0 mouth pick seven segment display module, pick buttons, the P1 mouth by keystroke start and remove the total price.
目 录
摘 要 1
目 录 2
第一章 出租车计价器的设计题目要求 3
1.1设计题目 3
1.2设计要求 3
第二章 出租车的总体设计方案 3
2.1方法论证与比较 3
2.2 工作原理 5
2.21工作原理框图如下: 5
2.22 工作原理: 6
2.3 所需设备及软硬件 6
第三章 出租车硬件电路设计 6
3.1 AT89S51介绍 7
3.11主要的功能特性 7
3.12 管脚功能 8
3.2 LED数码管介绍 9
3.3单片机最小系统 11
3.4振荡电路 12
3.5 复位电路 12
3.6 按钮接口电路 13
3.7 显示电路 13
第四章 系统软件设计 14
4.1 proteus软件介绍 14
4.2 keil软件介绍 15
4.3利用proteus与keil进行调试 15
4.4 主程序流程图 16
4.5子程序流程图 16
4.51 键盘扫描子程序 16
4.52 处理总价子程序 17
4.53 显示总价子程序 18
第五章 设计调试结果和设计心得以及参考资料 20
5.1 设计调试结果 20
5.2 设计中的问题及解决方法 20
5.3 设计心得 20
5.4参考资料 21
附录: 21
附录一:程序清单 21
附录二、系统总体电路图 26
附录二、仿真图 27
第一章 出租车计价器的设计题目要求
1.1设计题目
出租车计价器
1.2设计要求
利用单片机设计一个出租车自动计费器,计费包括起步价、行车里程计费、用4个七段数字显示器显示总金额,最大值为999.9元,起步价为5.0元,3Km之内按起步价计费,超过3Km之后1.6元/公里,每200米计价跳表(即1KM增加1.6元,200m增加0,32元
显示全部