I摘要这次的设计采用ATEML公司生产的AT89S51单片机为核心来设计智能电热水器。本设计也对单片机控制电热水器实现智能化的可能性进行了分析,利用温度传感器、水位检测装置、等来完成本设计。设计分成两个部分,在硬件设计方面,主要对单片机最小系统及其扩展、电源电路、键盘显示及接口电路、LED显示电路、水温检测电路、加热电路等进行了详细介绍。还详细介绍了设计中应用到的主要芯片的性能和特点,包括AT89S51、74LS240、DS18B20、74HC245等。在软件设计方面,采用汇编语言编程,是由于其易于为单片机所识别,执行速度快。该智能电热水器设计完善,实现方案简单易行。采用软件设计来控制,可以实现智能检测水位及水温,智能加热,并且提高了整机的可靠性及准确性。关键词:单片机;电热水器;智能;IIABSTRACTThisdesignUSESATEMLcompanyproducestheAT89S51asthecoretodesignintelligentelectricwaterheater.Thedesignofsingle-chipmicrocomputercontrolandthepossibilityofelectricwaterheaterrealizeintelligentanalyzed,usingtemperaturesensors,waterleveldetectionequipment,etctocompletethedesign.Designisdividedintotwoparts,intermsofhardwaredesign,mainlytothesinglechipminimizesystemanditsextension,powersupplycircuit,keyboarddisplayandinterfacecircuit,theLEDdisplaycircuit,watertemperaturedetectioncircuit,heatingcircuitdescribedindetail.Alsointroducesthemainapplicationtodesigncharacteristicsandpropertiesofthechip,includingAT89S51,74LS240,DS18B20,74HC245etc.Insoftwaredesign,useassemblylanguageprogramming,isduetoitseasytoidentify,executionbyMCUfastspeed.Thisintelligentelectricwaterheaterdesignperfect,theimplementationschemeissimple.Usingsoftwaredesignedtocontrol,canrealizeintelligentdetectionlevelsandwatertemperature,intelligentheating,andimprovethemachine'sreliabilityandaccuracy.Keywords:single-chipmicrocomputer;Electricwaterheater;intelligence;III目录摘要······································································································IABSTRACT······························································································II目录····································································································III1绪论···································································································11.1选题的背景、目的及意义······························································11.2国内外的研究状况和成果······························································22总体方案设计······················································································32.1设计目标以及方案选择·································································42.2芯片选择以及介绍·······································································52.2.1AT89S51介绍······································································52.3数字温度传感器DS18B20介绍·······················································82.3.1DS18B20的主要特性······························································82.3.2DS18B20工作原理······························································102.3.3DS18B20有4个主要的数据部件············································102.3.4DS18B20的应用电路···························································142.474LS240简介··············································································162.4.174LS240特点介绍······························································162.5LED数码管显示···········································································162.5.1LED数码管介绍································································162.5.2LED数码管显示方式和典型应用电路·····································172.5.3LED数码管编码方式··························································182.6固态继电器················································································192.6.1固态继电器工作原理···························································193硬件系统设计····················································································203.1硬件系统设计···········································································203.1.1电源电路··········································································203.1.2单片机系统电路·································································213.1.3键盘接口电路····································································243.1.4温度检测电路····································································243.1.5温度显示电路····································································253.1.6看门狗电路·······································································26IV3.1.7加热电路··········································································264软件系统设计····················································································274.1主程序流程框图··········································································274.2中断流程图·················································································284.3读温度子程序流程图····································································294.4显示子程序流程图········································································30结论····································································································31致谢····································································································32参考文献·····························································································33附录1:硬件电路图···············································································34附录2:程序清单·······································································