【溫馨提示】壓縮包內(nèi)含CAD圖有下方大圖片預(yù)覽,下拉即可直觀呈現(xiàn)眼前查看、盡收眼底縱觀。打包內(nèi)容里dwg后綴的文件為CAD圖,可編輯,無水印,高清圖,壓縮包內(nèi)文檔可直接點開預(yù)覽,需要原稿請自助充值下載,所見才能所得,請見壓縮包內(nèi)的文件及下方預(yù)覽,請細(xì)心查看有疑問可以咨詢QQ:11970985或197216396
外文資料翻譯
英文資料
FEATURES
_ Unique 1-Wire interface requires only oneport pin for communication
_ Multidrop capability simplifies distributedtemperature sensing applications
_ Requires no external components
_ Can be powered from data line. Power supplyrange is 3.0V to 5.5V
_ Zero standby power required
_ Measures temperatures from -55°C to+125°C. Fahrenheit equivalent is -67°F to
+257°F
_ ±0.5°C accuracy from -10°C to +85°C
_ Thermometer resolution is programmablefrom 9 to 12 bits
_ Converts 12-bit temperature to digital word in750 ms (max.)
_ User-definable, nonvolatile temperature alarmsettings
_ Alarm search command identifies andaddresses devices whose temperature is
outside of programmed limits (temperaturealarm condition)
_ Applications include thermostatic controls,industrial systems, consumer products,
thermometers, or any thermally sensitivesystem
DESCRIPTION
The DS18B20 Digital Thermometer provides 9 to 12-bit (configurable) temperature readings whichindicate the temperature of the device。
Information is sent to/from the DS18B20 over a 1-Wire interface, so that only one wire (and ground)needs to be connected from a central microprocessor to a DS18B20. Power for reading, writing, andperforming temperature conversions can be derived from the data line itself with no need for an external power source.
Because each DS18B20 contains a unique silicon serial number, multiple DS18B20s can exist on the same 1-Wire bus. This allows for placing temperature sensors in many different places. Applications where this feature is useful include HVAC environmental controls, sensing temperatures inside buildings, equipment or machinery, and process monitoring and control.
OVERVIEW
The block diagram of Figure 1 shows the major components of the DS18B20. The DS18B20 has four main data components: 1) 64-bit lasered ROM, 2) temperature sensor, 3) nonvolatile temperature alarmtriggers TH and TL, and 4) a configuration register. The device derives its power from the 1-Wire communication line by storing energy on an internal capacitor during periods of time when the signal line is high and continues to operate off this power source during the low times of the 1-Wire line until it returns high to replenish the parasite (capacitor) supply. As an alternative, the DS18B20 may also be powered from an external 3 volt - 5.5 volt supply.
Communication to the DS18B20 is via a 1-Wire port. With the 1-Wire port, the memory and control functions will not be available before the ROM function protocol has been established. The master must first provide one of five ROM function commands: 1) Read ROM, 2) Match ROM, 3) Search ROM, 4)Skip ROM, or 5) Alarm Search. These commands operate on the 64-bit lasered ROM portion of each
device and can single out a specific device if many are present on the 1-Wire line as well as indicate to the bus master how many and what types of devices are present. After a ROM function sequence has been successfully executed, the memory and control functions are accessible and the master may then provide any one of the six memory and control function commands.
One control function command instructs the DS18B20 to perform a temperature measurement. The result of this measurement will be placed in the DS18B20’s scratch-pad memory, and may be read by issuing a memory function command which reads the contents of the scratchpad memory. The temperature alarm triggers TH and TL consist of 1 byte EEPROM each. If the alarm search command is not applied to the DS18B20, these registers may be used as general purpose user memory. The scratchpad also contains a configuration byte to set the desired resolution of the temperature to digital conversion. Writing TH, TL,and the configuration byte is done using a memory function command. Read access to these registers is through the scratchpad. All data is read and written least significant bit first.
PARASITE POWER
The block diagram (Figure 1) shows the parasite-powered circuitry. This circuitry “steals” power whenever the DQ or VDD pins are high. DQ will provide sufficient power as long as the specified timing and voltage requirements are met (see the section titled “1-Wire Bus System”). The advantages of parasite power are twofold: 1) by parasiting off this pin, no local power source is needed for remote sensing of temperature, and 2) the ROM may be read in absence of normal power.
In order for the DS18B20 to be able to perform accurate temperature conversions, sufficient power mustbe provided over the DQ line when a temperature conversion is taking place. Since the operating current of the DS18B20 is up to 1.5 mA, the DQ line will not have sufficient drive due to the 5k pullup resistor.This problem is particularly acute if several DS18B20s are on the same DQ and attempting to convert simul -taneously.
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 pullup on the DQ line whenever temperature conversions or copies to the E2 memory are taking place. This may be accomplished 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 pullup
within 10 ìs 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 pullup 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 1-Wire bus during the conversion time. In addition, any number of
DS18B20s may be placed on the 1-Wire bus, and if they all use external power, they may allsimultaneously perform temperature conversions by issuing the Skip ROM command and then issuing the Convert T command. 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 recommended above 100°C, since it may not be able to sustain communications given the higher leakage currents the DS18B20 exhibits at these temperatures. For applications in which such temperatures are likely, it is strongly recommended 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 DS18B20s are on the bus which require the strong pullup by sending a Skip ROM protocol, then issuing the read power supply command. After this command is issued, the master then issues read time slots. The DS18B20 will send back “0” on the
1-Wire bus if it is parasite powered; it will send back a “1” if it is powered from the VDD pin. If the master receives a “0,” it knows that it must supply the strong pullup on the DQ line during temperature conversions. See “Memory Command Functions” section for more detail on this command protocol.
OPERATION - MEASURING TEMPERATURE
The core functionality of the DS18B20 is its direct-to-digital temperature sensor. The resolution of the DS18B20 is configurable (9, 10, 11, or 12 bits), with 12-bit readings the factory default state. This equates to a temperature resolution of 0.5°C, 0.25°C, 0.125°C, or 0.0625°C. Following the issuance of the Convert T [44h] command, a temperature conversion is performed and the thermal data is stored in the scratchpad memory in a 16-bit, sign-extended two’s complement format. The temperature
information can be retrieved over the 1-Wire interface by issuing a Read Scratchpad [BEh] commandonce the conversion has been performed. The data is transferred over the 1-Wire bus, LSB first. The MSB of the temperature register contains the “sign” (S) bit, denoting whether the temperature is positive or negative.
Table 2 describes the exact relationship of output data to measured temperature. The table assumes 12-bit resolution. If the DS18B20 is configured for a lower resolution, insignificant bits will contain zeros. For Fahrenheit usage, a lookup table or conversion routine must be used.
OPERATION - ALARM SIGNALING
After the DS18B20 has performed a temperature conversion, the temperature value is compared to the trigger values stored in TH and TL. Since these registers are 8-bit only, bits 9-12 are ignored for comparison. The most significant bit of TH or TL directly corresponds to the sign bit of the 16-bit temperature register. If the result of a temperature measurement is higher than TH or lower than TL, an alarm flag inside the device is set. This flag is updated with every temperature measurement. As long as
the alarm flag is set, the DS18B20 will respond to the alarm search command. This allows many DS18B20s to be connected in parallel doing simultaneous temperature measurements. If somewhere the temperature exceeds the limits, the alarming device(s) can be identified and read immediately without having to read non-alarming devices.
64-BIT LASERED ROM
Each DS18B20 contains a unique ROM code that is 64-bits long. The first 8 bits are a 1-Wire family code (DS18B20 code is 28h). The next 48 bits are a unique serial number. The last 8 bits are a CRC of the first 56 bits. (See Figure 4.) The 64-bit ROM and ROM Function Control section allow the DS18B20 to operate as a 1-Wire device and follow the 1-Wire protocol detailed in the section “1-Wire Bus System.” The functions required to control sections of the DS18B20 are not accessible until the ROM function protocol has been satisfied. This protocol is described in the ROM function protocol flowchart (Figure 5). The 1-Wire bus master must first provide one of five ROM function commands: 1) Read ROM, 2) Match ROM, 3) Search ROM, 4) Skip ROM, or 5) Alarm Search. After a ROM function sequence has been successfully executed, the functions specific to the DS18B20 are accessible and the
bus master may then provide one of the six memory and control function commands.
CRC GENERATION
The DS18B20 has an 8-bit CRC stored in the most significant byte of the 64-bit ROM. The bus mastercan compute a CRC value from the first 56-bits of the 64-bit ROM and compare it to the value stored within the DS18B20 to determine if the ROM data has been received error-free by the bus master. The equivalent polynomial function of this CRC is:
CRC = X8 + X5 + X4 + 1
The DS18B20 also generates an 8-bit CRC value using the same polynomial function shown above and provides this value to the bus master to validate the transfer of data bytes. In each case where a CRC is used for data transfer validation, the bus master must calculate a CRC value using the polynomial function given above and compare the calculated value to either the 8-bit CRC value stored in the 64-bit ROM portion of the DS18B20 (for ROM reads) or the 8-bit CRC value computed within the DS18B20
(which is read as a ninth byte when the scratchpad is read). The comparison of CRC values and decision to continue with an operation are determined entirely by the bus master. There is no circuitry inside the DS18B20 that prevents a command sequence from proceeding if the CRC stored in or calculated by the DS18B20 does not match the value generated by the bus master.
The 1-Wire CRC can be generated using a polynomial generator consisting of a shift register and XOR gates as shown in Figure 6. Additional information about the Dallas 1-Wire Cyclic Redundancy Check is available in Application Note 27 entitled “Understanding and Using Cyclic Redundancy Checks with Dallas Semiconductor Touch Memory Products.”
The shift register bits are initialized to 0. Then starting with the least significant bit of the family code,1 bit at a time is shifted in. After the 8th bit of the family code has been entered, then the serial number is entered. After the 48th bit of the serial number has been entered, the shift register contains the CRC value. Shifting in the 8 bits of CRC should return the shift register to all 0s.
MEMORY
The DS18B20’s memory is organized as shown in Figure 8. The memory consists of a scratchpad RAM and a nonvolatile, electrically erasable (E2) RAM, which stores the high and low temperature triggers TH and TL, and the configuration register. The scratchpad helps insure data integrity when communicating over the 1-Wire bus. Data is first written to the scratchpad using the Write Scratchpad [4Eh] command. It can then be verified by using the Read Scratchpad [BEh] command. After the data has been verified, a Copy Scratchpad [48h] command will transfer the data to the nonvolatile (E2) RAM. This process insures data integrity when modifying memory. The DS18B20 EEPROM is rated for a minimum of 50,000 writes and 10 years data retention at T = +55°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 power-on reset. The fifth byte is a volatile copy of the configuration register and is refreshed with every power-on 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 computations, and thus will not read out any predictable pattern.
It is imperative that one writes TH, TL, and config in succession; i.e. a write is not valid if one writesonly to TH and TL, for example, and then issues a reset. If any of these bytes must be written, all three must be written before a reset is issued.
There is a ninth byte which may be read with a Read Scratchpad [BEh] command. This byte contains a cyclic redundancy check (CRC) byte which is the CRC over all of the eight previous bytes. This CRC is implemented in the fashion described in the section titled “CRC Generation”.
1-WIRE BUS SYSTEM
The 1-Wire bus is a system which has a single bus master and one or more slaves. The DS18B20 behaves as a slave. The discussion of this bus system is broken down into three topics: hardware configuration, transaction sequence, and 1-Wire signaling (signal types and timing).
ABSOLUTE MAXIMUM RATINGS*
Voltage on Any Pin Relative to Ground -0.5V to +6.0V
Operating Temperature -55°C to +125°C
Storage Temperature -55°C to +125°C
Soldering Temperature See J-STD-020A specification
* This is a stress rating only and functional operation of the device at these or any other conditions above those indicated in the operation sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods of time may affect reliability.
NOTES:
1. All voltages are referenced to ground.
2. Logic one voltages are specified at a source current of 1 mA.
3. Logic zero voltages are specified at a sink current of 4 mA.
4. Active current refers to either temperature conversion or writing to the E2 memory. Writing to E2 memory consumes approximately 200 ìA for up to 10 ms.
5. Input load is to ground.
6. Standby current specified up to 70°C. Standby current typically is 3 ìA at 125°C.
7. To always guarantee a presence pulse under low voltage parasite power conditions, VILMAX may have to be reduced to as much as 0.5V.
.
中文翻譯
1.1 一般說明
DS1820數(shù)字溫度計提供9位溫度讀數(shù),指示器件的溫度。
信息經(jīng)過單線接口送入DS1820或從DS1820送出,因此從中央處理器器到DS1820僅需連接一條線(和地)。讀,寫和完成溫度變換所需的電源可以由數(shù)據(jù)線本身提供,而不需要外部電源。
因為每一個DS1820有唯一的系列號(silicon serial number),因此多個DS1820可以存在于同一條單線總線上。這允許在許多不同的地方放置溫度靈敏器件。此特性的應(yīng)用范圍包括HVAC環(huán)境控制,建筑物、設(shè)備或機(jī)械內(nèi)的溫度檢測,以及過程監(jiān)視和控制中的溫度檢測。
1.2特性
·獨特的單線接口,只需1一個接口引腳即可通信
·多點( multidrop)能力使分布式溫度檢測應(yīng)用得以簡化
·不需要外部元件
·可用數(shù)據(jù)線供電
·不需各份電源
·測量范圍從-55℃至+125℃,增量值為0.5℃。等效的華氏溫度范圍是-67。F至257。F,增量值為0.9。F
·以9位數(shù)字值方式讀出溫度
·在1秒(典型值)內(nèi)把溫度變換為數(shù)字
·用戶可定義的,非易失性的溫度告警設(shè)置
·告警搜索命令識別和尋址溫度在編定的極限之外的器件(溫度告警情況)
·應(yīng)用范圍包括恒溫控制,工業(yè)系統(tǒng),消費類產(chǎn)品,溫度計或任何熱敏系統(tǒng)
2.1綜述
DS1820有三令豐要的數(shù)據(jù)部件:1)64位激光(lasered) ROM;2)溫度靈敏元件;3)非易失性溫度告警觸發(fā)器TH和TL。器件從單線的通信線取得其電源,在信號線為高電平的時間周期內(nèi),把能量貯存在內(nèi)部的電容器中,在單信號線為低電平的時間期內(nèi)斷開此電源,直到信號線變?yōu)楦唠娖街匦陆由霞纳娙荩╇娫礊橹?,作為另一種可供選擇的方法,DS1820也可用外部5V電源供電。
與DS1820的通信經(jīng)過一個單線接口。在單線接口情況下,在ROM操作未定建立之前不能使用存儲器和控制操作。主機(jī)必須首先提供五種ROM操作命令之一:1)Read ROM(讀ROM);2)Match ROM(符合ROM);3)Search ROM(搜索ROM);4)Skip ROM(跳過ROM);5)Alarm Search(告警搜索)。這些命令對每一器件的64位激光ROM部分進(jìn)行操作。如果在單線上有許多器件,那么可以挑選出一個特定的器件,并給總線上的主機(jī)指示存在多少器件及其類型。在成功地執(zhí)行了ROM操作序列之后,可使用存貯器和控制操作,然后主機(jī)可以提供六種存貯器和控制操作命令之一。
一個控制操作命令指示DS1820完成溫度測量。該測量的結(jié)果將放入DS1820的高速暫存(便箋式)存貯器(Scratchpadmemory),通過發(fā)出讀暫存存儲器內(nèi)容的存儲器操作命令可以讀出此結(jié)果。每一溫度告警觸發(fā)器TH和孔構(gòu)成一個字節(jié)的EEPROM。如果不對DS1820施加告警搜索命令,這些寄存器可用作通用用戶存儲器。使用存儲器操作命令可以寫TH和TL。對這些寄存器的讀訪問通過便箋存儲器。所有數(shù)據(jù)均以最低有效位在前的方式被讀寫。
2.2 寄生電源(parasite power)
當(dāng)I/O或VDD引腳為高電平時,這個電路便“取”得電源。只要符合指定的定時和電壓要求,I/O將提供足夠的功率(標(biāo)題為“單總線系統(tǒng)”一節(jié))。寄生電源的優(yōu)點是雙重的:1)利用此引腳,遠(yuǎn)程溫度檢測無需本地電源,2)缺少正常電源條件下也可以讀ROM。
為了使DS1820能完成準(zhǔn)確的溫度變換,當(dāng)溫度便換發(fā)生時,I/O線必須提供足夠的功率。因為DS1820的工作電流高達(dá)1mA.5k 歐的上拉電阻將使I/O線沒有足夠的驅(qū)動能力。如果幾個DS1820在同一條I/O線上而且企圖同時變換,那么這一問題將變得特別尖銳。
有兩種方法確保DS1820在其有效變換期內(nèi)得到足夠的電源電流。第一種方法是發(fā)生溫度變換時,在I/O線上提供一強(qiáng)的上拉。當(dāng)使用寄生電源方式時VDD引腳必須連接到地。
向DS1820供電的另外一種方法是通過使用連接到VDD引腳的外部電源,這種方法的優(yōu)點是在I/O線上不要求強(qiáng)的上拉??偩€上主機(jī)不需向上連接便在溫度變換期間使線保持高電平。這就允許在變換時問內(nèi)其它數(shù)據(jù)在單線上傳送。此外,在單線總線上可以放置任何數(shù)目的DS1820,而且如果它們都使用外部電源,那么通過發(fā)出跳過(Skip) ROM命令和接著發(fā)出變換(Convert)T命令,可以同時完成溫度變換。注意只要外部申源々b千工作狀態(tài),GND(地)引腳不可懸空。
在總線上主機(jī)不知道總線上DS1820使寄生電源供電還是外部VDD供電的情況下,在DS1820內(nèi)采取了措施來通知采用的供電方案。總線上主機(jī)通過發(fā)出跳過(Skip) ROM的操作約定,然后發(fā)出讀電源命令,可以決定是否有需要強(qiáng)上拉的DS1820在總線上。在此命令發(fā)出后,主機(jī)接著發(fā)出讀時間片。如果是寄生供電,DS1820將在單線總線上送回“0”;如果由VDD腳供電,它將送回“1”。如果主機(jī)接收到一個“0”,它知道它必須在溫度變換期間在I/O線上供一個強(qiáng)的上拉。有關(guān)此命令約定的詳細(xì)說明,見“存貯器命令功能”一節(jié)。
2.3運用-測量溫度
DS1820通過門開通期間內(nèi)低溫度系數(shù)振蕩器經(jīng)歷的時鐘周期個數(shù)計數(shù)來測量溫度,而門開通期由高溫度系數(shù)振蕩器決定。計數(shù)器予置對應(yīng)于-55℃的基數(shù),如果在門開通期結(jié)束前計數(shù)器達(dá)到零,那么溫度寄存器也被予置到-55℃的數(shù)值增量,指示溫度高于-55℃。
同時,計數(shù)器用斜率累加器電路所決定的值進(jìn)行予置。為了對遵循拋物線規(guī)律的振蕩器溫度特性進(jìn)行補(bǔ)償,這種電路是必需的。時鐘再次使計數(shù)器計值至它達(dá)到零。如果門開通時間仍未結(jié)束,那么此過程再次重復(fù)。
斜率累加器用于補(bǔ)償振蕩器溫度特性的非線性,以產(chǎn)生高分辯率的溫度測量。通過改變溫度每升高一度,計數(shù)器必須經(jīng)歷的計數(shù)個數(shù)來實行補(bǔ)償。因此,為了獲得所需的分辯率,計數(shù)器的數(shù)值以及在給定溫度處每一攝氏度的計數(shù)個數(shù)(斜率累加器的值)二者都必須知道。
此計算在DS1820內(nèi)部完成以提供0.5℃的分辯率。溫度讀數(shù)以16位、符號擴(kuò)展的二進(jìn)制補(bǔ)碼讀數(shù)形式提供。表1說明輸出數(shù)據(jù)對測量溫度的關(guān)系。數(shù)據(jù)在單線接口上串行發(fā)送。DS1820可以以0.5℃的增量值,在0.5℃至+125℃的范圍內(nèi)測量溫度。對于應(yīng)用華氏溫度的場合,必須使用查找表或變換系數(shù)。
2.4運用一告警信號
在DS1820完成溫度變換之后,溫度值與貯存在TH和TL內(nèi)的觸發(fā)值相比較。因為這些寄存器僅僅是8位,所以0.5度位在比較時被忽略。TH或TL的最高有較位直接對應(yīng)于16位溫度寄存器的符號位。如果溫度測量的結(jié)果高于TH或低于TL,那么器件內(nèi)告警標(biāo)志將置位。每次溫度測量更新此標(biāo)志。只要告警標(biāo)志置位,DS1820將對告警搜索命令作出響應(yīng)。這允許并聯(lián)連接許多DS1820,同時進(jìn)行溫度測量。如果某處溫度超過極限,那么可以識別出正在告警的器件并立即將其讀出而不必讀出非告警的器件。
2.5 64位激光ROM
每一 DS1820包括一個唯一的64位長的ROM編碼。開紿的8位是單線產(chǎn)品系列編碼(DS1820編碼是l0h)。接著的48位是唯一的系列號。最后的8位是開始56位CRC。64位ROM和ROM操作控制部分允許DS1820 控制部分的功能是不可訪問的。此協(xié)議在ROM操作協(xié)議流程圖中敘述。單線總線主機(jī)必須首先操作五種ROM操作命令之1)Lead ROM(讀ROM),2)Match ROM(匹配ROM),3)Search ROM(拽索ROM),4)Skip ROM(跳過ROM
Llarm Search(告警搜索)。在成功地執(zhí)行了ROM操作序列之后,,DS1820特定的功能便可訪問,然后總線上主機(jī)可提供六個存貯器和控制功能命令之一。
2.6 CRC產(chǎn)生
DS1820有一存貯在64位ROM的最高有效字節(jié)內(nèi)的8位CRC。總線上的主機(jī)可以根據(jù)64位ROM的前56位計算機(jī)CRC的值并把它與存貯在DS1820內(nèi)的值進(jìn)行比較以決定ROM的數(shù)據(jù)是否己被主機(jī)正確地接收。CRC的等效多項式函數(shù)為:
C RC =X8+X5+X4+1
DS1820也利用與上述相同的多項式函數(shù)產(chǎn)生一個8位CRC值并把此值提供給總線的主機(jī)以確認(rèn)數(shù)據(jù)字節(jié)的傳送。在使用CRC來確認(rèn)數(shù)據(jù)傳送的每一種情況中,總線主機(jī)必須使用上面給出的多項式函數(shù)計算CRC的值并把計算所得的值或者與存貯在DS1820的64位ROM部分中的8位CRC值(ROM讀數(shù)),或者與DS1820中計算得到的8位CRC值(在讀暫存存貯器中時,它作為第九個字節(jié)被讀出),進(jìn)行比較。CRC值的比較和是否繼續(xù)操作都由總線主機(jī)來決定。當(dāng)存貯在DS1820內(nèi)或由DS1820計算得到的CRC值與總線主機(jī)產(chǎn)生的值不相符合時,在DS1820內(nèi)沒有電路來阻止命令序列的繼續(xù)執(zhí)行。
總線CRC可以使用由一個移位寄存器和“異或”(XOR)門組成的多項式產(chǎn)生器來產(chǎn)生。其它有關(guān)Dallas公司單線循環(huán)冗余校驗的信息可參見標(biāo)題為“理解和使用Dallas半導(dǎo)體公司接觸式存貯器產(chǎn)品”的應(yīng)用注釋。
移位寄存器的所有位被初始化為零。然后從產(chǎn)品系列編碼的最低有效位開始,每次移入一位。當(dāng)產(chǎn)品系列編碼的8位移入以后,接著移入序列號。在序列號的第48位進(jìn)入之后,移位寄存器便包含了CRC值。移入CRC的8位應(yīng)該使移位寄薦器返回至全零。
2.7存貯器
DS1820的存貯器如圖所示那樣被組織。存貯器由一個高速暫存(便箋式)RAM和一個非易失性,電可擦除(E2) RAM組成,后者存貯高溫度和低溫度和觸發(fā)器TH和TL。暫存存貯器有助于在單線通信時確保數(shù)據(jù)的完整性。數(shù)據(jù)首先寫入暫存存貯器,在那里它可以被讀回。當(dāng)數(shù)據(jù)被校驗之后,復(fù)制暫存存貯器的命令把數(shù)據(jù)傳送到非易失性(E2) RAM。這一過程確保了更改存貯器時數(shù)據(jù)的完整性。
暫存存貯器是按8位字節(jié)存儲器來組織的。頭兩個字節(jié)包含測得溫度信息。第三和第四個字節(jié)是TH和TL的易失性拷貝,在每一次上電復(fù)位時被刷新。接著的兩個字節(jié)沒有使用,但是在讀回時,它們呈現(xiàn)為邏輯全1。第七和第八個字節(jié)是計數(shù)寄存器,它們可用于獲得較高的溫度分辨率(見“運用一測量溫度”一節(jié))。
還有第九個字節(jié),它可用Read Scratchpad(讀暫存存貯器)命令讀出。該字節(jié)包含一個循環(huán)冗余校驗(CRC)字節(jié),它是前面所有8個字節(jié)的CRC值。此CRC值以“CRC產(chǎn)生”一節(jié)中所述的方式產(chǎn)生。
2.8單線總線系統(tǒng)
單線總線是一種具有一個總線主機(jī)和一個或若干個從機(jī)