【正文】
圖 系統(tǒng)設計硬件原理結(jié)構(gòu) 系統(tǒng)硬件各部分的簡介 這里 AT89C51 為總控制器 。 2 第 2 章 系統(tǒng)硬件設計 系統(tǒng)硬件的組成部分 系統(tǒng)設計硬件原理結(jié)構(gòu)見圖 所示。當用 STC 公司的單片機時,直接用產(chǎn)品套件附帶的串口線將開發(fā)板與計算機串口相連,按照 STC 單片機下載操作教程便可以下載程序,而且下載速度比起其他下載工具要快的多。該開發(fā)板集常用的單片機外圍資源、串口和 USB 口兩種調(diào)試下載接口于一身,完全兼容 ATMEL 公司的 51 單片機,除此之外還有很多特點,如:無法解密、低功耗、高速、高可靠、強抗靜電、強抗干擾等。它能提供用戶方便快捷的數(shù)字化輸入 方式,并且能精確的采集和控制環(huán)境中的水溫,將其提供給用戶,因此備受人們的關(guān)注。 隨著 社會的發(fā)展、 人們生活質(zhì)量的提高,人們對電熱水器的要求越來越趨向于智能化和數(shù)字化, 這種老式而簡單的 電熱水器 已經(jīng)不能夠滿足人們的需要了。 我們的生活 電熱水器是一種可供浴室、洗手間及廚房使用 ,按照人們的需要的溫度,提供溫水 的家用電器 。通過單片機人們的 生活將會變得更加方便、快捷。 第 1 章 緒論 單片機是一種與我們生活息息相關(guān)的控制器,它存在于許多地方,例如:電子手表、掌上游戲機、數(shù)碼相機、錄音筆、電視機遙控器等等。 Intelligence。 C language?;緦崿F(xiàn)了智能控制功能。采用 DS18B20 采集溫度,使用LED 燈顯示,精確的顯示出采集的水溫。 本文采用 AT 89C 52 單片機作為控制器,使用 C 語言編寫程序 ,設計了一款智能家用電熱水器。 電熱水器是一種可供浴室、洗手間及廚房使用的家用電器,隨著人們生活質(zhì)量的提高,現(xiàn)代的家用電熱水器已經(jīng)摒棄了以前的做法,而采用一種更加精確、安全的實施方案。對本實驗 (設計)所涉及的研究工作做出貢獻的其他個人和集體,均已在文中以明確方式標明。 實 驗 設 計 題目 : 基于 51 單片機的家用電熱水器設計 姓 名: 陳太宇 學 號: 20xx15220233 所在學院: 信息工程學院 專業(yè)班級: 電子信息工程 2 班 指導教師: 張守興 20xx 年 10 月 25 日 聲 明 本人鄭重聲明:所呈交的畢業(yè)論文(設計 ),是本人在指導老師指導下,獨立進行研究工作所取得的成果。盡我所知,除文中已經(jīng)注明引用的內(nèi)容外, 實驗設計的研究成果不包含任何他人享有著作權(quán)的內(nèi)容。 本人簽名: 陳太宇 日 期: 20xx 年 10 月 25 日 摘 要 隨著社會的發(fā)展 , 人類科技的進步,各行各業(yè)都在使自己的產(chǎn)品智能化、數(shù)字化,因老式的熱水器使用煤氣或天然氣對水進行燃燒加熱,用手動的方式 調(diào)節(jié)溫度,不僅不能夠精確的確定使用者需要的水溫,而且還存在一定的危險性。 C 語言對單片機編程有諸多優(yōu)點,例如:便于移植、句法檢查時錯誤少、堅固性好、頭文件種類諸多,能夠方便快捷使用各種函數(shù)等。使用陣型鍵盤輸入溫度,溫度可以精確到 攝氏度,并使用LED 燈顯示 ,能夠精確提供 用戶所需溫度 的溫水 。當所需溫度高于當前采集的水溫時,使用 MOC3041 芯片觸發(fā)加熱,當所需溫度低于當前采集的水溫時,則停止加熱。 關(guān)鍵詞 : 單片機; C 語言;采集;智能;家用電熱水器 Abstract With the development of social and program of human technology, every trade all transfer own product into intelligence, digitize, because the water heater of old style uses gas or natural gas to heat water and manually adjust mode conditioning temperature, not only unable to sufficiently accurately recognize the user need of water temperature, but also exist some certain risk. The electrical water heater is a kind of home appliances that bathroom, loo and kitchen can use, with raising of quality of human live, the modernistic household electrical water heater has abandonned the past way, but adopts a kind of implementation scheme of more accurate ,safety. C language possess many merits for programming of singlechip, such as:Is easy to ransplant, having little bug when sentence construction review, fastness good, the head document type is so many that expediently quickly using various function etc. The writer adopts an AT 89 Cs 52 singlechip to be the controller and using C languages to write programming ,design a style of intelligence household electrical water array form keyboard input temperature, the temperature can be accuratly recognized to ℃ , and use LED light display it, can accurately provide to the warm water of temperature that user DS18 B20 to collect temperature, use LED light display, the accurately displays to collect water the temperature needed higher than to collect water temperature at present, use the MOC3041 chip lead to heating , when the temperature needed is lower than the collect water temperature at present, stop simply carry out intelligence control function. Key Words: singlechip。 collect。 household electric water heater 1 目 錄 第 1 章 緒論 1 家用電熱水器的現(xiàn)狀 ................................................................................ 1 TX1C 單片機實驗開發(fā)板簡介 ................................................................... 1 第 2 章 系統(tǒng)硬件設計 2 系統(tǒng)硬件的組成部分 ................................................................................ 2 系統(tǒng)硬件各部分的簡介 ............................................................................. 2 數(shù)碼管顯示 .............................................................................................. 3 數(shù)碼管簡介 ..................................................................................................................... 3 數(shù)碼管的實現(xiàn)方法 ....................................................................................................... 4 鎖存器與數(shù)碼管顯示方法 .......................................................................................... 5 鍵盤輸入設計 ........................................................................................... 6 鍵盤輸入方法 ................................................................................................................ 6 鍵盤輸入的抖動與去抖的方法 ................................................................................. 6 DS18B20 溫度采集 .................................................................................... 7 DS18B20 技術(shù)性能與應用范圍 ................................................................................. 7 DS18B20 的初始化與讀寫操作 ................................................................................. 8 DS18B20 的指令與格式 ...........................................................................