【正文】
各引腳的功能。 數字溫度計的設計目的 1) 掌握溫度計、報警系統(tǒng)的設計、組裝與調試方法。 本文利用單片機結合 傳感器 技術開發(fā)設計 , 文中把傳感器理論與單片機實際應用有機結合,詳細地講述了利用溫度傳感器 DS18B20 測量環(huán)境溫度的過程。而熱電偶和熱電阻測出的一般都是電壓,再轉換成對應的溫度,需要較多的外部硬件支持 , 其缺點如下: 1. 硬件電路復雜; 2. 軟件調試復雜; 3. 制作成本高 。 26 項目創(chuàng)新及特色 18 致謝 17 附錄 2 16 附錄 1 15 參考文獻 14 結論 14 14 proteus仿真圖 11 第 6章 實驗數據分析 10 9 第 5章 系統(tǒng)的軟件設計 8 7 7 顯示電路 6 第 4章 系統(tǒng)的硬件電路設計 6 6 1 第 2章 系統(tǒng)硬件選擇 1 本文研究的意義 1 背景 Digital Temperature sensor。 關鍵詞 : 溫度檢測; 單片機; 數字溫度傳感器; 溫度采集; III Abstract With the progress and development of this epoch ,Singlechip Microputer (SCM ) technology has spread into various fields our lives ,work ,scientific researches and so on ,being a paratively mature technology .This article was mainly written to introduce a temperature measurement system(TMS ) based on STC89C52 SCM .It’s with a detailed description of the development progress of TMS using digital temperature sensor ,putting emphasis on analyzing the hardware connection of the sensor under the SCM ,software programming and each module progress .This system can conveniently achieve the temperature data collection and display ,and can be arbitrarily set upper and lower alarm temperature .It’s quite easy to use ,with high accuracy ,wide range ,high sensitivity ,small size ,low power dissipation ,etc .Thus ,it’s suitable for our daily life and industrial and agricultural production’s temperature measurement ,and also can be used as temperature processing modules embedded in other systems ,as an auxiliary expansion of other main systems .Experimental results show that ,the integration of DS18B20 and STC89C52 can achieve the simplest TMS , which has simple structure ,strong antijamming capability ,suitable for conducting insitu temperature measurement ,all above leading this to have broad prospects of applications . Keywords: Temperature measurement 。 I 單片機課程設計報告 基于 STC89C52 單片機的數字溫度計 II 摘 要 隨著時代的進步和發(fā)展,單片機技術已經普及到我們生活、工作、科研、各個領域,已經成為一種比較成熟的技術 , 本文主要介紹了一個基于 STC89C52 單片機的測溫系統(tǒng),詳細描述了利用數字溫度傳感器 DS18B20 開發(fā)測溫系統(tǒng)的過程,重點對傳感器在單片機下的硬件連接,軟件編程以及各模塊系統(tǒng)流程進行了詳盡分析,該系統(tǒng)可以方便的實現實現溫度采集和顯示,并可根據需要任意設定上下限報警溫度,它使用起來相當方便,具有精度高、量程寬、靈敏 度高、體積小、功耗低等優(yōu)點,適合于我們日常生活和工、農業(yè)生產中的溫度測量,也可以當作溫度處理模塊嵌入其它系統(tǒng)中,作為其他主系統(tǒng)的輔助擴展。實驗結果表明, DS18B20 與 STC89C52 結合可以實現最簡溫度檢測系統(tǒng),該系統(tǒng)結構簡單,抗干擾能力強,適合于惡劣環(huán)境下進行現場溫度測量,有廣泛的應用前景。 Singlechip Microputer (SCM ) 。 Temperature data collection IV 目 錄 摘 要 II Abstract III 第 1章 緒論 1 數字溫度計的設計目的 1 單片機的選擇 2 STC89C52單片機的性能介紹 2 STC89C52單片機引腳圖 2 . 溫度傳感器的選擇 4 DS18B20 介紹 4 第 3章 原理分析 7 7 數字溫度傳感器 8 10 程序流程圖 27 1 第 1 章 緒論 背景 在日常生活及工農業(yè)生產中,經常要用到溫度的檢測及控制,傳統(tǒng)的測溫元件有熱電偶和熱電阻。 為了提高對傳感器的認識和了解,尤其是對溫度傳感器的深入研究以及其用法與用途,基于實用、廣泛和典型的 原則而設計了本系統(tǒng)。 DS18B20 可以直接讀出被測溫度值,而且采用三線制與單片機相連,減少了外部的硬件電路,具有低成本和易使用的特點 。 2) 熟悉仿真軟件( proteus)的使用。 本文研究的意義 溫度傳感器技術,在我國各領域已經引用的非常 廣泛,可以說是滲透到社會的每一個領域,人民的生活與環(huán)境的溫度息息相關,在工業(yè)生產過程中需要實時測量溫度,在農業(yè)生產中也離不開溫度的測量,因此研究溫度的測量方法和裝置具有重要的意義。 STC89C52單片機的性能介紹 STC89C52是一種低功耗、高性能 CMOS8位微控制器,具有 8K 在系統(tǒng)可編程 Flash 存儲器。具有以下標準功能: 8k字節(jié) Flash,512字節(jié) RAM, 32 位 I/O 口線,看門狗定時器,內置 4KB EEPROM, MAX810復位電路,三個 16 位定時器 /計數器,一個 6向量 2級中斷結構,全雙工串行口??臻e模式下, CPU 停止工作,允許 RAM、定時器 /計數器、串口、中斷繼續(xù)工作。最高運作頻率35Mhz, 6T/12T可選。當 P1口的管腳寫“ 1”時,被定義為高阻輸入。在 FLASH編程時, P0口作為原碼輸入口,當 FLASH進行校驗