1、 基于基于 AT89C51AT89C51 单片机的数字电压表设计单片机的数字电压表设计 1 目目 录录 0 引言 . 1 1 系统整体设计思路及方案 . 1 1.1 设计思路 1 1.2 设计方案 1 2 数字电压表的硬件设计 . 2 2.1 主控制模块的设计 2 2.1.1 AT89C51 性能简介 . 2 2.1.2 AT89C51 各引脚功能 . 2 2.1.3 AT89C51 的复位电路和时钟电路 . 4 2.2 A/D 转换模块的设计 5 2.2.1 ADC0808 的主要特性 . 6 2.2.2 ADC0808 各引脚功能 6 2.3 显示电路的设计 7 2.4 总体电路设计图 9
2、 3 数字电压表的软件设计. 10 3.1 设计流程图 10 3.2 各子程序简介 11 4 仿真 11 4.1 软件调试 11 4.2 误差分析 11 5 结论 12 参考文献. 13 附录. 14 致谢. 16 1 基于基于 AT89C5AT89C51 1 单片机单片机的数字电压表设计的数字电压表设计 摘要摘要:数字电压表是常用的对电子电路进行检测的较精密仪器之一。本文的设 计思想是一种基于单片机的数字电压表设计方式。该设计主要由三个模块组 成:A/D 转换模块、数据处理主控模块和显示模块。A/D 转换模块主要由芯片 ADC0808来完成,它负责将采集到的模拟量转换为相应的数字量传送到数据
3、处理 模块 (单片机) 。数据处理主控模块由单片机AT89C51来完成,它负责将ADC0808 传送过来的数字量经过一定的数据处理,产生相对应的显示码传送到显示模块 进行显示。此外,它还控制芯片 ADC0808 的工作。经过仿真软件结果表明本设 计中的电压表电路简单,所用元件较少,成本低且测量精度高。此电压表可以 测量 05V 的模拟输入电压值,并通过一个四位一体的 7 段数码管显示出来。 关键词关键词:数字电压表;单片机;A/D 转换;AT89C51;ADC0808 2 The design of digital voltage meter based on AT89C51 single c
4、hip microcomputer Abstract: digital voltage meter is one of the more commonly used detection precision instrument for electronic circuit. The design is a design method based on single chip digital voltage meter. The design consists of three modules: A/D module, data processing, the main control modu
5、le and display module. The A/D conversion module is mainly completed by the ADC0808, which is responsible for converting the collected analog to digital quantity corresponding to a data processing module (MCU). Data processing by the MCU AT89C51 to complete the main control module, which is responsi
6、ble for the digital ADC0808 transmission after data processing, generate the corresponding display code is sent to the display module for displaying. In addition, it also control chip ADC0808 work. The design of the voltage meter circuit is simple, less elements used, low cost and high measurement accuracy. The analog input voltage can be measured in 0 5V of the value of the voltage meter, and through 7 digital tubes a four integrated display. Keywo