长春工业大学人文信息学院毕业设计(论文)
摘 要
随着人们生活水平的不断提高,消费水平也日渐增高,而在日常生活中,现金交易的不易携带、容易丢失、流通不方便情况给人们生活带来了很多不利,现代化城市开始朝着一卡通方向发展。IC卡(Integrated Circuit Card,集成电路卡)是将一个微电子芯片嵌入符合ISO7816标准的卡基中的新型卡片,主要嵌有IC(E2PROM,有的还有CPU)。由于它保存的信息比较可靠安全、可以高达几万次的读写,所以大量应用于公交车票 、饭票 、保健卡、收费系统等。
本设计是一种IC卡自动加油机。它是基于IC卡技术、单片机技术和电子技术,辅以各种功能的接口电路设计的具有自动计量、自动收费和统计功能的IC卡加油机。
文章中介绍了元器件和芯片的选择,给出了硬件和软件的实现,并对主要电路进行了分析。
本设计的IC卡加油机的硬件系统由AT89C51、74LS373、ADC0809、SSR600、SLE4442等组成。由ADC0809完成对输入电压的测取与转换,由继电器完成对油泵的起、停的控制,由流量传感器检测加油量。文章还对系统采用的抗干扰措施作了简单的介绍。
本设计的IC卡加油机的系统软件包括主程序、中断服务程序和两个子程序。 此设计的IC卡自动加油机具有精度高、功能强、实用简单等特点,使用表明操作方便、读写可靠效果良好。
关键词: IC卡 加油机 单片机
I
长春工业大学人文信息学院毕业设计(论文)
Abstract
As people living standard rise ceaselessly, consumption level is also increased, and in daily life, cash transactions not carry, easy to lose, circulation is not convenient for people to life with many adverse, modern city start toward card direction. IC Card (Integrated Circuit Card, Integrated circuits, luca) is a microelectronics chip embedded with ISO 7816 standard Card of the new Card, main studded with IC (E2PROM chips was, and some still have CPU). Because it holds information more reliable safety, can be as high as tens of time, speaking, reading and writing, so a large application in bus fare, meal ticket, health card, charge system, etc.
This design is a type of IC card tanker. The IC card tanker system developed by means of IC card, single-chip and electronic technology. It has auto-measuring, auto-charging and statistics-gathering functions.
In the text, introduces the chose of components and chips. The realization of hardware and software is detail given. And the main circuit is minutely dissected.
The hardware system is made of AT89C51, 74LS373, ADC0809, SSR6OO, and SLE4442 and so on. The ADC0809 is use to check and given voltage current and input voltage, relay control the oil Pump stop or run. The flow sensor examination adds the oil mass. And the system describes and adjusts the approach to anti interference.
This design software system including master procedures, interrupt service procedures and several stature procedures.
This system has so mach character, such as, high precise, better ability, advance and convenient use and to on .The tanker is easy to use and reliable
II
长春工业大学人文信息学院毕业设计(论文)
to read or write, and it makes good effect.
Keywords: IC card tanker single-chip
III
长春工业大学人文信息学院毕业设计(论文)
目 录
第1章 绪 论 ..................................................... - 1 - 1.1 IC卡自动加油机概述 .......................................... - 1 - 1.2 加油机发展及现状 ............................................ - 2 - 1.3 IC卡应用现状 ................................................ - 3 - 第2章 IC卡自动加油机方案的确定 ................................. - 5 - 2.1 IC卡自动加油机的工作原理 .................................... - 5 - 2.2 IC卡自动加油机的总体方案 .................................... - 6 - 2.3 IC卡的选择 .................................................. - 7 - 2.3.1 IC卡应用的安全性和可靠性 ............................... - 7 - 2.3.2 SLE4442简介 ............................................ - 8 - 2.4 单片机的选择 ............................................... - 12 - 2.4.1 单片机应用概况......................................... - 12 - 2.4.2 AT89C51功能简介 ....................................... - 13 - 2.5 流量计的选择 ............................................... - 15 - 2.5.1 影响加油机加油量准确度的因素........................... - 15 - 2.5.2 涡街流量计............................................. - 16 - 2.5.3 涡街流量计型号的选用................................... - 17 - 第3章 IC卡自动加油机的硬件设计 ................................ - 18 - 3.1 硬件系统的设计原则 ......................................... - 18 - 3.2 数据采集通道的设计 ......................................... - 19 - 3.2.1 模/数转换............................................. - 19 - 3.2.2 数据采集电路........................................... - 20 -
IV
长春工业大学人文信息学院毕业设计(论文)
3.3 AT89C51的复位电路 .......................................... - 21 - 3.4 AT89C51单片机的系统扩展................................... - 22 - 3.4.1 AT89C51扩展的三总线 ................................... - 22 - 3.4.2 片外EPROM的扩展....................................... - 23 - 3.4.3 片外RAM的扩展......................................... - 25 - 3.4.4 I/O口扩展 ............................................. - 27 - 3.5 后向通道配置 ............................................... - 29 - 3.5.1 固态继电器工作原理..................................... - 30 - 3.5.2 后向通道电路图......................................... - 30 - 3.6 键盘接口及显示接口电路 ..................................... - 31 - 3.6.1 键盘接口电路 ........................................... - 31 - 3.6.2 报警及LED显示......................................... - 33 - 3.7 IC卡接口电路 ............................................... - 34 - 3.8 提高系统运行的可靠性 ....................................... - 35 - 3.8.1 硬件的干扰要素......................................... - 35 - 3.8.2 “看门狗” 电路........................................ - 35 - 第4章 IC卡自动加油机软件设计 .................................. - 37 - 4.1 软件设计思想 ............................................... - 37 - 4.2 主程序流程图 ............................................... - 38 - 4.3 中断服务程序和IC卡安全码校验程序流程图 .................... - 39 - 4.4 键盘扫描程序流程图 ......................................... - 40 - 4.5 显示程序流程图 ............................................. - 41 - 总 结 .......................................................... - 42 - 致 谢 .......................................................... - 43 - 参考文献 ........................................................ - 44 - 附录1:IC卡自动加油机原理图 .................................... - 45 - 附录2:主程序 .................................................. - 46 -
V