基于单片机的模拟量数据采集系统设计
摘 要
随着计算机技术的飞速发展和普及,数据采集系统也得到了广泛的应用。微机在通用自动化、信息处理、信息系统等方面得到广泛的应用。在冶金、化工、医疗等应用场合,需要对很多信号进行采集,预处理,暂存和对上位机的传输。再由上位机对数据进行分析处理。
本文设计的模拟量采集系统采用上位机、下位机通信方式运行。由上位机实现对下位机的控制和数据采集的显示,下位机实现模拟量的采集过程。下位机硬件设计采用AT89C52单片机为控制核心,采用ADC0808将模拟量进行转化为数字量进行采集,完成了模拟量采集系统的硬件设计。采用RS-232进行串口通信。结果证明,该设计方法可行,实现了离散量采集系统的自动化,克服了传统数据采集的弊端,应用具有良好的前景和使用价值。
关键词:模拟量采集系统;单片机;通信
Abstract
Along with the rapid development of computer technology and popularization, data acquisition system is also widely application. Microcomputer is widely applied in general automation, information processing and information system etc . Signal acquisition, pretreatment, temporary and PC transmission is needed by metallurgy, chemical, medical care and other applications。The design is a discrete variables acquisition system with upper and lower operating mode. The PC machine controls the lower machine and display the date, and the lower machine realizes data collection. Hardware design of digital machines AT89C52 single-chip design Used for RS-232 serial communication, you can relay through the computer to control the realization of the bright lights out billiards control and manual control switch can monitor. The results proved that the design method is feasible to achieve a billiards automated agency management system to overcome the drawbacks of traditional
management
methods,
the
application
system;
communication
目 录
1 绪论 .............................................................................................................................. 1 1.1 课题背景 ................................................................................................................. 3 1.2 课题相关技术 ......................................................................................................... 4 1.3 课题任务及要求 ..................................................................................................... 9 1.4 课题内容及安排 ................................................................................................... 10 2 系统方案设计 ............................................................................................................ 12 2.1 方案设计原则 ....................................................................................................... 12 2.2 方案设计 ............................................................................................................... 13 3 系统硬件设计与设备选型 ........................................................................................ 15 3.1 单片机模块 ........................................................................................................... 15 3. 1.1 AT89C52介绍 .............................................................................................. 16 3.1.2 单片机最小系统 ........................................................................................... 27 3.2 AD转换模块 .......................................................................................................... 30 3.2.1 AD转换 ......................................................................................................... 30 3.2.2 ADC0808介绍............................................................................................... 30 3.3 输入模块 ............................................................................................................... 35 3.4 串口模块 ............................................................................................................... 36 3.5 电源模块 ............................................................................................................... 41