摘 要 在现代测量、控制领域中,远程多路数据采集己成为日益重要的测量技术,它广泛应用于农业试验田、粮库、卷烟厂、制药厂、油田、矿井等需要同时监控多路温度、湿度、瓦斯含量等不同场合。而PC104则以其体积小、集成度高、高可*性等优点,广泛应用于数据采集的各个领域。 本论文介绍一个数据采集控制系统,使用PC104,并通过CPLD实现数据采集及串行通信。系统电路包括滤波放大电路、数模转换电路,模数转换电路及串行通讯电路,以完成数据采样转换、显示、键盘输入 、数据发送接收等功能。 本论文介绍了数据采集系统的硬软件的设计与实现方法,着重介绍了软件的编程和调试工作,硬件部分作了简单介绍。 关键词:PC104;数据采集;控制系统;软件设计 ABSTRACT In the field of modern measurement and control,long-distance multichannel data collection has become more and more important measuring technology,so it’s widely applied in agricultural experiment field,grain mine and so on,where multichannel temperature,humidity,mine gas content are required to be monitored at the same time.Yet,because of its many advantages such as small volume,high intergration,high reliability,PC104 is widely used in every field of data collection. This paper introduces a control system of data collection.using PC104,via CPLD,to carry out the process of data collection and serial communication.The circuitry is made up of the circuit of filtrated waves amplifier,analog-to-digital convering circuit,digital-to-analog convering circuit and the circuit of serial communication,so it can fufill the functions concluding data sampling and convering,anddisplay,keyboard input ,send and receive datas . The thsis has introduced the design of the hardware and software of the data collecting system and implementation method,and it mostly introduce how to program and test the software, the part of hardware is mentioned also. Keywords: PC104;data collection;control system;design of software 目 录 第1章 绪论……………………………………………………………………1 1.1 概述……………………………………………………………………1 1.2 系统基本结构…………………………………………………………2 第2章 基本控制原理………………………………………………………3 2.1 数据采集基本原理……………………………………………………3 2.2 A/D转换器原理………………………………………………………6 2.3 D/A转换器原理………………………………………………………7 2.3.1无输入锁存的DAC与微机接口…………………………………7 2.3.2有输入锁存的DAC与微机的接口………………………………7 2.4串行通信原理…………………………………………………………7 2.4.1串行通信………………………………………………………7 2.4.2串行接口………………………………………………………8 2.5 CPLD的原理…………………………………………………………9 第3章 系统主体设计思想………………………………………………12 3.1 设计要求及任务……………………………………………………12 3.2 硬件思路……………………………………………………………12 3.3软件思路……………………………………………………………13 第4章 元器件介绍………………………………………………………15 4.1 PC104…………………………………………………………………15 4.1.1 PC104引脚信号………………………………………………15 4.1.2 PC104用途……………………………………………………21 4.2 AD7501及AD1674…………………………………………………22 4.2.1 AD7501…………………………………………………………22 4.2.2 AD1674产品介绍………………………………………………23 4.2.3工作过程………………………………………………………23 4.2.4 AD1674工作状态………………………………………………24 4.2.5 AD1674引脚含义………………………………………………24 4.3 DAC7625………………………………………………………………27 4.3.1介绍……………………………………………………………27 4.3.2工作过程………………………………………………………27 4.3.3引脚功能………………………………………………………28 4.4 16C2550………………………………………………………………31 4.4.1 16C2550的特点………………………………………………31 4.4.2引脚功能………………………………………………………32 第5章 软件设计……………………………………………………………35 5.1初始化…………………………………………………………………35 5.1.1定时器初始化…………………………………………………35 5.1.2 串口中断初始化………………………………………………35 5.2中断服务程序…………………………………………………………38 5.3 界面显示程序…………………………………………………………41 结论………………………………………………………………………43 参考文献………………………………………………………………………44 致谢………………………………………………………………………45 附录………………………………………………………………………46 第1章 绪论 1.1概述 PC104是一种存在于嵌入式领域的标准规格.最先进的嵌入式工业计算机PC/l04,以其优良的品质、高可*性及模块化,广泛应用于工业控制、航空航天、军事、医疗、消防设备、智能仪器仪表、导航、通讯、数控、自动化生产设备的从70年代起,数据采集系统发展过程中逐渐分为两类:一类是实验室数据采集系统,另一类是工业现场数据采集系统.20世纪80年代随着计算机的普及应用,数据采集系统得到了极大的发展,开始出现通用的数据采集与动测试系统.该阶段的数据采集系统主要有两类,一类以仪器仪表和采集器、通用接口总线和计算机等构成.第二类是以数据采集卡、标准总线和计算机构成.20世纪80年代后期,数据采集系统发生了极大的变化,工业计算机、单片机和大规模集成电路的组合,用软件管理,使系统的成本降低,体积减小,功能成倍增加,数据处理能力大大加强. PC104凭借紧凑的外形,成熟的标准体系结构,专业设计专业生产带来的高可*性,使硬件工程师只需专心于系统设计,功能设计,不用为单片机、CPU及其外围器件之间的复杂接口关系花费不必要的时间.标准的PC兼容体系结构使软件工程师大大减少 [1] [2] 下一页 |