畢業(yè)設(shè)計(jì)英文翻譯_第1頁(yè)
畢業(yè)設(shè)計(jì)英文翻譯_第2頁(yè)
畢業(yè)設(shè)計(jì)英文翻譯_第3頁(yè)
畢業(yè)設(shè)計(jì)英文翻譯_第4頁(yè)
畢業(yè)設(shè)計(jì)英文翻譯_第5頁(yè)
已閱讀5頁(yè),還剩11頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、畢業(yè)設(shè)計(jì)(論文)英 文 翻 譯 題 目 基于MCS51的多路溫度檢測(cè)終端設(shè)計(jì)_學(xué) 院 _通信與信息工程學(xué)院_ 專業(yè)及班級(jí) _ _電子信息工程1003班_ _ 姓 名 _ _張澤鑫_學(xué) 號(hào) _1007050315_ 指 導(dǎo) 教 師 _ _倪云峰_ _ _ 日 期 _2014.4.14_ _ _ DS18B20 單線溫度傳感器一 特征:ucts DS18B20 data sheet 2012 獨(dú)特的單線接口,只需 1 個(gè)接口引腳即可通信 每個(gè)設(shè)備都有一個(gè)唯一的64位串行代碼存儲(chǔ)在ROM上 多點(diǎn)能力使分布式溫度檢測(cè)應(yīng)用得以簡(jiǎn)化 不需要外部部件 可以從數(shù)據(jù)線供電,電源電壓范圍為3.0V至5.5V 測(cè)量

2、范圍從-55 ° C 至+125 ° C(-67 ° F至257 ° F),從-10至+85 °C的精度為0.5 °C 溫度計(jì)分辨率是用戶可選擇的9至12位 轉(zhuǎn)換12位數(shù)字的最長(zhǎng)時(shí)間是750ms 用戶可定義的非易失性的溫度告警設(shè)置 告警搜索命令識(shí)別和尋址溫度在編定的極限之外的器件 (溫度告警情況) 采用8引腳SO(150mil),8引腳SOP和3引腳TO - 92封裝 軟件與DS1822兼容 應(yīng)用范圍包括恒溫控制工業(yè)系統(tǒng)消費(fèi)類產(chǎn)品溫度計(jì)或任何熱敏系統(tǒng)二 簡(jiǎn)介該DS18B20的數(shù)字溫度計(jì)提供9至12位的攝氏溫度測(cè)量,并具有與非易失性用戶

3、可編程上限和下限報(bào)警功能。信息單線接口送入DS18B20或從DS18B20 送出,因此按照定義只需要一條數(shù)據(jù)線與中央微處理器進(jìn)行通信。它的測(cè)溫范圍從-55°C到 +125°C,其中從-10 °C至+85 °C可以精確到0.5°C 。此外,DS18B20可以從數(shù)據(jù)線直接供電(“寄生電源”),從而消除了供應(yīng)需要一個(gè)外部電源。每個(gè) DS18B20 的有一個(gè)唯一的64位序列碼,它允許多個(gè)DS18B20的功能在同一總線。因此,用一個(gè)微處理器控制大面積分布的許多DS18B20是非常簡(jiǎn)單的。此特性的應(yīng)用范圍包括 HVAC、環(huán)境控制、建筑物、設(shè)備或機(jī)械內(nèi)的溫度

4、檢測(cè)以及過(guò)程監(jiān)視和控制系統(tǒng)。三 綜述64位ROM存儲(chǔ)設(shè)備的獨(dú)特序號(hào)。存貯器包含2個(gè)字節(jié)的溫度寄存器,它存儲(chǔ)來(lái)自溫度傳感器的數(shù)字輸出。此外,暫存器可以訪問(wèn)的1個(gè)字節(jié)的上下限溫度告警觸發(fā)器(TH和TL)和1個(gè)字節(jié)的配置寄存器。配置寄存器允許用戶設(shè)置的溫度到數(shù)字轉(zhuǎn)換的分辨率為9,10,11或12位。TH,TL和配置寄存器是非易失性的,因此掉電時(shí)依然可以保存數(shù)據(jù)。該DS18B20使用Dallas的單總線協(xié)議,總線之間的通信用一個(gè)控制信號(hào)就可以實(shí)現(xiàn)??刂凭€需要一個(gè)弱上拉電阻,因?yàn)樗械脑O(shè)備都是通過(guò)3線或開漏端口連接(在DS18B20中用DQ引腳)到總線的。在這種總線系統(tǒng)中,微處理器(主設(shè)備)和地址標(biāo)識(shí)上

5、使用其獨(dú)有的64位代碼。因?yàn)槊總€(gè)設(shè)備都有一個(gè)唯一的代碼,一個(gè)總線上連接設(shè)備的數(shù)量幾乎是無(wú)限的。單總線協(xié)議,包括詳細(xì)的解釋命令和“時(shí)間槽”,此資料的單總線系統(tǒng)部分包括這些內(nèi)容。DS18B20的另一個(gè)特點(diǎn)是:沒(méi)有外部電源供電仍然可以工作。當(dāng)DQ引腳為高電平時(shí),電壓是單總線上拉電阻通過(guò)DQ引腳供應(yīng)的。高電平信號(hào)也可以充當(dāng)外部電源,當(dāng)總線是低電平時(shí)供應(yīng)給設(shè)備電壓。這種從但總線提供動(dòng)力的方法被稱為“寄生電源“。作為替代電源,該DS18B20也可以使用連接到 VDD 引腳的外部電源供電。四 運(yùn)用 測(cè)量溫度該DS18B20的核心功能是它是直接輸出數(shù)字信號(hào)的溫度傳感器。該溫度傳感器的分辨率為用戶配置至9,10

6、,11或12位,相當(dāng)于0.5° C,0.25° C,0.125 ° C和0.0625° C的增量。其中傳感器默認(rèn)為12位。該DS18B20在低功耗空閑狀態(tài);啟動(dòng)溫度測(cè)量和模數(shù)轉(zhuǎn)換,主機(jī)必須發(fā)出一個(gè)轉(zhuǎn)換命令。轉(zhuǎn)換后,所產(chǎn)生的數(shù)據(jù)存儲(chǔ)在內(nèi)存中的2比特溫度寄存器中,DS18B20返回其空閑狀態(tài)。如果DS18B20是由外部電源供電的,主機(jī)可以發(fā)出“讀時(shí)隙”,轉(zhuǎn)換后,通過(guò)發(fā)送低電平T命令和DS18B20將響應(yīng),同時(shí)溫度轉(zhuǎn)換繼續(xù)進(jìn)行,當(dāng)轉(zhuǎn)換完成時(shí)變?yōu)楦唠娖?。如果DS18B20的是寄生電源供電的,在整個(gè)溫度轉(zhuǎn)換過(guò)程中此通知技術(shù)不能使用,因?yàn)榭偩€必須變?yōu)楦唠娖?。總線需要

7、寄生電源供電將在此資料的DS18B20驅(qū)動(dòng)部分將詳細(xì)介紹。 DS18B20的輸出溫度數(shù)據(jù)為標(biāo)準(zhǔn)攝氏度;對(duì)于華氏溫度的應(yīng)用,必須通過(guò)查表或運(yùn)用轉(zhuǎn)換方法。溫度數(shù)據(jù)在溫度寄存器存儲(chǔ)為一個(gè)16位符號(hào)擴(kuò)展位和2位的補(bǔ)碼。該標(biāo)志位(S)表示溫度的正負(fù)符號(hào)位:為正數(shù)時(shí)S = 0,為負(fù)數(shù)時(shí)S = 1。如果是DS18B20配置為12位分辨率,在溫度寄存器的所有位將包含有效數(shù)據(jù)。對(duì)于11位分辨率,位0是未定義的。對(duì)于10位分辨率,位1和0是未定義的。對(duì)于9位分辨率,位2,1和0是未定義的。表2給出了輸出數(shù)字?jǐn)?shù)據(jù)和相應(yīng)的12位分辨率溫度讀數(shù)轉(zhuǎn)換例子。五 運(yùn)用報(bào)警信號(hào)DS18B20溫度轉(zhuǎn)換完成后,溫度值與用戶定義的2

8、個(gè)報(bào)警觸發(fā)值存儲(chǔ)在1個(gè)字節(jié)的TH和TL寄存器。符號(hào)位(S)表示溫度值的正負(fù): S = 0時(shí)為正值, S = 1為負(fù)值。TH和TL寄存器是非易失(EEPROM),因此他們將保留設(shè)備掉電時(shí)的數(shù)據(jù)。TH和TL可通過(guò)暫存器中字節(jié)2和3獲得,此內(nèi)容在本數(shù)據(jù)表內(nèi)存部分解釋。六 TH和TL寄存器格式只有溫度寄存器4中的11位用于和TL的比較中,由于TH和TL都是 8位寄存器。如果測(cè)量溫度低于或等于TL或超過(guò)TH,報(bào)警情況存在而且報(bào)警標(biāo)志將設(shè)置在DS18B20的內(nèi)部。每個(gè)溫度測(cè)量后,這個(gè)標(biāo)志位將被更新,因此,如果報(bào)警條件消失,下一個(gè)溫度轉(zhuǎn)換后,該標(biāo)志位將被關(guān)閉。主設(shè)備可以通過(guò)搜索ECH命令檢查總線上所有DS1

9、8B20報(bào)警標(biāo)志位的狀態(tài)。任何有設(shè)置報(bào)警標(biāo)志位的DS18B20將響應(yīng)命令,所以主設(shè)備可以決定到底是哪個(gè)DS18B20在經(jīng)歷一個(gè)報(bào)警條件。如果報(bào)警的情況存在,TH和TL設(shè)置已經(jīng)改變了,另一個(gè)溫度轉(zhuǎn)換應(yīng)該去驗(yàn)證報(bào)警條件。七 DS18B20的驅(qū)動(dòng)該傳感器DS18B20可以用外部電源接VDD端供電,或者它可以工作在“寄生電源”模式下,這種模式允許DS18B20在沒(méi)有外部電源下工作。寄生電源在遠(yuǎn)程或者空間受限情況下感溫是非常有用的。寄生功率控制電路,其中當(dāng)總線引腳為高電平時(shí),力部門宿舍從DS18B20通過(guò)連接單總線的DQ端“偷”電。當(dāng)總線是高電平或者總線是低電平,而一些能量存貯在CPP中來(lái)提供電源,“偷

10、”來(lái)的電位DS18B20提供驅(qū)動(dòng)。當(dāng)DS18B20在寄生電源模式下使用時(shí),VDD引腳必須接地。在寄生電源模式下,單總線和CPP可以提供足夠的電流給DS18B20的大部分操作,只要指定的時(shí)間和電壓的要求得到滿足(參考本數(shù)據(jù)手冊(cè)DC電氣特性和AC電氣特性章節(jié))。 然而,當(dāng)DS18B20溫度轉(zhuǎn)換或復(fù)制暫存器的數(shù)據(jù)到EEPROM時(shí),工作電流可高達(dá)1.5毫安。這個(gè)電流會(huì)導(dǎo)致無(wú)法接受的電壓下降,整個(gè)單總線電阻壓降減小,更多的電流可以由寄生電源供應(yīng)。為了確保DS18B20有足夠的電流供應(yīng),無(wú)論正在發(fā)生溫度轉(zhuǎn)換或復(fù)制暫存器的數(shù)據(jù)到EEPROM,單總線都必須接一個(gè)強(qiáng)上拉電阻。這可以通過(guò)使用一個(gè)MOSFET以直接

11、把總線電壓下降到如圖4所示。單總線必須在轉(zhuǎn)換T44h或暫存器復(fù)制48H命令發(fā)出后,10秒內(nèi)(最大)轉(zhuǎn)換到強(qiáng)上拉狀態(tài),而且總線必須在轉(zhuǎn)換(tconv)或數(shù)據(jù)傳輸(twr = 10ms)期間通過(guò)上拉保持高電平。在單總線上拉使能時(shí),其他活動(dòng)不能發(fā)生。該DS18B20的也可以采用的連接外部電源到VDD腳上的傳統(tǒng)方法。這種方法的優(yōu)點(diǎn)是不需要MOSFET的上拉, 而且單總線可以在進(jìn)行溫度轉(zhuǎn)換時(shí)間自由地進(jìn)行其他操作。在+100以上的高溫時(shí)不推薦使用寄生電源,因?yàn)樵谶@些溫度下存在較高泄漏電流,DS18B20可能無(wú)法維持通信。對(duì)于像在這種高溫下的使用,強(qiáng)烈建議由一個(gè)DS18B20的外部電源供電。在某些情況下,總

12、線主機(jī)可能不知道DS18B20是外部電源還是寄生電源供電。主機(jī)需要這些信息來(lái)確定是否強(qiáng)大的總線上拉應(yīng)在溫度轉(zhuǎn)換時(shí)使用。要獲得這些信息,主機(jī)可以在 “閱讀時(shí)段” 一個(gè)讀取電源B4h命令后,發(fā)出一個(gè)跳過(guò)ROMCCh命令。在讀時(shí)隙,寄生電源給DS18B20供電將把總線電平拉低,外部供電時(shí)DS18B20將會(huì)讓總線仍然保持高電平。如果總線拉低,主機(jī)知道在溫度轉(zhuǎn)換期間它必須提供單總線強(qiáng)上拉。八 64位激光ROM每一 DS18B20 包括一個(gè)唯一的 64 位長(zhǎng)的 ROM 編碼。開紿的 8 位是單線產(chǎn)品系列編碼:28h,接著的 48 位是唯一的系列號(hào)。最重要的8位是開始 56 位 CRC位,從56位的ROM端

13、計(jì)算而來(lái)。CRC比特的詳細(xì)內(nèi)容將在CRC概述一章中介紹。64位ROM代碼和相關(guān)ROM功能控制邏輯使DS18B20作為使用協(xié)議的單線設(shè)備的運(yùn)作,單總線系統(tǒng)的數(shù)據(jù)表部分詳細(xì)介紹了這個(gè)協(xié)議。九 存貯器DS18B20的存貯器那樣被組織 存貯器由一個(gè)高速暫存 便箋式 RAM、一個(gè)存貯高溫度和低溫度和觸發(fā)器 TH 和 TL的非易失性電可擦除 E2RAM和存儲(chǔ)配置寄存器組成。請(qǐng)注意,如果DS18B20的報(bào)警功能不使用,TH和TL寄存器可以作為通用存儲(chǔ)器。 DS18B20的功能命令部分詳細(xì)敘述了所有內(nèi)存的命令。暫存器的字節(jié)0和字節(jié)1分別包含LSB和MSB溫度寄存器。這些字節(jié)是只讀的。字節(jié)2和3提供是提供接入的

14、TH和TL寄存器。字節(jié)4包含配置寄存器數(shù)據(jù),數(shù)據(jù)表配置寄存器部分詳細(xì)解釋了它的內(nèi)容。字節(jié)5,6和7是保留供內(nèi)部使用的設(shè)備,不能被覆蓋,當(dāng)被讀到時(shí),這些字節(jié)將返回1秒。8字節(jié)暫存器是只讀的,并且包含了循環(huán)冗余校驗(yàn)碼,通過(guò)暫存器的0到7字節(jié)。DS18B20使用在CRC生成一節(jié)中描述的方法生成該CRC。數(shù)據(jù)寫入字節(jié)2,3,暫存器4使用寫入暫存4Eh指令;數(shù)據(jù)必須傳輸?shù)紻S18B20以最低有效位開始的第2字節(jié)。為了驗(yàn)證數(shù)據(jù)的完整性,數(shù)據(jù)被寫入后暫存器可以讀?。ㄊ褂脭?shù)據(jù)讀取暫存器與Beh命令)。當(dāng)讀取暫存器,數(shù)據(jù)是從最低有效位的0字節(jié)開始的。要傳送的TH,TL和配置數(shù)據(jù)從暫存器到EEPROM,主機(jī)必須發(fā)

15、起復(fù)制暫存 48h命令。設(shè)備關(guān)機(jī)時(shí),在EEPROM寄存器的數(shù)據(jù)將被保留,上電時(shí)EEPROM中的數(shù)據(jù)到相應(yīng)的位置暫存器重新加載。數(shù)據(jù)也可以使用召回E2 B8h命令在任何時(shí)間從EEPROM中重新加載向暫存器。主機(jī)可以在召回E2命令后發(fā)出讀時(shí)隙后,DS18B20的將通過(guò)傳輸0表明處在召回狀態(tài),當(dāng)召回完成時(shí)將傳輸1。十 配置寄存器暫存存儲(chǔ)器的第四字節(jié)包含配置寄存器。用戶可以使用該寄存器的R0和R1的位設(shè)置DS18B20的轉(zhuǎn)換分辨率。這些位默認(rèn)是R0和R1都等于1(12位)的分辨率。請(qǐng)注意,兩者之間是有直接的分辨率和轉(zhuǎn)換時(shí)間的對(duì)比。第7位,并在配置寄存器0至4位是保留供內(nèi)部使用的設(shè)備,不能被覆蓋,這些位

16、被讀出時(shí)將返回1秒。十一 CRC生成CRC字節(jié)是DS18B20的64位ROM代碼的一部分,在暫存器的第9比特。CRC的代碼是由前56位的ROM代碼計(jì)算出的,并處在ROM中最重要的字節(jié)。暫存器中的CRC代碼是由儲(chǔ)存器中的數(shù)據(jù)計(jì)算出來(lái)的,因此它變化時(shí),在暫存器中的數(shù)據(jù)也會(huì)變化。CRCs提供總線主機(jī)數(shù)據(jù)驗(yàn)證方法,當(dāng)主機(jī)從DS18B20讀取數(shù)據(jù)時(shí)。為了驗(yàn)證數(shù)據(jù)已被正確讀取,總線主機(jī)必須從接收到的數(shù)據(jù)中重新計(jì)算CRC,然后比較此值無(wú)論是ROM代碼(為ROM讀)或暫存器的CRC(為暫存器讀?。?。如果計(jì)算出的CRC與讀到的CRC匹配,說(shuō)明已收到的數(shù)據(jù)準(zhǔn)確無(wú)誤。 CRC的值比較,是否繼續(xù)運(yùn)作完全由總線主機(jī)決定

17、。如果DS18B20的CR(ROM或暫存器)與由總線主機(jī)產(chǎn)生的值不匹配,DS18B20中沒(méi)有任何電路阻止命令序列的進(jìn)程。由總線主機(jī)產(chǎn)生的價(jià)值電路。CRC的同等多項(xiàng)式函數(shù)(ROM或暫存器)是: CRC = X8+ X5 + X4+ 1總線主機(jī)可以重新計(jì)算CRC,然后使用多項(xiàng)式發(fā)生器與從DS18B20得到用的CRC值進(jìn)行比較。該電路由一個(gè)移位寄存器和XOR門組成,移位寄存器初始化為0。從暫存器最低有效位或0字節(jié)的最低有效位的開始,每次一比特應(yīng)該移入移位寄存器。從ROM或從暫存器中最重要的第7字節(jié)轉(zhuǎn)移到第56比特后,多項(xiàng)式發(fā)生器將包含重新計(jì)算的CRC校驗(yàn)碼。接下來(lái),8位ROM代碼或暫存器從DS18B

18、20的CRC必須轉(zhuǎn)移到電路。此時(shí),如果重新計(jì)算的CRC是正確的,移位寄存器將包含所有0。對(duì)達(dá)拉斯的單總線循環(huán)冗余校驗(yàn)的更多信息在應(yīng)用筆記27:理解和使用觸摸與達(dá)拉斯半導(dǎo)體存儲(chǔ)器產(chǎn)品的循環(huán)冗余校驗(yàn)中有詳細(xì)介紹。 DS18B20 Single - wire temperature sensorI. FEATURES Unique 1-Wireinterface requires only one port pin for communication Each device has a unique 64-bit serial code stored in an onboard ROM Multid

19、rop capability simplifies distributed temperature sensing applications Requires no external components Can be powered from data line. Power supply range is 3.0V to 5.5V Measures temperatures from 55°C to +125°C (67°F to +257°F) 0.5°C accuracy from 10°C to +85°C The

20、rmometer resolution is user-selectable from 9 to 12 bits Converts temperature to 12-bit digital word in 750ms (max.) User-definable nonvolatile (NV) alarm settings Alarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition) Av

21、ailable in 8-pin SO (150mil), 8-pin SOP, and 3-pin TO-92 packages Software compatible with the DS1822 Applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitiveII. DESCRIPTION The DS18B20 Digital Thermometer provides 9 to 12bit centigr

22、ade temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18B20 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor. It has an operating temper

23、ature range of 55°C to +125°Cand is accurate to 0.5°C over the range of 10°C to +85°C. In addition, the DS18B20 can derive power directly from the data line (“parasite power”), eliminating the need for an external power supply. Each DS18B20 has a unique 64-bit serial code, w

24、hich allows multiple DS18B20s to function on the same 1wire bus; thus, it is simple to use one microprocessor to control many DS18B20s distributed over a large area. Applications that can benefit from this feature include HVAC environmental controls, temperature monitoring systems inside buildings,

25、equipment or machinery, and process monitoring and control systems.III. OVERVIEWFigure 1 shows a block diagram of the DS18B20, and pin descriptions are given in Table 1. The 64-bit ROM stores the devices unique serial code. The scratchpad memory contains the 2-byte temperature register that stores t

26、he digital output from the temperature sensor. In addition, the scratchpad provides access to the 1-byte upper and lower alarm trigger registers (TH and TL), and the 1-byte configuration register. The configuration register allows the user to set the resolution of the temperature-to-digital conversi

27、on to 9, 10, 11, or 12 bits. The TH, TL and configuration registers are nonvolatile (EEPROM), so they will retain data when the device is powered down.The DS18B20 uses Dallas exclusive 1-Wire bus protocol that implements bus communication using one control signal. The control line requires a weak pu

28、llup resistor since all devices are linked to the bus via a 3-state or open-drain port (the DQ pin in the case of the DS18B20). In this bus system, the microprocessor (the master device) identifies and addresses devices on the bus using each devices unique 64-bit code. Because each device has a uniq

29、ue code, the number of devices that can be addressed on one bus is virtually unlimited. The 1-Wire bus protocol, including detailed explanations of the commands and “time slots” is covered in the 1-WIRE BUS SYSTEM section of this datasheet. Another feature of the DS18B20 is the ability to operate wi

30、thout an external power supply. Power is instead supplied through the 1-Wire pullup resistor via the DQ pin when the bus is high. The high bus signal also charges an internal capacitor (CPP), which then supplies power to the device when the bus is low. This method of deriving power from the 1-Wire b

31、us is referred to as “parasite power.” As an alternative, the DS18B20 may also be powered by an external supply on VDD.IV. OPERATION MEASURING TEMPERATURE The core functionality of the DS18B20 is its direct-to-digital temperature sensor. The resolution of the temperature sensor is user-configurable

32、to 9, 10, 11, or 12 bits, corresponding to increments of 0.5 C, 0.25 C, 0.125 C, and 0.0625 C, respectively. The default resolution at power-up is 12-bit. The DS18B20 powers-up in a low-power idle state; to initiate a temperature measurement and A-to-D conversion, the master must issue a Convert T 4

33、4h command. Following the conversion, the resulting thermal data is stored in the 2-byte temperature register in the scratchpad memory and the DS18B20 returns to its idle state. If the DS18B20 is powered by an external supply, the master can issue “read time slots” (see the 1-WIRE BUS SYSTEM section

34、) after the Convert T command and the DS18B20 will respond by transmitting 0 while the temperature conversion is in progress and 1 when the conversion is done. If the DS18B20 is powered with parasite power, this notification technique cannot be used since the bus must be pulled high by a strong pull

35、up during the entire temperature conversion. The bus requirements for parasite power are explained in detail in the POWERING THE DS18B20 section of this datasheet. The DS18B20 output temperature data is calibrated in degrees centigrade; for Fahrenheit applications, a lookup table or conversion routi

36、ne must be used. The temperature data is stored as a 16-bit sign-extended twos complement number in the temperature register (see Figure 2). The sign bits (S) indicate if the temperature is positive or negative: for positive numbers S = 0 and for negative numbers S = 1. If the DS18B20 is configured

37、for 12-bit resolution, all bits in the temperature register will contain valid data. For 11-bit resolution, bit 0 is undefined. For 10-bit resolution, bits 1 and 0 are undefined, and for 9-bit resolution bits 2, 1 and 0 are undefined. Table 2 gives examples of digital output data and the correspondi

38、ng temperature reading for 12-bit resolution conversions.V OPERATION ALARM SIGNALINGAfter the DS18B20 performs a temperature conversion, the temperature value is compared to the user-defined twos complement alarm trigger values stored in the 1-byte TH and TL registers (see Figure 3). The sign bit (S

39、) indicates if the value is positive or negative: for positive numbers S = 0 and for negative numbers S = 1. The TH and TL registers are nonvolatile (EEPROM) so they will retain data when the device is powered down. TH and TL can be accessed through bytes 2 and 3 of the scratchpad as explained in th

40、e MEMORY section of this datasheet.VI. TH AND TL REGISTER FORMAT Figure 3Only bits 11 through 4 of the temperature register are used in the TH and TL comparison since TH and TL are 8-bit registers. If the measured temperature is lower than or equal to TL or higher than TH, an alarm condition exists

41、and an alarm flag is set inside the DS18B20. This flag is updated after every temperature measurement; therefore, if the alarm condition goes away, the flag will be turned off after the next temperature conversion. The master device can check the alarm flag status of all DS18B20s on the bus by issui

42、ng an Alarm Search ECh command. Any DS18B20s with a set alarm flag will respond to the command, so the master can determine exactly which DS18B20s have experienced an alarm condition. If an alarm condition exists and the TH or TL settings have changed, another temperature conversion should be done t

43、o validate the alarm condition.VII. POWERING THE DS18B20 The DS18B20 can be powered by an external supply on the VDD pin, or it can operate in “parasite power” mode, which allows the DS18B20 to function without a local external supply. Parasite power is very useful for applications that require remo

44、te temperature sensing or that are very space constrained. Figure 1 shows the DS18B20s parasite-power control circuitry, which “steals” power from the 1-Wire bus via the DQ pin when the bus is high. The stolen charge powers the DS18B20 while the bus is high, and some of the charge is stored on the p

45、arasite power capacitor (CPP) to provide power when the bus is low. When the DS18B20 is used in parasite power mode, the VDD pin must be connected to ground. In parasite power mode, the 1-Wire bus and CPP can provide sufficient current to the DS18B20 for most operations as long as the specified timi

46、ng and voltage requirements are met (refer to the DC ELECTRICAL CHARACTERISTICS and the AC ELECTRICAL CHARACTERISTICS sections of this data sheet).However, when the DS18B20 is performing temperature conversions or copying data from the scratchpad memory to EEPROM, the operating current can be as hig

47、h as 1.5mA. This current can cause an unacceptable voltage drop across the weak 1-Wire pullup resistor and is more current than can be supplied by CPP. To assure that the DS18B20 has sufficient supply current, it is necessary to provide a strong pullup on the 1-Wire bus whenever temperature conversi

48、ons are taking place or data is being copied from the scratchpad to EEPROM. This can be accomplished by using a MOSFET to pull the bus directly to the rail as shown in Figure 4. The 1-Wire bus must be switched to the strong pullup within 10s (max) after a Convert T 44h or Copy Scratchpad 48h command

49、 is issued, and the bus must be held high by the pullup for the duration of the conversion (tconv) or data transfer (twr = 10ms). No other activity can take place on the 1-Wire bus while the pullup is enabled. The DS18B20 can also be powered by the conventional method of connecting an external power

50、 supply to the VDD pin, as shown in Figure 5. The advantage of this method is that the MOSFET pullup is not required, and the 1-Wire bus is free to carry other traffic during the temperature conversion time. The use of parasite power is not recommended for temperatures above +100C since the DS18B20

51、may not be able to sustain communications due to the higher leakage currents that can exist at these temperatures. For applications in which such temperatures are likely, it is strongly recommended that the DS18B20 be powered by an external power supply. In some situations the bus master may not kno

52、w whether the DS18B20s on the bus are parasite powered or powered by external supplies. The master needs this information to determine if the strong bus pullup should be used during temperature conversions. To get this information, the master can issue a Skip ROM CCh command followed by a Read Power

53、 Supply B4h command followed by a “read time slot”. During the read time slot, parasite powered DS18B20s will pull the bus low, and externally powered DS18B20s will let the bus remain high. If the bus is pulled low, the master knows that it must supply the strong pullup on the 1-Wire bus during temp

54、erature conversions.VIII. 64-BIT LASERED ROM CODE Each DS18B20 contains a unique 64bit code (see Figure 6) stored in ROM. The least significant 8 bits of the ROM code contain the DS18B20s 1-Wire family code: 28h. The next 48 bits contain a unique serial number. The most significant 8 bits contain a

55、cyclic redundancy check (CRC) byte that is calculated from the first 56 bits of the ROM code. A detailed explanation of the CRC bits is provided in the CRC GENERATION section. The 64-bit ROM code and associated ROM function control logic allow the DS18B20 to operate as a 1-Wire device using the prot

56、ocol detailed in the 1-WIRE BUS SYSTEM section of this datasheet.IX. MEMORY The DS18B20s memory is organized as shown in Figure 7. The memory consists of an SRAM scratchpad with nonvolatile EEPROM storage for the high and low alarm trigger registers (TH and TL) and configuration register. Note that

57、if the DS18B20 alarm function is not used, the TH and TL registers can serve as general-purpose memory. All memory commands are described in detail in the DS18B20 FUNCTION COMMANDS section. Byte 0 and byte 1 of the scratchpad contain the LSB and the MSB of the temperature register, respectively. The

58、se bytes are read-only. Bytes 2 and 3 provide access to TH and TL registers. Byte 4 contains the configuration register data, which is explained in detail in the CONFIGURATION REGISTER section of this datasheet. Bytes 5, 6, and 7 are reserved for internal use by the device and cannot be overwritten; these bytes will return all 1s when r

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論