【正文】
司單線循環(huán)冗余校驗的信息可參見標(biāo)題為“理解和使用Dallas 半導(dǎo)體公司接觸式存貯器產(chǎn)品”的應(yīng)用注釋移。移入CRC的8 位應(yīng)該使移位寄存器返回至全零。這一過程確保了更改存貯器的時候保持?jǐn)?shù)據(jù)的完整性。還有第九個字節(jié)它可用Read Scratchpad(讀暫存存貯器)命令讀出,該字節(jié)包含一個循環(huán)冗余校驗(CRC)字節(jié),它是前面所有8個字節(jié)的CRC值,此CRC值以(CRC產(chǎn)生)一節(jié)中所述的方式產(chǎn)生。如果線為高電平,寫1就發(fā)生。 Time Slots讀時隙 當(dāng)從DS1820 讀數(shù)據(jù)時,主機產(chǎn)生讀時間片段。所有讀時間片的最短持續(xù)期限為60us,各個讀時間片之間必須有最短為1us的恢復(fù)時間。C, since it may not be able to sustain munications given the higher leakage currents the DS18B20 exhibits at these temperatures. For applications in which such temperatures are likely, it is strongly remended that VDD be applied to the DS18B20. For situations where the bus master does not know whether the DS18B20s on the bus are parasite powered or supplied with external VDD, a provision is made in the DS18B20 to signal the power supply scheme used. The bus master can determine if any DS18B20 are on the bus which require the strong pull up by sending a Skip ROM protocol, then issuing the read power supply mand. After this mand is issued, the master then issues read time slots. The DS18B20 will send back “0” on the 1Wire bus if it is parasite powered。 output data from the DS18B20 is valid for 15 us after the falling edge of the read time slot. The host therefore must stop driving the DQ pin low in order to read its state 15 us from the start of the read slot (see Figure 12). By the end of the read time slot, the DQ pin will pull back high via the external pull up resistor. All read time slots must be a minimum of 60 us in duration with a minimum of a 1us recovery time between individual read slots.9。C.The scratchpad is organized as eight bytes of memory. The first 2 bytes contain the LSB and the MSB of the measured temperature information, respectively. The third and fourth bytes are volatile copies of TH and TL and are refreshed with every poweron reset. The fifth byte is a volatile copy of the configuration register and is refreshed with every poweron reset. The configuration register will be explained in more detail later in this section of the datasheet. The sixth, seventh, and eighth bytes are used for internal putations, and thus will not read out any predictable pattern. It is imperative that one writes TH, TL, and config in succession。通過使TINRT和TRC盡可能小且把主機采樣時間定在15us期間的末尾,系統(tǒng)時序關(guān)系就有最大的余地。因此,為了讀出從讀時間片開始算起15us的狀態(tài)主機必須停止把I/O引腳驅(qū)動至低電平。對于主機產(chǎn)生寫1時間片的情況,數(shù)據(jù)線必須先被拉至邏輯低電平,然后就被釋放,使數(shù)據(jù)線在寫時間片開始之后的15 us之內(nèi)拉至高電平。有兩種類型的寫時間片:寫1時間片和寫0時間片,所有時間片必須有最短為60 us的持續(xù)期,在各寫周期之間必須有最短為1us的恢復(fù)時間。接著的兩個字節(jié)沒有使用,但是在讀回時,它們呈現(xiàn)為邏輯全1。暫存存貯器有助于在單線通信時確保數(shù)據(jù)的完整性,數(shù)據(jù)首先寫入暫存存貯器,在那里它可以被讀回。當(dāng)產(chǎn)品系列編碼的8 位移入以后,接著移入序列號。CRC 值的比較和是否繼續(xù)操作都由總線主機來決定,當(dāng)存貯在DS1820 內(nèi)或由DS1820 計算得到的CRC 值與總線主機產(chǎn)生的值不相符合時,在DS1820 內(nèi)沒有電路來阻止命令序列的繼續(xù)執(zhí)行。在成功地執(zhí)行了ROM操作序列之后,DS1820 特定的功能便可訪問,然后總線上主機可提供六個存貯器和控制功能命令之一。每次溫度測量將更新告警標(biāo)志,只要告警標(biāo)志置位,DS1820 將對告警搜索命令做出響應(yīng)。如果是寄生供電,DS1820 將在單線總線上送回(0);如果由VDD 引腳供電,它將送回(1)。注意只要外部電源處于工作狀態(tài),GND(地)引腳不可懸空。There are two ways to assure that the DS18B20 has sufficient supply current during its active conversion 。In order for the DS18B20 to be able to perform accurate temperature conversions, sufficient power must be provided over the DQ line when a temperature conversion is taking place.。每一溫度告警觸發(fā)器TH 和TL 構(gòu)成一個字節(jié)的EEPROM, 如果不對DS1820 施加告警搜索命令,這些寄存器可用作通用用戶存儲器,使用存儲器操作命令可以寫TH 和TL。在成功地執(zhí)行了ROM 操作序列之后,可使用存貯器和控制操作,然后主機可以提供六種存貯器和控制操作命令之一。在單線接口情況下,在ROM 操作未定建立之前不能使用存貯器和控制操作。 1OVERVIEW綜述The block diagram of Figure 1 shows the major ponents of the :1)64位激光ROM,2)溫度靈敏元件,3)非易失性溫度報警觸發(fā)器TH和TL,4)配置寄存器。 Power for reading, writing, and performing temperature conversions can be derived from the data line itself with no need for an external power ,讀溫度轉(zhuǎn)換可以由數(shù)據(jù)線本身來提供電源而不需要一個外部電源。信息經(jīng)過單線接口送入DSl820或從DSl820送出因此從主機CPU到DSl820僅需一條線(和地線)。此功能可應(yīng)用的地方包括空調(diào)環(huán)境控制,建筑物內(nèi)的溫度感應(yīng),設(shè)備或機器的過程監(jiān)控和控制。與DS1820 的通信經(jīng)過一個單線接口。如果在單線上有許多器件,那么可以挑選出一個特定的器件,并給總線上的主機指示存在多少器件及其類型。通過發(fā)出讀暫存存儲器內(nèi)容的存儲器操作命令可以讀出此結(jié)果。只要符合指定的定時和電壓要求,I/O將提供足夠的功率,寄生電源的優(yōu)點是雙重的:1)利用此引腳,遠(yuǎn)程溫度檢測無需本地電源,2)缺少正常電源條件下也可以讀ROM。如果幾個SD1820 在同一條I/O 線上而且企圖同時變換,那么這一問題將變得特別尖銳。此外,在單線總線上可以放置任何數(shù)目的DS1820 ,而且如果它們都使用外部電源,那么通過發(fā)出跳過(Skip)ROM 命令和接著發(fā)出變換(Convert)T 命令,可以同時完成溫度變換。在此命令發(fā)出后,主機接著發(fā)出讀時