【正文】
各引腳的功能。 數(shù)字溫度計的設(shè)計目的 1) 掌握溫度計、報警系統(tǒng)的設(shè)計、組裝與調(diào)試方法。 本文利用單片機(jī)結(jié)合 傳感器 技術(shù)開發(fā)設(shè)計 , 文中把傳感器理論與單片機(jī)實際應(yīng)用有機(jī)結(jié)合,詳細(xì)地講述了利用溫度傳感器 DS18B20 測量環(huán)境溫度的過程。而熱電偶和熱電阻測出的一般都是電壓,再轉(zhuǎn)換成對應(yīng)的溫度,需要較多的外部硬件支持 , 其缺點如下: 1. 硬件電路復(fù)雜; 2. 軟件調(diào)試復(fù)雜; 3. 制作成本高 。 26 項目創(chuàng)新及特色 18 致謝 17 附錄 2 16 附錄 1 15 參考文獻(xiàn) 14 結(jié)論 14 14 proteus仿真圖 11 第 6章 實驗數(shù)據(jù)分析 10 9 第 5章 系統(tǒng)的軟件設(shè)計 8 7 7 顯示電路 6 第 4章 系統(tǒng)的硬件電路設(shè)計 6 6 1 第 2章 系統(tǒng)硬件選擇 1 本文研究的意義 1 背景 Digital Temperature sensor。 關(guān)鍵詞 : 溫度檢測; 單片機(jī); 數(shù)字溫度傳感器; 溫度采集; 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 單片機(jī)課程設(shè)計報告 基于 STC89C52 單片機(jī)的數(shù)字溫度計 II 摘 要 隨著時代的進(jìn)步和發(fā)展,單片機(jī)技術(shù)已經(jīng)普及到我們生活、工作、科研、各個領(lǐng)域,已經(jīng)成為一種比較成熟的技術(shù) , 本文主要介紹了一個基于 STC89C52 單片機(jī)的測溫系統(tǒng),詳細(xì)描述了利用數(shù)字溫度傳感器 DS18B20 開發(fā)測溫系統(tǒng)的過程,重點對傳感器在單片機(jī)下的硬件連接,軟件編程以及各模塊系統(tǒng)流程進(jìn)行了詳盡分析,該系統(tǒng)可以方便的實現(xiàn)實現(xiàn)溫度采集和顯示,并可根據(jù)需要任意設(shè)定上下限報警溫度,它使用起來相當(dāng)方便,具有精度高、量程寬、靈敏 度高、體積小、功耗低等優(yōu)點,適合于我們?nèi)粘I詈凸ぁ⑥r(nóng)業(yè)生產(chǎn)中的溫度測量,也可以當(dāng)作溫度處理模塊嵌入其它系統(tǒng)中,作為其他主系統(tǒng)的輔助擴(kuò)展。實驗結(jié)果表明, DS18B20 與 STC89C52 結(jié)合可以實現(xiàn)最簡溫度檢測系統(tǒng),該系統(tǒng)結(jié)構(gòu)簡單,抗干擾能力強,適合于惡劣環(huán)境下進(jìn)行現(xiàn)場溫度測量,有廣泛的應(yīng)用前景。 Singlechip Microputer (SCM ) 。 Temperature data collection IV 目 錄 摘 要 II Abstract III 第 1章 緒論 1 數(shù)字溫度計的設(shè)計目的 1 單片機(jī)的選擇 2 STC89C52單片機(jī)的性能介紹 2 STC89C52單片機(jī)引腳圖 2 . 溫度傳感器的選擇 4 DS18B20 介紹 4 第 3章 原理分析 7 7 數(shù)字溫度傳感器 8 10 程序流程圖 27 1 第 1 章 緒論 背景 在日常生活及工農(nóng)業(yè)生產(chǎn)中,經(jīng)常要用到溫度的檢測及控制,傳統(tǒng)的測溫元件有熱電偶和熱電阻。 為了提高對傳感器的認(rèn)識和了解,尤其是對溫度傳感器的深入研究以及其用法與用途,基于實用、廣泛和典型的 原則而設(shè)計了本系統(tǒng)。 DS18B20 可以直接讀出被測溫度值,而且采用三線制與單片機(jī)相連,減少了外部的硬件電路,具有低成本和易使用的特點 。 2) 熟悉仿真軟件( proteus)的使用。 本文研究的意義 溫度傳感器技術(shù),在我國各領(lǐng)域已經(jīng)引用的非常 廣泛,可以說是滲透到社會的每一個領(lǐng)域,人民的生活與環(huán)境的溫度息息相關(guān),在工業(yè)生產(chǎn)過程中需要實時測量溫度,在農(nóng)業(yè)生產(chǎn)中也離不開溫度的測量,因此研究溫度的測量方法和裝置具有重要的意義。 STC89C52單片機(jī)的性能介紹 STC89C52是一種低功耗、高性能 CMOS8位微控制器,具有 8K 在系統(tǒng)可編程 Flash 存儲器。具有以下標(biāo)準(zhǔn)功能: 8k字節(jié) Flash,512字節(jié) RAM, 32 位 I/O 口線,看門狗定時器,內(nèi)置 4KB EEPROM, MAX810復(fù)位電路,三個 16 位定時器 /計數(shù)器,一個 6向量 2級中斷結(jié)構(gòu),全雙工串行口。空閑模式下, CPU 停止工作,允許 RAM、定時器 /計數(shù)器、串口、中斷繼續(xù)工作。最高運作頻率35Mhz, 6T/12T可選。當(dāng) P1口的管腳寫“ 1”時,被定義為高阻輸入。在 FLASH編程時, P0口作為原碼輸入口,當(dāng) FLASH進(jìn)行校驗