摘要本文提出了一种以MCS—51系列单片机8051为主要控制芯片,辅之以其他功能芯片对太阳能热水器进行控制的设计方案,使太阳能热水器使用起来更加方便、安全。本设计采用的是8051单片机,其内部ROM容量为256B,对于本设计,无须外部扩展存储器。除了8051,本设计还用到一些重要的外部功能器件,如采用AD转换器0809来实现温度和水位信号的模数转换,还有可编程输入输出接口8255来实现键盘和显示器接口。键盘由四个按键来设置水温或水位,用六位LED显示器分别显示水温和水位。本设计充分利用8051单片机系统的三总线控制,即数据总线、地址总线、控制总线的设计方式,为应用系统功能的实现奠定了基础。通过对8051单片机的外部功能扩展使系统具有自动上水与保温的功能,还能自动驱动加热及上水装置来满足系统的设置,使用起来安全可靠。此外设计方案中还考虑了一些抗干扰措施,例如采用光电隔离器4N25使输入输出有效隔离,采用硬件去抖动措施解决按键抖动的问题等等。本文阐述了此应用系统的工作原理,并给出部分硬件及软件框图。关键字:单片机,温度控制,水位控制1AbstractThispaperpresentsaMCS-51seriessinglechipmicrocomputer8051asmaincontrolchip,supplementedbyotherfunctionsofthesolarwaterheatercontrolchipdesign,makethesolarwaterheaterismoreconvenientinuse,safe.ThisdesignusestheMCU8051,itsinternalROMcapacityis256B,forthedesign,withoutanexternalextendedmemory.Inadditiontothe8051,thedesignisalsousedinsomeimportantexternaldevices,suchastheuseofADconverter0809toachievethetemperatureandthewaterlevelsignaltotheanalog-to-digitalconversion,andtheprogrammableinput/outputinterface8255torealizethekeyboardanddisplayinterface.Thekeyboardconsistsoffourbuttonstosetthewatertemperatureandwaterlevel,sixLEDdisplayrespectivelydisplaywatertemperatureandwaterlevel.Thedesignmakesfulluseof8051single-chipmicrocomputersystemthreebuscontrol,databus,theaddressbus,controlbusdesign,fortheapplicationofthesystemfunctionrealizationfoundation.Basedon8051single-chipexternalextendedfunctionmakesthesystemhavingautomaticwaterandthermalinsulationfunction,canautomaticallydrivenheatingandwatersupplydevicetosatisfytheneedsofsystemsettings,theuseofsafeandreliable.Inaddition,thedesignschemeisalsoconsideredinsomeanti-jammingmeasures,suchastheuseofphotoelectricisolator4N25sothattheinput/outputeffectiveisolation,usehardwaretoshakethemeasurestosolvethekeyjitterproblemsetc..Thisarticledescribestheapplicationoftheworkingprincipleofthesystem,andgivesthehardwareandsoftwareblockdiagram.Keywords:SCM,temperaturecontrol,waterlevelcontrol23目录绪论........................................................................................................41.1本课题研究的目的、意义............................................................41.2国内外研究现状............................................................................51.3目前我国太阳能热水器的种类...................................................61.4研究的内容....................................................................................9第一章系统总体设计方案...................................................................111.1设计思路..................................................................................111.2设计总框图..............................................................................12第二章系统硬件部分设计....................................................................132.1数据采集..................................................................................132.2数据转换...........................................