版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、<p> 本科生畢業(yè)設(shè)計(論文)外文翻譯</p><p> 譯文題目:DS18B20 單線溫度傳感器</p><p> 外文題目:DS18B20 Single - wire temperature sensor</p><p> 學(xué) 院: 信息科學(xué)與工程學(xué)院 </p><p> 專業(yè)班級: 電子
2、信息工程0804班 </p><p> 學(xué)生姓名: </p><p> 指導(dǎo)教師: </p><p> DS18B20 Single - wire temperature sensor</p><p> 一. FEATURES</p>
3、;<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> ● Multidrop capabil
4、ity simplifies distributed temperature sensing applications </p><p> ● Requires no external components </p><p> ● Can be powered from data line. Power supply range is 3.0V to 5.5V </p>
5、<p> ● Measures temperatures from –55°C to +125°C (–67°F to +257°F) 0.5C accuracy from –10°C to +85°C </p><p> ● Thermometer resolution is user-selectable from 9 to 12
6、bits </p><p> ● Converts temperature to 12-bit digital word in 750ms (max.) </p><p> ● User-definable nonvolatile (NV) alarm settings </p><p> ● Alarm search command identifies a
7、nd addresses devices whose temperature is </p><p> outside of programmed limits (temperature alarm condition) </p><p> ● Available in 8-pin SO (150mil), 8-pin SOP, and 3-pin TO-92 packages &l
8、t;/p><p> ● Software compatible with the DS1822 </p><p> ● Applications include thermostatic controls, industrial systems, consumer</p><p> products, thermometers, or any thermally
9、 sensitive</p><p> 二. DESCRIPTION </p><p> The DS18B20 Digital Thermometer provides 9 to 12–bit centigrade temperature measurements and has an alarm function with nonvolatile user-programmabl
10、e 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 temperature r
11、ange of –55°C to +125°Cand is accurate to 0.5C over the range of –10°C to +85°C. In addition, the DS18B20 can derive powerdirectly f</p><p> Each DS18B20 has a unique 64-bit serial code,
12、 which allows 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 inc
13、lude HVAC environmental controls, temperature monitoring systems inside buildings, equipment or machinery, and process monitoring and control systems.</p><p> 三. OVERVIEW</p><p> Figure 1 sho
14、ws a block 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
15、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
16、the user 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 p
17、ullup 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 device
18、s on the bus using each device’s unique 64-bit code. Because each device has a unique code, the number of devices that can be addre</p><p> Another feature of the DS18B20 is the ability to operate without a
19、n 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 de
20、vice when 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> 四. O
21、PERATION — 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
22、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 measuremen
23、t and A-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 Fahre
24、nheit applications, 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) indica
25、te if the 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>
26、 五. OPERATION — 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-byt
27、e TH and 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 w
28、ill retain data when the device is powered down. TH and TL can be accessed through bytes 2 and 3 of the scratchpad </p><p> 六. TH AND TL REGISTER FORMAT Figure 3</p><p> Only bits 11 through
29、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 and an alarm f
30、lag 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
31、can check the alarm flag status of all </p><p> 七. 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, w
32、hich 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
33、’s 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 h</p><p> When the DS18B20 is used in
34、 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 timing and voltage
35、 requirements 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 conversion
36、s or copying 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
37、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 conversions are taking place or data is being copied f&l
38、t;/p><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
39、 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 exter
40、nal power 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 temperatu
41、re conversion 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 tempera
42、tures. For applications in which such temperatures are likely, it is strongly recommended that the DS18B20 be powered by an external power</p><p> 八. 64-BIT LASERED ROM CODE </p><p> Each DS1
43、8B20 contains 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 signi
44、ficant 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
45、and associated ROM function control logic allow the </p><p> 九. MEMORY </p><p> The DS18B20’s memory is organized as shown in Figure 7. The memory consists of an SRAM scratchpad with nonvolat
46、ile EEPROM 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. A
47、ll 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 r</p><p> 十. CONFIGURATION REGISTER &
48、lt;/p><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
49、 in this 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 t
50、he configuration register are reserved for internal use by the device and cannot b</p><p> 十一. CRC GENERATION </p><p> CRC bytes are provided as part of the DS18B20’s 64-bit ROM code and in th
51、e 9thbyte 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
52、from 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>&
53、lt;p> 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
54、scratchpad 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.T
55、here is no circuitry inside the DS18B20 that prevents a command sequen</p><p> DS18B20 單線溫度傳感器</p><p><b> 一.特征:</b></p><p> ● 獨特的單線接口,只需 1 個接口引腳即可通信</p><p
56、> ● 每個設(shè)備都有一個唯一的64位串行代碼存儲在光盤片上</p><p> ● 多點能力使分布式溫度檢測應(yīng)用得以簡化</p><p><b> ● 不需要外部部件</b></p><p> ● 可以從數(shù)據(jù)線供電,電源電壓范圍為3.0V至5.5V</p><p> ● 測量范圍從-55 ° C
57、至+125 ° C(-67 ° F至257 ° F),從-10℃至+85 ° C的精度為0.5 °C</p><p> ● 溫度計分辨率是用戶可選擇的9至12位</p><p> ● 轉(zhuǎn)換12位數(shù)字的最長時間是750ms</p><p> ● 用戶可定義的 非易失性的溫度告警設(shè)置</p><
58、p> ● 告警搜索命令識別和尋址溫度在編定的極限之外的器件 (溫度告警情況)</p><p> ● 采用8引腳SO(150mil),8引腳SOP和3引腳TO - 92封裝</p><p> ● 軟件與DS1822兼容</p><p> ● 應(yīng)用范圍包括恒溫控制 工業(yè)系統(tǒng) 消費類產(chǎn)品 溫度計或任何熱敏系統(tǒng)</p><p><
59、b> 二.簡介</b></p><p> 該DS18B20的數(shù)字溫度計提供9至12位的攝氏溫度測量,并具有與非易失性用戶可編程上限和下限報警功能。信息單線接口送入 DS1820 或從 DS1820 送出,因此按照定義只需要一條數(shù)據(jù)線(和地線)與中央微處理器進(jìn)行通信。它的測溫范圍從-55 °C到 +125 ° C,其中從-10 °C至+85 °C可以精確
60、到0.5°C 。此外,DS18B20可以從數(shù)據(jù)線直接供電(“寄生電源”),從而消除了供應(yīng)需要一個外部電源。</p><p> 每個 DS18B20 的有一個唯一的64位序列碼,它允許多個DS18B20s的功能在同一</p><p> 1-巴士線。因此,用一個微處理器控制大面積分布的許多DS18B20s是非常簡單的。此特性的應(yīng)用范圍包括 HVAC、環(huán)境控制、建筑物、設(shè)備或機械內(nèi)
61、的溫度檢測以及過程監(jiān)視和控制系統(tǒng)。</p><p><b> 三.綜述</b></p><p> 64位ROM存儲設(shè)備的獨特序號。存貯器包含2個字節(jié)的溫度寄存器,它存儲來自溫度傳感器的數(shù)字輸出。此外,暫存器可以訪問的1個字節(jié)的上下限溫度告警觸發(fā)器(TH和TL)和1個字節(jié)的配置寄存器。配置寄存器允許用戶設(shè)置的溫度到數(shù)字轉(zhuǎn)換的分辨率為9,10,11或12位。TH,TL
62、和配置寄存器是非易失性的,因此掉電時依然可以保存數(shù)據(jù)。</p><p> 該DS18B20使用Dallas的單總線協(xié)議,總線之間的通信用一個控制信號就可以實現(xiàn)??刂凭€需要一個弱上拉電阻,因為所有的設(shè)備都是通過3線或開漏端口連接(在DS18B20中用DQ引腳)到總線的。在這種總線系統(tǒng)中,微處理器(主設(shè)備)和地址標(biāo)識上使用其獨有的64位代碼。因為每個設(shè)備都有一個唯一的代碼,一個總線上連接設(shè)備的數(shù)量幾乎是無限的。 單
63、總線協(xié)議,包括詳細(xì)的解釋命令和“時間槽”,此資料的單總線系統(tǒng)部分包括這些內(nèi)容。</p><p> DS18B20的另一個特點是:沒有外部電源供電仍然可以工作。當(dāng)DQ引腳為高電平時,電壓是單總線上拉電阻通過DQ引腳供應(yīng)的。高電平信號也可以充當(dāng)外部電源,當(dāng)總線是低電平時供應(yīng)給設(shè)備電壓。這種從但總線提供動力的方法被稱為“寄生電源“。作為替代電源,該DS18B20也可以使用連接到 VDD 引腳的外部電源供電。</
64、p><p> 四.運用 —— 測量溫度</p><p> 該DS18B20的核心功能是它是直接輸出數(shù)字信號的溫度傳感器。該溫度傳感器的分辨率為用戶配置至9,10,11或12位,相當(dāng)于0.5° C,0.25° C,0.125 ° C和0.0625° C的增量。其中傳感器默認(rèn)為12位。該DS18B20在低功耗空閑狀態(tài);啟動溫度測量和模數(shù)轉(zhuǎn)換,主機必須發(fā)出
65、一個轉(zhuǎn)換命令。轉(zhuǎn)換后,所產(chǎn)生的數(shù)據(jù)存儲在內(nèi)存中的2比特溫度寄存器中,DS18B20返回其空閑狀態(tài)。如果DS18B20是由外部電源供電的,主機可以發(fā)出“讀時隙”,轉(zhuǎn)換后,通過發(fā)送低電平T命令和DS18B20將響應(yīng),同時溫度轉(zhuǎn)換繼續(xù)進(jìn)行,當(dāng)轉(zhuǎn)換完成時變?yōu)楦唠娖?。如果DS18B20的是寄生電源供電的,在整個溫度轉(zhuǎn)換過程中此通知技術(shù)不能使用,因為總線必須變?yōu)楦唠娖???偩€需要寄生電源供電將在此資料的DS18B20驅(qū)動部分將詳細(xì)介紹。</p&
66、gt;<p> DS18B20的輸出溫度數(shù)據(jù)為標(biāo)準(zhǔn)攝氏度;對于華氏溫度的應(yīng)用,必須通過查表或運用轉(zhuǎn)換方法。溫度數(shù)據(jù)在溫度寄存器存儲為一個16位符號擴展位和2位的補碼。該標(biāo)志位(S)表示溫度的正負(fù)符號位:為正數(shù)時S = 0,為負(fù)數(shù)時S = 1。如果是DS18B20配置為12位分辨率,在溫度寄存器的所有位將包含有效數(shù)據(jù)。對于11位分辨率,位0是未定義的。對于10位分辨率,位1和0是未定義的。對于9位分辨率,位2,1和0是未定
67、義的。表2給出了輸出數(shù)字?jǐn)?shù)據(jù)和相應(yīng)的12位分辨率溫度讀數(shù)轉(zhuǎn)換例子。</p><p> 五.運用 - 報警信號</p><p> DS18B20溫度轉(zhuǎn)換完成后,溫度值與用戶定義的2個報警觸發(fā)值存儲在1個字節(jié)的TH和TL寄存器。符號位(S)表示溫度值的正負(fù): S = 0時為正值, S = 1為負(fù)值。TH和TL寄存器是非易失(EEPROM),因此他們將保留設(shè)備掉電時的數(shù)據(jù)。 TH和TL可通過
68、暫存器中字節(jié)2和3獲得,此內(nèi)容在本數(shù)據(jù)表內(nèi)存部分解釋。</p><p> 六.TH和TL寄存器格式</p><p> 只有溫度寄存器4中的11位用于和TL的比較中,由于TH和TL都是 8位寄存器。如果測量溫度低于或等于TL或超過TH,報警情況存在而且報警標(biāo)志將設(shè)置在DS18B20的內(nèi)部。每個溫度測量后,這個標(biāo)志位將被更新,因此,如果報警條件消失,下一個溫度轉(zhuǎn)換后,該標(biāo)志位將被關(guān)閉。主設(shè)
69、備可以通過搜索ECH命令檢查總線上所有DS18B20s報警標(biāo)志位的狀態(tài)。任何有設(shè)置報警標(biāo)志位的DS18B20s將響應(yīng)命令,所以主設(shè)備可以決定到底是哪個DS18B20s在經(jīng)歷一個報警條件。如果報警的情況存在,TH和TL設(shè)置已經(jīng)改變了,另一個溫度轉(zhuǎn)換應(yīng)該去驗證報警條件。</p><p> 七.DS18B20的驅(qū)動</p><p> 該傳感器DS18B20可以用外部電源接VDD端供電,或者它
70、可以工作在“寄生電源”模式下,這種模式允許DS18B20在沒有外部電源下工作。寄生電源在遠(yuǎn)程或者空間受限情況下感溫是非常有用的。寄生功率控制電路,其中當(dāng)總線引腳為高電平時,力部門宿舍從DS18B201通過連接單總線的DQ端“偷”電。當(dāng)總線是高電平或者總線是低電平,而一些能量存貯在CPP中來提供電源,“偷”來的電位DS18B20提供驅(qū)動。</p><p> 當(dāng)DS18B20在寄生電源模式下使用時,VDD引腳必須接
71、地。在寄生電源模式下,單總線和CPP可以提供足夠的電流給DS18B20的大部分操作,只要指定的時間和電壓的要求得到滿足(參考本數(shù)據(jù)手冊DC電氣特性和AC電氣特性章節(jié))。</p><p> 然而,當(dāng)DS18B20溫度轉(zhuǎn)換或復(fù)制暫存器的數(shù)據(jù)到EEPROM時,工作電流可高達(dá)1.5毫安。這個電流會導(dǎo)致無法接受的電壓下降,整個單總線電阻壓降減小,更多的電流可以由寄生電源供應(yīng)。為了確保DS18B20有足夠的電流供應(yīng),無論正
72、在發(fā)生溫度轉(zhuǎn)換或復(fù)制暫存器的數(shù)據(jù)到EEPROM,單總線都必須接一個強上拉電阻。這可以通過使用一個MOSFET以直接把總線電壓下降到如圖4所示。</p><p> 單總線必須在轉(zhuǎn)換T[44h]或暫存器復(fù)制[48H]命令發(fā)出后, 10秒內(nèi)(最大)轉(zhuǎn)換到強上拉狀態(tài),而且總線必須在轉(zhuǎn)換(tconv)或數(shù)據(jù)傳輸(twr = 10ms)期間通過上拉保持高電平。在單總線上拉使能時,其他活動不能發(fā)生。該DS18B20的也可以采
73、用的連接外部電源到VDD腳上的傳統(tǒng)方法。</p><p> 這種方法的優(yōu)點是不需要MOSFET的上拉, 而且單總線可以在進(jìn)行溫度轉(zhuǎn)換時間自由地進(jìn)行其他操作。在+100℃以上的高溫時不推薦使用寄生電源,因為在這些溫度下存在較高泄漏電流,DS18B20可能無法維持通信。對于像在這種高溫下的使用,強烈建議由一個DS18B20的外部電源供電。在某些情況下,總線主機可能不知道DS18B20s是外部電源還是寄生電源供電。主
74、機需要這些信息來確定是否強大的總線上拉應(yīng)在溫度轉(zhuǎn)換時使用。要獲得這些信息,主機可以在 “閱讀時段” 一個讀取電源[B4h]命令后,發(fā)出一個跳過ROM[CCh]命令。在讀時隙,寄生電源給DS18B20s供電將把總線電平拉低,外部供電時DS18B20s將會讓總線仍然保持高電平。如果總線拉低,主機知道在溫度轉(zhuǎn)換期間它必須提供單總線強上拉。</p><p> 八.64位激光ROM</p><p>
75、; 每一 DS1820 包括一個唯一的 64 位長的 ROM 編碼。開紿的 8 位是單線產(chǎn)品系列編碼:28h,接著的 48 位是唯一的系列號。最重要的8位是開始 56 位 CRC位,從56位的ROM端計算而來。CRC比特的詳細(xì)內(nèi)容將在CRC概述一章中介紹。64位ROM代碼和相關(guān)ROM功能控制邏輯使DS18B20作為使用協(xié)議的單線設(shè)備的運作,單總線系統(tǒng)的數(shù)據(jù)表部分詳細(xì)介紹了這個協(xié)議。</p><p><b&
76、gt; 九.存貯器</b></p><p> DS1820的存貯器那樣被組織 存貯器由一個高速暫存 便箋式 RAM、一個存貯高溫度和低溫度和觸發(fā)器 TH 和 TL的非易失性電可擦除 E2RAM和存儲配置寄存器組成。請注意,如果DS18B20的報警功能不使用,TH和TL寄存器可以作為通用存儲器。 DS18B20的功能命令部分詳細(xì)敘述了所有內(nèi)存的命令。暫存器的字節(jié)0和字節(jié)1分別包含LSB和MSB溫度寄
77、存器。這些字節(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é)將返回1秒。8字節(jié)暫存器是只讀的,并且包含了循環(huán)冗余校驗碼,通過暫存器的0到7字節(jié)。DS18B20使用在CRC生成一節(jié)中描述的方法生成該CRC。數(shù)據(jù)寫入字節(jié)2,3,暫存器4使用寫入暫存[4Eh]指令;數(shù)據(jù)必須傳輸?shù)紻S18B20以最低有
78、效位開始的第2字節(jié)。為了驗證數(shù)據(jù)的完整性,數(shù)據(jù)被寫入后暫存器可以讀取(使用數(shù)據(jù)讀取暫存器[與Beh]命令)。當(dāng)讀取暫存器,數(shù)據(jù)是從最低有效位的0字節(jié)開始的。要傳送的TH,TL和配置數(shù)據(jù)從暫存器到EEPROM</p><p><b> 十.配置寄存器</b></p><p> 暫存存儲器的第四字節(jié)包含配置寄存器。用戶可以使用該寄存器的R0和R1的位設(shè)置DS18B20
79、的轉(zhuǎn)換分辨率。這些位默認(rèn)是R0和R1都等于1(12位)的分辨率。請注意,兩者之間是有直接的分辨率和轉(zhuǎn)換時間的對比。第7位,并在配置寄存器0至4位是保留供內(nèi)部使用的設(shè)備,不能被覆蓋,這些位被讀出時將返回1秒。</p><p><b> 十一.CRC生成</b></p><p> CRC字節(jié)是DS18B20的64位ROM代碼的一部分,在暫存器的第9比特。CRC的代碼是
80、由前56位的ROM代碼計算出的,并處在ROM中最重要的字節(jié)。暫存器中的CRC代碼是由儲存器中的數(shù)據(jù)計算出來的,因此它變化時,在暫存器中的數(shù)據(jù)也會變化。CRCs提供總線主機數(shù)據(jù)驗證方法,當(dāng)主機從DS18B20讀取數(shù)據(jù)時。為了驗證數(shù)據(jù)已被正確讀取,總線主機必須從接收到的數(shù)據(jù)中重新計算CRC,然后比較此值無論是ROM代碼(為ROM讀)或暫存器的CRC(為暫存器讀取)。如果計算出的CRC與讀到的CRC匹配,說明已收到的數(shù)據(jù)準(zhǔn)確無誤。 CRC的值
81、比較,是否繼續(xù)運作完全由總線主機決定。如果DS18B20的CR(ROM或暫存器)與由總線主機產(chǎn)生的值不匹配,DS18B20中沒有任何電路阻止命令序列的進(jìn)程。由總線主機產(chǎn)生的價值電路。CRC的同等多項式函數(shù)(ROM或暫存器)是:</p><p> CRC = X8+ X5 + X4+ 1</p><p> 總線主機可以重新計算CRC,然后使用多項式發(fā)生器與從DS18B20得到用的CRC值
82、進(jìn)行比較。該電路由一個移位寄存器和XOR門組成,移位寄存器初始化為0。從暫存器最低有效位或0字節(jié)的最低有效位的開始,每次一比特應(yīng)該移入移位寄存器。從ROM或從暫存器中最重要的第7字節(jié)轉(zhuǎn)移到第56比特后,多項式發(fā)生器將包含重新計算的CRC校驗碼。接下來,8位ROM代碼或暫存器從DS18B20的CRC必須轉(zhuǎn)移到電路。此時,如果重新計算的CRC是正確的,移位寄存器將包含所有0。對達(dá)拉斯的單總線循環(huán)冗余校驗的更多信息在應(yīng)用筆記27:理解和使用觸
溫馨提示
- 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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- ds18b20 單線溫度傳感器外文翻譯
- ds18b20 單線溫度傳感器外文翻譯
- 溫度傳感器外文翻譯
- 集成溫度傳感器外文翻譯
- 數(shù)字溫度傳感器外文翻譯6
- 分布式溫度傳感器外文翻譯
- 分布式溫度傳感器外文翻譯
- ds18b20單線數(shù)字溫度傳感器
- 傳感器外文翻譯
- e型快速響應(yīng)熱溫度傳感器【外文翻譯】
- 傳感器技術(shù)外文翻譯
- 傳感器設(shè)計外文翻譯
- 光傳感器和溫度傳感器
- 傳感器設(shè)計外文翻譯
- 傳感器外文翻譯---傳感器的基礎(chǔ)知識
- 外文翻譯--- - 傳感器和傳感器激勵和測量技術(shù)
- 傳感器設(shè)計外文翻譯.pdf
- 傳感器設(shè)計外文翻譯.pdf
- fbar溫度傳感器
- 外文翻譯--光纖傳感器概述
評論
0/150
提交評論