论文编号:ZD238 论文字数:15248,页数:37
摘 要
本设计是通过对单片机和专用电度表芯片(ATT7021)的学习,根据一定的设计要求,选用适当的元器件搭建硬件电路,利用软件程序的编译使其达到预期的功能。设计采用的ATT7021 是电子电度表的核心芯片,基于此芯片设计的电子式电度表具有外围电路简单、可靠性高、线性度与稳定性好等特点,适用于单相两线制电力用户的电能计量。主控部分采用STC89C58RD单片机,对电度表芯片的脉冲进行计数累加同时控制显示芯片MAX7219对其值进行显示。设计采用八位七段数码管为显示器对电量的测量值可以进行方便的读取。同时设计采用串口RS-232电路可以方便的与计算机连接,随时可以对程序进行修改调试,提高设计产品的性能。
关键词:STC89C58RD+,ATT7021,MAX7219,多功能电量仪
Design of Coulombmeter of Different
Functions Base on MCU and
Special Chips
Abstract
With the knowledge of the MCU and the electric meter of special purpose (ATT7021) and certain designing directive, this design provides a circuit of hardware with suitable parts and makes use of the translation of the programmer to achieve the anticipated function. The core chip is designed as ATT7021, base on which the electric meter of electronics is awarded the characteristics of simple peripheral circuits, high reliability, good linearity and fine stability, as well as the application of measuring the quantity of the electric energy for the users of the single-phase-two-section electric system. The central controlling part is designed as the STC89C58RD MCU, which counts the pulse and makes the chip MAX7219 to indicate it. And the LED goes to seven-section digital tube of 8 bits, which can conveniently observe the value of the electric quantity. The serial circuit RS-232 is connected to the computer to revise and debug the programmer, enhancing the performance of the product designed.
Keywords: STC89C58RD, ATT7021, MAX7219, Functional electric meter
目 录
摘要………………………………………………………………………………… Ⅰ
Abstract…………………………………………………………………………… Ⅱ
第 1 章 序言 …………………………………………………………………… 2
1.1 课题背景 ……………………………………………………………… 2
1.2 立题的目的和意义 …………………………………………………… 3
第 2 章 多功能电量仪的总体分析与设计 …………………………………… 4
2.1 多功能电量仪的工作原理 …………………………………………… 4
2.2 多功能电量仪的测量系统 …………………………………………… 4
2.3 多功能电量仪的控制系统 …………………………………………… 8
2.3.1 8051系列单片机介绍 ………………………………………… 8
2.3.2 STC89C58RD+型单片机介绍…………………………………… 11
2.4 多功能电量仪的显示系统 …………………………………………… 13
2.4.1 MAX7219的内部结构 ………………………………………… 13
2.4.2 MAX7219的操作指令 ………………………………………… 13
2.4.3 MAX7219与单片机的连接……………………………………… 17
2.5 多功能电量仪的通讯系统…………………………………………… 19
2.6 硬件电路设计说明…………………………………………………… 22
第 3 章 软件系统设计………………………………………………………… 23
3.1 C与8051 ……………………………………………………………… 23
3.2 软件的总体设计 …………………………………………………… 23
3.3 系统初始化模块……………………………………………………… 24
3.4 显示模块软件设计…………………………………………………… 27
3.5 设计参考程序………………………………………………………… 28
第 4 章 系统的调试安装……………………………………………………… 29
4.2 软件的调试…………………………………………………………… 29
4.3 硬件的调试…………………………………………………………… 30
致谢 ……………………………………………………………………………… 31
参考文献 ………………………………………………………………………… 32
附录一 …………………………………………………………………………… 33
附录二 …………………………………………………………………………… 34