【正文】
基于 DS18B20 的恒溫控制器設計 Designed of The Constant Temperature Which is based on DS18B20 I 摘 要 恒溫控制在任何地方都有著舉足輕重的地位,在工業(yè)生產(chǎn)中,溫度的控制直接影響著工業(yè)生產(chǎn);在家庭中,其直接影響著生活的品質(zhì)與安慰。本設計是基于 AT89C51單片機的恒溫箱控制系統(tǒng),系統(tǒng)分為硬件和軟件兩部分,其中硬件包括:溫度傳感器、顯示、控制和報警的設計;軟件包括:鍵盤管理程序設計、顯示程序設計、控制程序設計和溫度報警程 序設計。編寫程序結(jié)合硬件進行調(diào)試,能夠?qū)崿F(xiàn)設置和調(diào)節(jié)初始溫度值,用 LCD 顯示,當加熱到設定值后立刻報警。另外,本系統(tǒng)通過軟件實現(xiàn)對按鍵誤差、加熱過沖的調(diào)整,以提高系統(tǒng)的安全性、可靠性和穩(wěn)定性。 本設計從實際應用出發(fā)選取了體積小、精度相對高的數(shù)字式溫度傳感元件 DS18B20 作為溫度采集器,單片機 AT89C52 作為主控芯片, LCD 屏作為顯示輸出,實現(xiàn)了對溫度的實時測量與恒定控制。 關鍵詞: 單片機 傳感器 溫度 II Abstract Temperature control in any place has a pivotal role in the industrial production, the control of the temperature directly affect the industrial production。 In the household, its directly influences the quality of the life and fort .The design is based on AT89C51 singlechip microputer control system of the constant temperature box, the hardware and software system is divided into two parts, including hardware including: temperature sensor display and control and alarm design。 The software includes: the keyboard management program design shows that the program design control program design and temperature alarm program design write a program bining hardware debugging, will be able to realize the Settings and adjusting the initial temperature, use LCD display, when heated to set data immediately after the alarm in addition, the system through the software to realize error heated flush buttons adjustment, the security of the system to improve the reliability and stability. Key words:AT89C52 temperature sensor temperature III 目錄 摘 要 ..................................................................................................................................... I Abstract ............................................................................................................................... II 緒 論 .................................................................................................................................... 1 1 硬件電路的設計 ............................................................................................................ 2 總體設計 .................................................................................................................... 2 系統(tǒng)實現(xiàn)的功能 .................................................................................................... 2 系統(tǒng)實現(xiàn)方案的選擇 ............................................................................................ 2 系統(tǒng)整體結(jié)構(gòu)的布局 ............................................................................................ 2 單片機 ........................................................................................................................ 3 單片機的應用范圍 ................................................................................................ 3 單片機的分類 ........................................................................................................ 4 單片機的端口介紹 ................................................................................................ 4 DS18B20 ........................................................................................................................ 6 DS18B20 的應用范圍 ............................................................................................. 6 DS18B20 的內(nèi)部結(jié)構(gòu) ............................................................................................. 6 DS18B20 溫度測量 電路 ......................................................................................... 6 DS18B20 的工作原理 ............................................................................................. 8 DS1302 ........................................................................................................................ 8 DS1320 的功能及結(jié)構(gòu) ........................................................................................... 8 DS1302 實時顯示時間的軟硬件 ........................................................................... 9 LM016L 顯示屏 ........................................................................................................... 9 LM016L 結(jié)構(gòu)和功能 ............................................................................................... 9 LCD 在仿真中的連接 ........................................................................................... 10 2 軟件電路設計 .............................................................................................................. 12 系統(tǒng)主程序的設計 ...................