1、 摘摘 要要 单片机是一种集成电路芯片,采用超大规模技术把具有数据处理能力(如算术运 算,逻辑运算、数据传送、中断处理)的微处理器(CPU)。单片机可单独地完成现代工 业控制所要求的智能化控制功能,这是单片机最大的特征。单片机控制系统能够取代 以前利用复杂电子线路或数字电路构成的控制系统,可以软件控制来实现,并能够实 现智能化。 本文介绍一种以 89S52 单片机为主要控制器件,采用常见的 ADC0809 作为 A/D 转换器的一种电压测量电路。主要包括硬件电路设计和软件程序设计。硬件电路主要 包括数据采集模块,数据处理模块(单片机系统)和输出显示模块。在数据采集模块 中,主要是在对电压信号采
2、样前,用运算放大器 LM324 进行电压放大和电阻进行衰 减,后采用 ADC0809 进行转换,将转换得到的信号送入单片机中,利用 74HC4051 实现多档自动换挡及测量。在数据处理模块(单片机系统)中,通过 89S52 单片机将 A/D 转换后得到的信号进行处理。显示模块中,采用 LCD 液晶模块 1602 显示。在软 件设计方面,主要包括初始化程序,中断程序,AD 转换程序,档位选择程序和显示 程序等几个子程序模块。 系统可实现测量直流电压范围 0-20V,可实现 20V 档,2V 档,200MV 档间自动 换档,使用 LCD 液晶显示测量的电压值。 关键字关键字:电压测量;自动换档;A
3、DC0809;1602 液晶模块 ABSTRACT SCM is a kind of integrated circuit chip, using VLSI technology have data processing capabilities (such as arithmetic, logic operation, data transmission, interrupt processing) microprocessor (CPU).SCM can be done alone by the request of modern industrial control intelligen
4、t control function,,this is the biggest feature of SCM .Single chip microcomputer control system to replace the use of complex electronic circuits or digital circuit control system, software control can be achieved, and to achieve intelligent. This paper introduces a 89S52 microcontroller as the mai
5、n control device, adopts the common ADC0809 as A/D converter, a voltage measuring circuit .Mainly includes the design of hardware circuit and software program design. The hardware electric circuit mainly comprises a data acquisition module, data processing module (SCM system) and the output display
6、module .In the data acquisition module, mostly in the voltage signal before sampling, with operational amplifier voltage amplification, after using ADC0809 conversion, will convert the received signal into the microcontroller, using 74HC4051 to realize automatic measurement .In a data processing module (SCM system), through the 89S52 single-chip A/D converted signals are processed .The display module, using LCD liquid crystal display module 1602.In software design, including initialization, inte