基于单片机数字电压表的设计和仿真

  • 格式:doc
  • 大小:770.00 KB
  • 文档页数:44

摘要本文介绍的是数字电压表的发展背景和利用单片机,A/D 转换芯片结合的方法设计一个直流数字电压表。

它的具体功能是:最高量程为 200V,分三个档位量程,即2V,20V,200V,可以通过调档开关来实现各个档位,当测得电压的数值小于1V时,系统会自动的将电压数值转换为以mV为电压单位的电压值,并且通过按键的方法能够测得后五秒的平均电压值。

单片机是一种集成电路芯片,采用超大规模技术把具有数据处理能力(如算术运算,逻辑运算,数据传送,中断处理)的微处理器(CPU)。

随着单片机技术的飞速发展,各种单片机蜂拥而至,单片机技术已成为一个国家现代化科技水平的重要标志。

单片机可单独地完成现代工业控制所要求的智能化控制功能,这是单片机最大的特征。

单片机控制系统能够取代以前利用复杂电子线路或数字电路构成的控制系统,可以软件控制来实现,并能够实现智能化,现在单片机控制范畴无所不在,例如通信产品,家用电器,智能仪器仪表,过程控制和专用控制装置等等,单片机的应用领域越来越广泛。

本毕业设计的课题是"简易数字电压表的设计"。

主要考核我们对单片机技术,编程能力等方面的情况。

观察独立分析,设计单片机的能力,以及实际编程技能。

本课题主要解决A/D转换,数据处理及显示控制等三个模块。

控制系统采用AT89C51单片机,A/D转换采用TLC2543。

关键字介绍:单片机,AT89C51,A/D 转换,TLC2543,数据处理AbstractThis paper is the background of the development of digital voltmeter and using single chip computer, A/D conversion chip design method of the combination of the party A dc digital voltmeter. It is the specific function of: supreme range for 200 V, divide a gear range, namely 2 V, 20 V, 200 V, can switch to achieve each by shifting gear gear, when the voltage of the numerical less than 1 V, the system will automatically will convert to mV voltage values for the voltage is the voltage unit, and through the key method can measure five seconds after the average voltage.MCU is a kind of integrated circuit chip, using the technology with large scale data processing ability (such as the art operations, logic operations, data transfer, interrupt handling) of the microprocessor (CPU). With the rapid development of the single chip microcomputer, all kinds of single chip in great Numbers, microcontroller technology has become a national modernization level of science and technology.SCM can complete modern industrial control alone for the intelligent control function, it is the greatest feature of single chip microcomputer. Single-chip microcomputer control system can be replaced by complex electronic circuit or before digital circuit consists of the control system system, can control software to achieve, and to realize intelligent, now single-chip microcomputer control category is everywhere, such as communication products, household appliances, intelligent instruments, process control and special control device and so on, the application field of single chip microcomputer more and more widely.This graduate design topic is "simple digital voltmeter design". We mainly examine of single-chip processor technology technique, the programming ability, etc. Observe independent analysis, design of the single chip microcomputer ability, and the actual programming skills.This subject mainly to solve A/D conversion, data processing and display control and so on three modules. The control system adopts AT89C51 single chip microcomputer, A/D conversion using ADC0809.Keywords: A single-chip microcomputer, AT89C51, A/D conversion,ADC0809, data processing目录摘要 (1)Abstract (2)目录 (3)绪论 (5)第1章数字电压表简介 (7)1.1 设计背景 (7)1.2 设计意义 (8)第2章数字电压设计两种方案简介 (10)2.1 由数字电路及芯片构建 (10)2.2 由单片机系统及 A/D 转换芯片构建 (10)第3章单片机简介及本设计单片机的选择 (12)3.1 常用单片机的特点比较及本设计单片机的选择 (12)3.2 AT89C51简介 (12)3.3 AT89C51引脚功能 (14)图1 AT89C51的引脚排列 (14)3.4 AT89C51在连线时要注意的问题 (16)第4章显示器件的介绍和选择 (17)4.1 显示器件简介 (17)4.2 1602液晶的参数资料 (17)接口信号说明: (18)基本操作时序: (18)状态字说明 (18)指令的说明. (18)第5章模数(A/D)转换芯片的选择 (20)5.1 常用的A/D芯片简介 (20)5.2 模数(A/D)芯片 TLC2543 的资料 (20)第6章总体设计 (23)6.1 技术要求 (23)6.2 设计方案 (23)第7章硬件电路系统模块的设计 (24)7.1 单片机系统 (24)7.2 输入电路 (24)7.3 A/D 转换芯片与单片机的连接 (25)7.4 1602 液晶与单片机连接 (26)7.5 键盘与单片机的连接如下 (26)第8章系统软件的设计 (28)8.1 汇编语言和 C 语言的特点及选择 (28)8.2 主程序设计 (28)第9章系统的调试和仿真 (30)9.1 硬件调试 (30)9.2 软件调试 (30)9.3 程序仿真 (30)9.4 设计特点 (33)第10章总结与展望 (34)参考文献 (35)附录源程序 (36)绪论随着电子科学技术的发展,电子测量成为广大电子工作者必须掌握的手段,对测量的精度和功能的要求也越来越高,而电压的测量甚为突出,因为电压的测量最为普遍。

同时随着微电子技术的迅速发展和超大规模集成电路的出现,特别是单片机的出现,正在引起测量控制仪表领域的新的技术革命。

由于使用的是高效单片机作为核心的测量系统,以及灵敏度和精度较高的A/D转换器,使本直流电压表具有精度高、灵敏度强、性能可靠、电路简单、成本低的特点,加上经过优化的程序,使其有很高的智能化水平。

数字电压表相对于指针表而言读数直观准确,电压表的数字化是将连续的模拟量转换成不连续的离散的数字形式并加以显示。

这有别于传统的以指针与刻度盘进行读数的方法,避免了读数的视差和视觉疲劳。

数字电压表在1952年由美国NLS公司首次创造,它刚开始是4位,50多年来,数字电压表有了不断的进步和提高。

数字电压表是从电位差计的自动化过程中研制成功的。

开始是4位数码显示,然后是5位、6位显示,而现在发展到7位、8位数码显示;从最初的一两种类型发展到原理不同的几十种类型;从最早的采用继电器、电子管发展到全晶体管、集成电路、微处理器化;从一台仪器只能测1-2种参数到能测几十种参数的多用型;显示器件也从辉光数码管发展到等离子体管、发光二极管、液晶显示器等。

数字电压表的体积和功耗越来越小,重量不断变轻,价格也逐步下降,可靠性越来越高,量程范围也逐步扩大。

DVM的高速发展,使它已成为实现测量自动化、提高工作效率不可缺少的仪表,数字化是当前计量仪器发展的主要方向之一,而高准度DC-DVC的出现,又使DVM进入了精密标准测量领域。

随着现代化技术的不断发展,数字电压表的功能和种类将越来越强,越来越多,其使用范围也会越来越广泛。

采用智能化的数字仪器也将是必然的趋势,它们将不仅能提高测量准确度,而且能提高电测量技术的自动化程序,可以扩展成各种通用数字仪表、专用数字仪表及各种非电量的数字化仪表(如:温度计、湿度计、酸度计、重量、厚度仪等),几乎覆盖了电子电工测量、工业测量、自动化仪表等各个领域。