智能仪表综合训练课程设计-基于单片机的汽车计价器设计.doc
文本预览下载声明
内蒙古科技大学
智能仪表综合训练设计说明书
题 目:基于单片机的汽车计价器设计
学生姓名:
学 号:
专 业:测控技术与仪器
班 级:
指导教师:
汽车计价器设计与实现
摘要
本设计的是一个基于单片机AT89C52的出租车自动计费设计,可实现的主要功能有:数据的复位、白天/晚上转换、数据输出、计时计价、单价输出及调整、路程输出、实现在系统掉电的时候保存单价和系统时间等信息等功能。输出采用LCD显示。
该设计附有复位电路,时钟电路,键盘电路,LCD1602显示电路等。
(1)复位电路是单片机的初始化操作,除了正常的初始化外,为摆脱困境,通过复位电路可以重新开始。
(2)时钟电路采用12MHz的晶振,作为系统的时钟源,具有较高的准确性。
(3)键盘电路采用了四个按键,S1、S2、S3、S4,其功能分别是:S1 分屏显示切换按键,S2功能设定按键,S3 .+./白天晚上切换按键,S4 .-./中途等待开关。
(4)在上电时字符型液晶1602显示最初的起步价,里程收费,等待时间收费三种收费。在1602液晶上可以显示运行的时间,运行时暂停的时间,通过计算可以得出总共的费用和总的路程。在这里主要是以AT89S52单片机为核心控制器,P0口接1602液晶显示模块,P1口接按键的,通过按键输入。
本系统假设速度恒定60Km/h(1Km/min),白天起步价为6元/2公里,夜间起步价为6.5/2公里 ,超过两公里加1.3元/公里,等待超过2分钟,1.5/分钟。
关键词:出租车计费器;霍尔传感器;STC89C52RC;DS1302;LCD1602
Auto meter design and Implementation
Abstract
This design is based on a single chip AT89C52 taxis design, can achieve the main functions are: data reduction, day / night conversion, data output, timing, price adjustment, and valuation of output. Output, implemented in the system power off when preservation of monovalent and system time information and other functions. Output using LCD display.
The design with the reset circuit, clock circuit, keyboard circuit, LCD1602 display circuit.
( 1) reset circuit is a single chip initialization operation, in addition to the normal initial acquisition, to cast off predicament, the reset circuit can start again.
( 2) the clock circuit using a 12MHz crystal, as the system clock source, with higher accuracy.
( 3) the keyboard circuit uses four keys, S1, S2, S3, S4, its functions are: S1 split screen display toggle button, S2 function set key, S3. +. / day and night switching button, S4. -. / Midway for switch.
( 4) in the upper electricity character liquid crystal display 1602 original starting price, mileage charges, waiting time charges three charges. In 1602 the LCD can display the running time, operation suspension can be obtained by the computation time, the total cost and the total distance. Here is mainly to the AT
显示全部