2023年全國碩士研究生考試考研英語一試題真題(含答案詳解+作文范文)_第1頁
已閱讀1頁,還剩13頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡介

1、<p>  DS18B20 單線溫度傳感器</p><p>  特征:ucts DS18B20 data sheet 2012</p><p>  ● 獨(dú)特的單線接口,只需 1 個接口引腳即可通信</p><p>  ● 每個設(shè)備都有一個唯一的64位串行代碼存儲在ROM上</p><p>  ● 多點(diǎn)能力使分布式溫度檢測應(yīng)用得以簡

2、化</p><p><b>  ● 不需要外部部件</b></p><p>  ● 可以從數(shù)據(jù)線供電,電源電壓范圍為3.0V至5.5V</p><p>  ● 測量范圍從-55 ° C 至+125 ° C(-67 ° F至257 ° F),從-10℃至+85 °C的精度為0.5 °C&

3、lt;/p><p>  ● 溫度計(jì)分辨率是用戶可選擇的9至12位</p><p>  ● 轉(zhuǎn)換12位數(shù)字的最長時間是750ms</p><p>  ● 用戶可定義的非易失性的溫度告警設(shè)置</p><p>  ● 告警搜索命令識別和尋址溫度在編定的極限之外的器件 (溫度告警情況)</p><p>  ● 采用8引腳SO(15

4、0mil),8引腳SOP和3引腳TO - 92封裝</p><p>  ● 軟件與DS1822兼容</p><p>  ● 應(yīng)用范圍包括恒溫控制工業(yè)系統(tǒng)消費(fèi)類產(chǎn)品溫度計(jì)或任何熱敏系統(tǒng)</p><p><b>  簡介</b></p><p>  該DS18B20的數(shù)字溫度計(jì)提供9至12位的攝氏溫度測量,并具有與非易失性用

5、戶可編程上限和下限報警功能。信息單線接口送入DS18B20或從DS18B20 送出,因此按照定義只需要一條數(shù)據(jù)線與中央微處理器進(jìn)行通信。它的測溫范圍從-55°C到 +125°C,其中從-10 °C至+85 °C可以精確到0.5°C 。此外,DS18B20可以從數(shù)據(jù)線直接供電(“寄生電源”),從而消除了供應(yīng)需要一個外部電源。</p><p>  每個 DS18B20

6、 的有一個唯一的64位序列碼,它允許多個DS18B20的功能在同一總線。因此,用一個微處理器控制大面積分布的許多DS18B20是非常簡單的。此特性的應(yīng)用范圍包括 HVAC、環(huán)境控制、建筑物、設(shè)備或機(jī)械內(nèi)的溫度檢測以及過程監(jiān)視和控制系統(tǒng)。</p><p><b>  綜述</b></p><p>  64位ROM存儲設(shè)備的獨(dú)特序號。存貯器包含2個字節(jié)的溫度寄存器,它存儲

7、來自溫度傳感器的數(shù)字輸出。此外,暫存器可以訪問的1個字節(jié)的上下限溫度告警觸發(fā)器(TH和TL)和1個字節(jié)的配置寄存器。配置寄存器允許用戶設(shè)置的溫度到數(shù)字轉(zhuǎn)換的分辨率為9,10,11或12位。TH,TL和配置寄存器是非易失性的,因此掉電時依然可以保存數(shù)據(jù)。</p><p>  該DS18B20使用Dallas的單總線協(xié)議,總線之間的通信用一個控制信號就可以實(shí)現(xiàn)。控制線需要一個弱上拉電阻,因?yàn)樗械脑O(shè)備都是通過3線或開

8、漏端口連接(在DS18B20中用DQ引腳)到總線的。在這種總線系統(tǒng)中,微處理器(主設(shè)備)和地址標(biāo)識上使用其獨(dú)有的64位代碼。因?yàn)槊總€設(shè)備都有一個唯一的代碼,一個總線上連接設(shè)備的數(shù)量幾乎是無限的。單總線協(xié)議,包括詳細(xì)的解釋命令和“時間槽”,此資料的單總線系統(tǒng)部分包括這些內(nèi)容。</p><p>  DS18B20的另一個特點(diǎn)是:沒有外部電源供電仍然可以工作。當(dāng)DQ引腳為高電平時,電壓是單總線上拉電阻通過DQ引腳供應(yīng)的

9、。高電平信號也可以充當(dāng)外部電源,當(dāng)總線是低電平時供應(yīng)給設(shè)備電壓。這種從但總線提供動力的方法被稱為“寄生電源“。作為替代電源,該DS18B20也可以使用連接到 VDD 引腳的外部電源供電。</p><p>  運(yùn)用 —— 測量溫度</p><p>  該DS18B20的核心功能是它是直接輸出數(shù)字信號的溫度傳感器。該溫度傳感器的分辨率為用戶配置至9,10,11或12位,相當(dāng)于0.5°

10、 C,0.25° C,0.125 ° C和0.0625° C的增量。其中傳感器默認(rèn)為12位。該DS18B20在低功耗空閑狀態(tài);啟動溫度測量和模數(shù)轉(zhuǎn)換,主機(jī)必須發(fā)出一個轉(zhuǎn)換命令。轉(zhuǎn)換后,所產(chǎn)生的數(shù)據(jù)存儲在內(nèi)存中的2比特溫度寄存器中,DS18B20返回其空閑狀態(tài)。如果DS18B20是由外部電源供電的,主機(jī)可以發(fā)出“讀時隙”,轉(zhuǎn)換后,通過發(fā)送低電平T命令和DS18B20將響應(yīng),同時溫度轉(zhuǎn)換繼續(xù)進(jìn)行,當(dāng)轉(zhuǎn)換完成時變

11、為高電平。如果DS18B20的是寄生電源供電的,在整個溫度轉(zhuǎn)換過程中此通知技術(shù)不能使用,因?yàn)榭偩€必須變?yōu)楦唠娖???偩€需要寄生電源供電將在此資料的DS18B20驅(qū)動部分將詳細(xì)介紹。</p><p>  DS18B20的輸出溫度數(shù)據(jù)為標(biāo)準(zhǔn)攝氏度;對于華氏溫度的應(yīng)用,必須通過查表或運(yùn)用轉(zhuǎn)換方法。溫度數(shù)據(jù)在溫度寄存器存儲為一個16位符號擴(kuò)展位和2位的補(bǔ)碼。該標(biāo)志位(S)表示溫度的正負(fù)符號位:為正數(shù)時S = 0,為負(fù)數(shù)時S

12、 = 1。如果是DS18B20配置為12位分辨率,在溫度寄存器的所有位將包含有效數(shù)據(jù)。對于11位分辨率,位0是未定義的。對于10位分辨率,位1和0是未定義的。對于9位分辨率,位2,1和0是未定義的。表2給出了輸出數(shù)字?jǐn)?shù)據(jù)和相應(yīng)的12位分辨率溫度讀數(shù)轉(zhuǎn)換例子。</p><p><b>  運(yùn)用——報警信號</b></p><p>  DS18B20溫度轉(zhuǎn)換完成后,溫度值

13、與用戶定義的2個報警觸發(fā)值存儲在1個字節(jié)的TH和TL寄存器。符號位(S)表示溫度值的正負(fù): S = 0時為正值, S = 1為負(fù)值。TH和TL寄存器是非易失(EEPROM),因此他們將保留設(shè)備掉電時的數(shù)據(jù)。TH和TL可通過暫存器中字節(jié)2和3獲得,此內(nèi)容在本數(shù)據(jù)表內(nèi)存部分解釋。</p><p>  TH和TL寄存器格式</p><p>  只有溫度寄存器4中的11位用于和TL的比較中,由于T

14、H和TL都是 8位寄存器。如果測量溫度低于或等于TL或超過TH,報警情況存在而且報警標(biāo)志將設(shè)置在DS18B20的內(nèi)部。每個溫度測量后,這個標(biāo)志位將被更新,因此,如果報警條件消失,下一個溫度轉(zhuǎn)換后,該標(biāo)志位將被關(guān)閉。主設(shè)備可以通過搜索ECH命令檢查總線上所有DS18B20報警標(biāo)志位的狀態(tài)。任何有設(shè)置報警標(biāo)志位的DS18B20將響應(yīng)命令,所以主設(shè)備可以決定到底是哪個DS18B20在經(jīng)歷一個報警條件。如果報警的情況存在,TH和TL設(shè)置已經(jīng)改變

15、了,另一個溫度轉(zhuǎn)換應(yīng)該去驗(yàn)證報警條件。</p><p>  DS18B20的驅(qū)動</p><p>  該傳感器DS18B20可以用外部電源接VDD端供電,或者它可以工作在“寄生電源”模式下,這種模式允許DS18B20在沒有外部電源下工作。寄生電源在遠(yuǎn)程或者空間受限情況下感溫是非常有用的。寄生功率控制電路,其中當(dāng)總線引腳為高電平時,力部門宿舍從DS18B20通過連接單總線的DQ端“偷”電。當(dāng)

16、總線是高電平或者總線是低電平,而一些能量存貯在CPP中來提供電源,“偷”來的電位DS18B20提供驅(qū)動。</p><p>  當(dāng)DS18B20在寄生電源模式下使用時,VDD引腳必須接地。在寄生電源模式下,單總線和CPP可以提供足夠的電流給DS18B20的大部分操作,只要指定的時間和電壓的要求得到滿足(參考本數(shù)據(jù)手冊DC電氣特性和AC電氣特性章節(jié))。</p><p>  然而,當(dāng)DS18B2

17、0溫度轉(zhuǎn)換或復(fù)制暫存器的數(shù)據(jù)到EEPROM時,工作電流可高達(dá)1.5毫安。這個電流會導(dǎo)致無法接受的電壓下降,整個單總線電阻壓降減小,更多的電流可以由寄生電源供應(yīng)。為了確保DS18B20有足夠的電流供應(yīng),無論正在發(fā)生溫度轉(zhuǎn)換或復(fù)制暫存器的數(shù)據(jù)到EEPROM,單總線都必須接一個強(qiáng)上拉電阻。這可以通過使用一個MOSFET以直接把總線電壓下降到如圖4所示。</p><p>  單總線必須在轉(zhuǎn)換T[44h]或暫存器復(fù)制[48

18、H]命令發(fā)出后,10秒內(nèi)(最大)轉(zhuǎn)換到強(qiáng)上拉狀態(tài),而且總線必須在轉(zhuǎn)換(tconv)或數(shù)據(jù)傳輸(twr = 10ms)期間通過上拉保持高電平。在單總線上拉使能時,其他活動不能發(fā)生。該DS18B20的也可以采用的連接外部電源到VDD腳上的傳統(tǒng)方法。</p><p>  這種方法的優(yōu)點(diǎn)是不需要MOSFET的上拉, 而且單總線可以在進(jìn)行溫度轉(zhuǎn)換時間自由地進(jìn)行其他操作。在+100℃以上的高溫時不推薦使用寄生電源,因?yàn)樵谶@些

19、溫度下存在較高泄漏電流,DS18B20可能無法維持通信。對于像在這種高溫下的使用,強(qiáng)烈建議由一個DS18B20的外部電源供電。在某些情況下,總線主機(jī)可能不知道DS18B20是外部電源還是寄生電源供電。主機(jī)需要這些信息來確定是否強(qiáng)大的總線上拉應(yīng)在溫度轉(zhuǎn)換時使用。要獲得這些信息,主機(jī)可以在 “閱讀時段” 一個讀取電源[B4h]命令后,發(fā)出一個跳過ROM[CCh]命令。在讀時隙,寄生電源給DS18B20供電將把總線電平拉低,外部供電時DS18

20、B20將會讓總線仍然保持高電平。如果總線拉低,主機(jī)知道在溫度轉(zhuǎn)換期間它必須提供單總線強(qiáng)上拉。</p><p><b>  64位激光ROM</b></p><p>  每一 DS18B20 包括一個唯一的 64 位長的 ROM 編碼。開紿的 8 位是單線產(chǎn)品系列編碼:28h,接著的 48 位是唯一的系列號。最重要的8位是開始 56 位 CRC位,從56位的ROM端計(jì)算

21、而來。CRC比特的詳細(xì)內(nèi)容將在CRC概述一章中介紹。64位ROM代碼和相關(guān)ROM功能控制邏輯使DS18B20作為使用協(xié)議的單線設(shè)備的運(yùn)作,單總線系統(tǒng)的數(shù)據(jù)表部分詳細(xì)介紹了這個協(xié)議。</p><p><b>  存貯器</b></p><p>  DS18B20的存貯器那樣被組織 存貯器由一個高速暫存 便箋式 RAM、一個存貯高溫度和低溫度和觸發(fā)器 TH 和 TL的非易

22、失性電可擦除 E2RAM和存儲配置寄存器組成。請注意,如果DS18B20的報警功能不使用,TH和TL寄存器可以作為通用存儲器。 DS18B20的功能命令部分詳細(xì)敘述了所有內(nèi)存的命令。暫存器的字節(jié)0和字節(jié)1分別包含LSB和MSB溫度寄存器。這些字節(jié)是只讀的。字節(jié)2和3提供是提供接入的TH和TL寄存器。字節(jié)4包含配置寄存器數(shù)據(jù),數(shù)據(jù)表配置寄存器部分詳細(xì)解釋了它的內(nèi)容。字節(jié)5,6和7是保留供內(nèi)部使用的設(shè)備,不能被覆蓋,當(dāng)被讀到時,這些字節(jié)將返

23、回1秒。8字節(jié)暫存器是只讀的,并且包含了循環(huán)冗余校驗(yàn)碼,通過暫存器的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ù)從暫存器到EEPRO&l

24、t;/p><p><b>  配置寄存器</b></p><p>  暫存存儲器的第四字節(jié)包含配置寄存器。用戶可以使用該寄存器的R0和R1的位設(shè)置DS18B20的轉(zhuǎn)換分辨率。這些位默認(rèn)是R0和R1都等于1(12位)的分辨率。請注意,兩者之間是有直接的分辨率和轉(zhuǎn)換時間的對比。第7位,并在配置寄存器0至4位是保留供內(nèi)部使用的設(shè)備,不能被覆蓋,這些位被讀出時將返回1秒。<

25、/p><p><b>  CRC生成</b></p><p>  CRC字節(jié)是DS18B20的64位ROM代碼的一部分,在暫存器的第9比特。CRC的代碼是由前56位的ROM代碼計(jì)算出的,并處在ROM中最重要的字節(jié)。暫存器中的CRC代碼是由儲存器中的數(shù)據(jù)計(jì)算出來的,因此它變化時,在暫存器中的數(shù)據(jù)也會變化。CRCs提供總線主機(jī)數(shù)據(jù)驗(yàn)證方法,當(dāng)主機(jī)從DS18B20讀取數(shù)據(jù)時。為

26、了驗(yàn)證數(shù)據(jù)已被正確讀取,總線主機(jī)必須從接收到的數(shù)據(jù)中重新計(jì)算CRC,然后比較此值無論是ROM代碼(為ROM讀)或暫存器的CRC(為暫存器讀取)。如果計(jì)算出的CRC與讀到的CRC匹配,說明已收到的數(shù)據(jù)準(zhǔn)確無誤。 CRC的值比較,是否繼續(xù)運(yùn)作完全由總線主機(jī)決定。如果DS18B20的CR(ROM或暫存器)與由總線主機(jī)產(chǎn)生的值不匹配,DS18B20中沒有任何電路阻止命令序列的進(jìn)程。由總線主機(jī)產(chǎn)生的價值電路。CRC的同等多項(xiàng)式函數(shù)(ROM或暫存器

27、)是:</p><p>  CRC = X8+ X5 + X4+ 1</p><p>  總線主機(jī)可以重新計(jì)算CRC,然后使用多項(xiàng)式發(fā)生器與從DS18B20得到用的CRC值進(jìn)行比較。該電路由一個移位寄存器和XOR門組成,移位寄存器初始化為0。從暫存器最低有效位或0字節(jié)的最低有效位的開始,每次一比特應(yīng)該移入移位寄存器。從ROM或從暫存器中最重要的第7字節(jié)轉(zhuǎn)移到第56比特后,多項(xiàng)式發(fā)生器將包含

28、重新計(jì)算的CRC校驗(yàn)碼。接下來,8位ROM代碼或暫存器從DS18B20的CRC必須轉(zhuǎn)移到電路。此時,如果重新計(jì)算的CRC是正確的,移位寄存器將包含所有0。對達(dá)拉斯的單總線循環(huán)冗余校驗(yàn)的更多信息在應(yīng)用筆記27:理解和使用觸摸與達(dá)拉斯半導(dǎo)體存儲器產(chǎn)品的循環(huán)冗余校驗(yàn)中有詳細(xì)介紹。</p><p>  DS18B20 Single - wire temperature sensor</p><p>

29、;  I. FEATURES</p><p>  ● Unique 1-Wireinterface requires only one port pin for communication </p><p>  ● Each device has a unique 64-bit serial code stored in an onboard ROM</p><p&

30、gt;  ● Multidrop capability simplifies distributed temperature sensing applications </p><p>  ● Requires no external components </p><p>  ● Can be powered from data line. Power supply range is

31、3.0V to 5.5V </p><p>  ● Measures temperatures from –55°C to +125°C (–67°F to +257°F) 0.5°C accuracy from –10°C to +85°C </p><p>  ● Thermometer resolution is

32、 user-selectable from 9 to 12 bits </p><p>  ● Converts temperature to 12-bit digital word in 750ms (max.) </p><p>  ● User-definable nonvolatile (NV) alarm settings </p><p>  ● Ala

33、rm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition) </p><p>  ● Available in 8-pin SO (150mil), 8-pin SOP, and 3-pin TO-92 packa

34、ges </p><p>  ● Software compatible with the DS1822 </p><p>  ● Applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitive</p

35、><p>  II. DESCRIPTION </p><p>  The DS18B20 Digital Thermometer provides 9 to 12–bit centigrade temperature measurements and has an alarm function with nonvolatile user-programmable upper and low

36、er 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 temperature range of –55

37、6;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</p><p>  Each DS18B20 has a unique 64-bit serial code, which all

38、ows multiple DS18B20s to function on the same 1–wire 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

39、environmental controls, temperature monitoring systems inside buildings, equipment or machinery, and process monitoring and control systems.</p><p>  III. OVERVIEW</p><p>  Figure 1 shows a blo

40、ck diagram of the DS18B20, and pin descriptions are given in Table 1. The 64-bit ROM stores the device’s unique serial code. The scratchpad memory contains the 2-byte temperature register that stores the digital output f

41、rom 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

42、 to set the resolution of the temperatur</p><p>  The DS18B20 uses Dallas’ exclusive 1-Wire bus protocol that implements bus communication using one control signal. The control line requires a weak pullup re

43、sistor 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

44、bus using each device’s unique 64-bit code. Because each device has a unique code, the number of devices that can be addres</p><p>  Another feature of the DS18B20 is the ability to operate without an extern

45、al 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 whe

46、n the bus is low. This method of deriving power from the 1-Wire bus is referred to as “parasite power.” As an alternative, the DS18B20 may also be powered by an external supply on VDD.</p><p>  IV. OPERATIO

47、N — MEASURING TEMPERATURE</p><p>  The core functionality of the DS18B20 is its direct-to-digital temperature sensor. The resolution of the temperature sensor is user-configurable to 9, 10, 11, or 12 bits, c

48、orresponding 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

49、-to-D conversion, the master must issue a Convert T [44h] command. Following the conversion, the resulting t</p><p>  The DS18B20 output temperature data is calibrated in degrees centigrade; for Fahrenheit a

50、pplications, a lookup table or conversion routine must be used. The temperature data is stored as a 16-bit sign-extended two’s complement number in the temperature register (see Figure 2). The sign bits (S) indicate if t

51、he temperature is positive or negative: for positive numbers S = 0 and for negative numbers S = 1. If the DS18B20 is configured for 12-bit resolution, all bits in the temperature register wil</p><p>  V OPE

52、RATION — ALARM SIGNALING</p><p>  After the DS18B20 performs a temperature conversion, the temperature value is compared to the user-defined two’s complement alarm trigger values stored in the 1-byte TH and

53、TL registers (see Figure 3). The sign bit (S) 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 retai

54、n data when the device is powered down. TH and TL can be accessed through bytes 2 and 3 of the scratchpad a</p><p>  VI. TH AND TL REGISTER FORMAT Figure 3</p><p>  Only bits 11 through 4 of th

55、e 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 and an alarm flag is

56、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 chec

57、k the alarm flag status of all D</p><p>  VII. POWERING THE DS18B20 </p><p>  The DS18B20 can be powered by an external supply on the VDD pin, or it can operate in “parasite power” mode, which

58、allows the DS18B20 to function without a local external supply. Parasite power is very useful for applications that require remote temperature sensing or that are very space constrained. Figure 1 shows the DS18B20’s par

59、asite-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 hi</p><p>  When the DS18B20 is used in para

60、site 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 timing and voltage requi

61、rements are met (refer to the DC ELECTRICAL CHARACTERISTICS and the AC ELECTRICAL CHARACTERISTICS sections of this data sheet).</p><p>  However, when the DS18B20 is performing temperature conversions or cop

62、ying data from the scratchpad memory to EEPROM, the operating current can be as high 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 su

63、pplied 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 conversions are taking place or data is being copied fr</p>

64、<p>  The 1-Wire bus must be switched to the strong pullup within 10s (max) after a Convert T [44h] or Copy Scratchpad [48h] command is issued, and the bus must be held high by the pullup for the duration of the c

65、onversion (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

66、 supply to the VDD pin, as shown in Figure 5. </p><p>  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 conver

67、sion time. The use of parasite power is not recommended for temperatures above +100C since the DS18B20 may not be able to sustain communications due to the higher leakage currents that can exist at these temperatures. Fo

68、r applications in which such temperatures are likely, it is strongly recommended that the DS18B20 be powered by an external power</p><p>  VIII. 64-BIT LASERED ROM CODE </p><p>  Each DS18B20 c

69、ontains a unique 64–bit code (see Figure 6) stored in ROM. The least significant 8 bits of the ROM code contain the DS18B20’s 1-Wire family code: 28h. The next 48 bits contain a unique serial number. The most significant

70、 8 bits contain a 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 as

71、sociated ROM function control logic allow the </p><p>  IX. MEMORY </p><p>  The DS18B20’s memory is organized as shown in Figure 7. The memory consists of an SRAM scratchpad with nonvolatile E

72、EPROM storage for the high and low alarm trigger registers (TH and TL) and configuration register. Note that if the DS18B20 alarm function is not used, the TH and TL registers can serve as general-purpose memory. All mem

73、ory 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 re</p><p>  X. CONFIGURATION REGISTER </p

74、><p>  Byte 4 of the scratchpad memory contains the configuration register, which is organized as illustrated in Figure 8. The user can set the conversion resolution of the DS18B20 using the R0 and R1 bits in t

75、his register as shown in Table 3. The power-up default of these bits is R0 = 1 and R1 = 1 (12-bit resolution). Note that there is a direct tradeoff between resolution and conversion time. Bit 7 and bits 0 to 4 in the co

76、nfiguration register are reserved for internal use by the device and cannot b</p><p>  XI. CRC GENERATION </p><p>  CRC bytes are provided as part of the DS18B20’s 64-bit ROM code and in the 9th

77、byte of the scratchpad memory. The ROM code CRC is calculated from the first 56 bits of the ROM code and is contained in the most significant byte of the ROM. </p><p>  The scratchpad CRC is calculated from

78、the data stored in the scratchpad, and therefore it changes when the data in the scratchpad changes. The CRCs provide the bus master with a method of data validation when data is read from the DS18B20. </p><p&

79、gt;  To verify that data has been read correctly, the bus master must re-calculate the CRC from the received data and then compare this value to either the ROM code CRC (for ROM reads) or to the scratchpad CRC (for scrat

80、chpad reads).If the calculated CRC matches the read CRC, the data has been received error free. The comparison of CRC values and the decision to continue with an operation are determined entirely by the bus master. There

溫馨提示

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

評論

0/150

提交評論