ADC0832数字电压表 下载本文

毕业设计(论文)

摘 要 单片计算机即单片微型计算机。(Single-Chip Microcomputer),是集CPU ,RAM ,ROM 定时,计数和多种接口于一体的微控制器。它体积小,成本低,功能强,广泛应用于智能产业和工业自动化上。近年来随着计算机在社会领域的渗透, 单片机的应用正在不断地走向深入,同时带动传统控制检测日新月益更新。在实时检测和自动控制的单片机应用系统中,单片机往往是作为一个核心部件来使用,仅单片机方面知识是不够的,还应根据具体硬件结构,以及针对具体应用对象特点的软件结合,以作完善。而51系列单片机是各单片机中最为典型和最有代表性的一种。这次毕业设计通过对它的学习,应用,从而达到学习、设计、开发软、硬的能力。

简易电压表是利用模拟量转换成数字量经单片机处理并反映在显示器上,它可以分析5V的电压,并能用该电压表可测出该电路的电流和电阻值。

本文介绍了电压表的使用和开发环境,仿真系统和开发使用的MCS-51系列的单片机芯片。在第二章论述了总体设计过程,确定了技术指标及器件的选择第四章着重描述了系统硬件电路设计、硬件设计框图及所使用的各种芯片功能与特性。 关键词:电压表、 单片机技术、A/D转换

- 1 -

Abstract

With the infiltration in the social field of the computer in recent years, the application of the one-chip computer is moving towards deepening constantly, drive tradition is it measure crescent benefit to upgrade day to control at the same time. In measuring in real time and automatically controlled one-chip computer application system, the one-chip computer often uses as a key part, only one-chip computer respect knowledge is not enough, should also follow the structure of the concrete hardware , and direct against and use the software of target's characteristic to combine concretly, in order to do perfectly. The pressure system of much passways of simulation utilizes the pressure sensor to gather the pressure at present and reflect by display, it can analyse excessive Cheng of the pressure , sends out and reports to the police. It can be according to inputting the amount of money of calculating out the object with accurate unit price to adopt the principle of the electronic scale. This text has introduced the research meaning of this system and development environment used in the introduction at first, artificial system of the big good fortune and developing the one-chip computer chip of MCS-51 series used. Have described the overall design process in chapter two, have confirmed chapter three of choice of technical indicator and device has described emphatically that designs the block diagram and various kinds of chip functions and characteristics used in circuit design of the systematic hardware , hardware, have analyzed the design course of the software especially in chapter four.

Keyword: Electric voltage form, technology of the one-chip computer , A/D change

- 2 -

目 录

引言 ???????????????????????????????? 4 1 核心芯片简介???????????????????????????? 5 2 AT89S51简介???????????????????????????? 8 2.1 AT89S52芯片的引脚及特点????????????????????? 8 2.2 AT89S52的主要性能参数?????????????????????? 11 2.3 AT89S52的新功能????????????????????????? 11 3 方案设计?????????????????????????????? 12 4 软硬件设计????????????????????????????? 13 4.1 硬件电路设????????????????????????????13 4.2 单片机AT89S52外围电路设计????????????????????13 4.3 ADC0832与单片机的接口设计?????????????????? 14 4.4 显示设计?????????????????????????????14 4.5 电源设计?????????????????????????????14 5 结论???????????????????????????????? 15 6 致 谢????????????????????????????????15 7 参考文献 ??????????????????????????????16 附录一 设计总电路图????????????????????????? 17 附录二 设计总PCB图????????????????????????? 18 附录三 电压表源程序????????????????????????? 19

引 言

电压、电流、功率是表征电信号能量大小的三个基本参量。在电子电路中,只- 3 -

要测量出其中一个参量就可以根据电路的阻抗求出其它二个参量。考虑到测量的方便性、安全性、准确性等因素,几乎都用测量电压的方法来测定表征电信号能量大小的三个基本参量。此外,许多参数,例如频率特性、谐波失真度、调制度等都可视为电压的派生量。所以电压的测量是其它许多电参量,也包括非电量测量的基础。 电压是基本的电参数,其它许多电参数可看作电压的派生量,由于电压测量方便,因此电压测量是电子测量中最基本的测量。按测量结果的显示方式可将电子电压表分为模拟式和数字式两大类。数字式电压表的核心是A/D转换器,A/D转换器最基本的两种类型是积分型和比较型。前者抗干扰能力强,测量精度高,但测量速率低;后者测量速度快,但抗干扰能力差。总的来说,积分型特别是双斜积分式DVM性能较优,应用较广泛。 数字电压表除具有一般的所具有的准确度高、数字显示、读数迅速准确、分辨力高、输入阻抗高、能自动调零、自动转换量程、自动转换及显示极性等优点,因而体积小,可靠性好,操作简便,由于数字电压表具有上述这些优点,使得它获得越来越广泛的应用。 使用数字万用表的注意事项: (1)要注意该电压表的量程,切误测量比额定值大。 (2)电压表使用或存放应避免高温、寒冷、阳光直射、高湿度及强烈振动环境。

1 核心芯片简介

1 ADC0832芯片

ADC0832具有以下特点:(1)8位分辨率;(2)双通道A/D转换;(3)输入输出电平与TTL/CMOS相兼容;(4)5V电源供电时输入电压在0~5V之间;(5)工作频率为250KHZ,转换时间为32μS;(6) 一般功耗仅为15mW;(7)8P、14P—DIP(双列直插)、PICC多种封装;(8)商用级芯片温宽为0°C to +70°C?,工业级芯片温宽为40℃- +85℃

引脚及功能:

图 6-1-1 DAC0832引脚图

CS:片选使能,低电平有效

CH0:模拟输入通道0,或作为IN+/-使用 CH1:模拟输入通道1,或作为IN+/-使用 GND:芯片参考0电位(地)

DI:数据信号输入,选择通道控制 DO:数据信号输出,转换数据输出

- 4 -