【正文】
same DQ and attempting to convert simultaneously.There are two ways to assure that the DS18B20 has sufficient supply current during its active conversion cycle. The first is to provide a strong pull up on the DQ line whenever temperature conversions or copies to the E2 memory are taking place. This may be acplished by using a MOSFET to pull the DQ line directly to the power supply as shown in Figure 2. The DQ line must be switched over to the strong pull up within 10 us maximum after issuing any protocol that involves copying to the E2 memory or initiates temperature conversions. When using the parasite power mode, the VDD pin must be tied to ground. Another method of supplying current to the DS18B20 is through the use of an external power supply tied to the VDD pin, as shown in Figure 3. The advantage to this is that the strong pull up is not required on the DQ line, and the bus master need not be tied up holding that line high during temperature conversions. This allows other data traffic on the 1Wire bus during the conversion time. In addition, any number of DS18B20s may be placed on the 1Wire bus, and if they all use external power, they may all simultaneously perform temperature conversions by issuing the Skip ROM mand and then issuing the Convert T mand. Note that as long as the external power supply is active, the GND pin may not be floating. The use of parasite power is not remended above 100176。對(duì)于主機(jī)產(chǎn)生寫0時(shí)間片的情況,數(shù)據(jù)線必須被拉至邏輯低電平且至少保持低電平60 us。第七字節(jié)和第八個(gè)字節(jié)是計(jì)數(shù)寄存器,它們可用于獲得較高的溫度分辨率。6 MEMO存儲(chǔ)器溫度傳感器DS1820 的存貯器由一個(gè)高速暫存便箋式RAM和一個(gè)非易失性電可擦除E2RAM組成,后者存貯高溫度和低溫度和觸發(fā)器TH和TL。CRC 的等效多項(xiàng)式函數(shù)為:CRC = X 8 + X 5 + X 4 + 1The DS18B20 also generates an 8bit CRC value using the same polynomial function shown above and provides this value to the bus master to validate the transfer of data 也利用與上述相同的多項(xiàng)式函數(shù)產(chǎn)生一個(gè)8 位CRC值并把此值提供給總線的主機(jī)以確認(rèn)數(shù)據(jù)字節(jié)的傳送,在使用CRC來確認(rèn)數(shù)據(jù)傳送的每一種情況中,總線主機(jī)必須使用上面給出的多項(xiàng)式函數(shù)計(jì)算CRC的值并把計(jì)算所得的值,或者與存貯在DS1820的64位ROM部分中的8位CRC值(ROM讀數(shù)),或者與DS1820 中計(jì)算得到的8位CRC值(在讀暫存存貯器中時(shí)它作,為第九個(gè)字節(jié)被讀出),進(jìn)行比較。TH或TL的最高有效位直接對(duì)應(yīng)于16位溫度寄存器的符號(hào)位,如果溫度測(cè)量的結(jié)果高于TH或低于TL,那么器件內(nèi)告警標(biāo)志將置位。此外,在單線總線上可以放置任何數(shù)目的DS1820 ,而且如果它們都使用外部電源,那么通過發(fā)出跳過(Skip)ROM 命令和接著發(fā)出變換(Convert)T 命令,可以同時(shí)完成溫度變換。只要符合指定的定時(shí)和電壓要求,I/O將提供足夠的功率,寄生電源的優(yōu)點(diǎn)是雙重的:1)利用此引腳,遠(yuǎn)程溫度檢測(cè)無需本地電源,2)缺少正常電源條件下也可以讀ROM。如果在單線上有許多器件,那么可以挑選出一個(gè)特定的器件,并給總線上的主機(jī)指示存在多少器件及其類型。此功能可應(yīng)用的地方包括空調(diào)環(huán)境控制,建筑物內(nèi)的溫度感應(yīng),設(shè)備或機(jī)器的過程監(jiān)控和控制。 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ù)線本身來提供電源而不需要一個(gè)外部電源。在單線接口情況下,在ROM 操作未定建立之前不能使用存貯器和控制操作。每一溫度告警觸發(fā)器TH 和TL 構(gòu)成一個(gè)字節(jié)的EEPROM, 如果不對(duì)DS1820 施加告警搜索命令,這些寄存器可用作通用用戶存儲(chǔ)器,使用存儲(chǔ)器操作命令可以寫TH 和TL。There are two ways to assure that the DS18B20 has sufficient supply current during its active conversion 。如果是寄生供電,DS1820 將在單線總線上送回(0);如果由VDD 引腳供電,它將送回(1)。在成功地執(zhí)行了ROM操作序列之后,DS1820 特定的功能便可訪問,然后總線上主機(jī)可提供六個(gè)存貯器和控制功能命令之一。當(dāng)產(chǎn)品系列編碼的8 位移入以后,接著移入序列號(hào)。接著的兩個(gè)字節(jié)沒有使用,但是在讀回時(shí),它們呈現(xiàn)為邏輯全1。對(duì)于主機(jī)產(chǎn)生寫1時(shí)間片的情況,數(shù)據(jù)線必須先被拉至邏輯低電平,然后就被釋放,使數(shù)據(jù)線在寫時(shí)間片開始之后的15 us之內(nèi)拉至高電平。通過使TINRT和TRC盡可能小且把主機(jī)采樣時(shí)間定在15us期間的末尾,系統(tǒng)時(shí)序關(guān)系就有最大的余地。 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。所有讀時(shí)間片的最短持續(xù)期限為60us,各個(gè)讀時(shí)間片之間必須有最短為1us的恢復(fù)時(shí)間。如果線為高電平,寫1就發(fā)生。這一過程確保了更改存貯器的時(shí)候保持?jǐn)?shù)據(jù)的完整性??偩€CRC 可以使用一個(gè)移位寄存器和“異或”(XOR)門組成的多項(xiàng)式產(chǎn)生器來產(chǎn)生,其它有關(guān)Dallas 公司單線循環(huán)冗余校驗(yàn)的信息可參見標(biāo)題為“理解和使用Dallas 半導(dǎo)體公司接觸式存貯器產(chǎn)品”的應(yīng)用注釋移。4 64BIT LASER4 44444464位激光ROMEach DS18B20 contains a unique ROM code that is 64bits ,開始的8位是單線產(chǎn)品系列編碼(DS1820編碼是10h),接著的48位是唯一的系列號(hào),最后的8位是開始56位CRC,64位ROM和ROM 操作控制部分允許DS1820 作為一個(gè)單線器件工作并遵循“單線總線系統(tǒng)”的單線協(xié)議,直到ROM 操作協(xié)議被滿足,DS1820 控制部分的功能是不可訪問的??偩€上主機(jī)通過發(fā)出跳過(Skip)ROM 的操作約定,然后發(fā)出讀電源命令,可以決定是否有需要在DS1820 的總線上放置上拉電阻。因?yàn)镈S1820的工作電流高