【正文】
............... 17 軟件總體設計思路 ................................................................................................... 17 操作界面效果圖 ............................................................................................. 17 主要程序模塊圖 ............................................................................................. 17 主程序模塊 ............................................................................................................... 18 內存地址的分配表 ........................................................................................ 18 主程序的初始化內容 .................................................................................... 18 主程序模塊流程圖 ........................................................................................ 18 主程序初始化 ................................................................................................ 19 溫度測量模塊 ........................................................................................................... 20 溫度監(jiān)測子程序 ............................................................................................. 20 數(shù)據(jù)處理子程序 ............................................................................................. 21 水位測量模塊 ........................................................................................................... 22 時間整定模塊 ............................................................................................................ 23 DS12887 初始化子程序 .................................................................................. 23 讀當前時間子程序 ........................................................................................ 23 LCD 顯示模塊 ............................................................................................................. 23 鍵盤模塊 ................................................................................................................... 24 鍵盤模塊描述 ................................................................................................. 24 鍵盤掃描子程序流程圖 ................................................................................. 24 中斷模塊 .................................................................................................................... 25 外部中斷 1 子程序 ........................................................................................ 25 定時器 T0 中斷子程序 .................................................................................. 26 第 5 章 系統(tǒng)仿真與調試 ........................................................................................................ 28 Proteus 仿真環(huán)境 .................................................................................................... 28 系統(tǒng)調試過程 ............................................................................................................ 29 部分硬件仿真及調試結果 ........................................................................................ 31 DS1302 仿真及調試結果 ................................................................................ 31 DS18B20 仿真及調試結果 ............................................................................. 31 系統(tǒng)局部仿真及調試結果 ........................................................................................ 32 系統(tǒng)設計不足與改進 ................................................................................................ 33 自動清洗功能 .................................................................................................... 33 防凍處理 ............................................................................................................ 33 輔助上水功能 .................................................................................................... 33 結束語 ...................................................................................................................................... 34 參考文獻 .................................................................................................................................. 35 致謝 .......................................................................................................................................... 36 附錄 1 程序清單 ..................................................................................................................... 37 附錄 2 系統(tǒng)硬件結構圖 ....................................................................................................... 48 I 單片機太陽能熱水器測控儀設計 摘 要 : 隨著全球人口和經濟規(guī)模的不斷增長,能源使用帶來的環(huán)境問題及其誘因逐漸為人們所認識,“低碳經濟”這一概念開始進入人們的視野。 太陽能熱水器以其廉價、節(jié)能的特點,受到廣大消費者的青睞,與之配套的控制器設計問題一直受到人們的關注。為解決水溫水位的自動控制問題,本課題以單片機為控制核心,結合水溫水位 傳感 技術,設 計了具有水溫水位控制的太陽能熱水器自動控制系統(tǒng)。 該控制系統(tǒng)通過按鍵設置控制方式,可實現(xiàn)全天候不間斷提供熱水,而且具有防止空燒和高低水溫水位報警功能。本文主要介紹了單片機太陽能熱水器測控儀的硬件、軟件的設計和調試方法等內容。 關鍵詞 : 太陽能熱水器;單片機; 測控儀 ; DS18B20。 II The Design of Solar Energy Heater Controller Based on MCU Abstract: With the global population and economic scale continuous growth, energy use brought the environmental problems and causes for people gradually recognized, lowcarbon economy this concept began to enter into people39。s perspective. The Solar Energy Heater is being more and more popular for its characteristic of low price and energy conservation,And that supporting controller design issue has got the attention of people . To solve the problem of water temperature and water level automatic control, This topic is MCU control core, bining water temperature and water level sensing technology, has designed the solar energy water heater automatic control system of water temperature and Water level control . The control system through the button control mode, may realize allweather provides the hot water uninterruptedly, And it can prevent empty burning 、 high and low water temperature and water level alarm function . This article mainly introduced the singlechip micro