1、 摘要 本文提出了一种以 MCS51 系列单片机 8051 为主要控制芯片,辅之以其 他功能芯片对太阳能热水器进行控制的设计方案, 使太阳能热水器使用起来更 加方便、安全。 本设计采用的是 8051 单片机,其内部 ROM 容量为 256B,对于本设计,无 须外部扩展存储器。除了 8051,本设计还用到一些重要的外部功能器件,如采 用 AD 转换器 0809 来实现温度和水位信号的模数转换, 还有可编程输入输出接 口 8255 来实现键盘和显示器接口。键盘由四个按键来设置水温或水位,用六 位 LED 显示器分别显示水温和水位。本设计充分利用 8051 单片机系统的三总 线控制,即数据总线、地址
2、总线、控制总线的设计方式,为应用系统功能的实 现奠定了基础。通过对 8051 单片机的外部功能扩展使系统具有自动上水与保 温的功能,还能自动驱动加热及上水装置来满足系统的设置,使用起来安全可 靠。此外,设计方案中还考虑了一些抗干扰措施,例如采用光电隔离器 4N25 使输入输出有效隔离,采用硬件去抖动措施解决按键抖动的问题等等。 本文阐述了此应用系统的工作原理,并给出部分硬件及软件框图。 关键字: 单片机,温度控制,水位控制 ABSTRACTABSTRACT This paper presents a kind of design about controlling solar energy w
3、ater-heater with 8051 and other external facility, making solar energy water-heater more conveni- ency. What this design adopt is 8051, with four thousand units of internal RAM capacity and two hundred and fifty-six units of internal ROM capacity which include the special function register. For this
4、 design, it has no necessary to e xpand external memorizer. Besides 8051,this design still uses some important external interface facility. For example, I adopt conversion 0809 to realize the transform of water temperature and water level. Furthermore, I control the ke y-set and display with programmable interface 8255. The design makes use of the three-bus-mastering namely total line of data, total line of address and tot al line of control adequately. So it is easy to realize the function of