【正文】
p is not required on the I/O 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 DS1820’s may be placed on the 1–Wire 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。C, since it may not be able to sustain munications given the higher leakage currents the DS1820 exhibits at these temperatures. For applications in which such temperatures are likely, it is strongly remended that VDD be applied to the DS1820. For situations where the bus master does not know whether the DS1820’s on the bus are parasite powered or supplied with external VDD, a provision is made in the DS1820 to signal the power supply scheme used. The bus master can determine if any DS1820’s are on the bus which require the strong pull–up by sending a SkipROM protocol, then issuing the read power supply mand. After this mand is issued, the master then issues read time slots. The DS1820 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 pull–up on the I/O line during temperature conversions. See “Memory Command Functions” section for more detail on this mand protocol.OPERATION – MEASURING TEMPERATUREThe DS1820 measures temperature through the use of an on–board proprietary temperature measurement technique. A block diagram of the temperature measurement circuitry is shown in Figure 4. The DS1820 measures temperature by counting the number of clock cycles that an oscillator with a low temperature coefficient goes through during a gate period determined by a high temperature coefficient oscillator. The counter is preset with a base count that corresponds to –55176。C. If the counter reaches zero before the gate period is over, the temperature register, which is also preset to the –55176。C value, is incremented, indicating that the temperature is higher than –55176。C. At the same time, the counter is then preset with a value determined by the slope accumulator circuitry. This circuitry is needed to pensate for the parabolic behavior of the oscillators over temperature. The counter is then clocked again until it reaches zero.If the gate period is still not finished, then this process repeats. The slope accumulator is used to pensate for the non–linear behavior of the oscillators over temperature, yielding a high resolution temperature measurement. This is done by changing the number of counts necessary for the counter to go through for each incremental degree in temperature. To obtain the desired resolution, therefore, both the value of the counter and the number of counts per degree C (the value of the slope accumulator) at a given temperature must be known.Internally, this calculation is done inside the DS1820 to provide 176。C resolution. The temperature reading is provided in a 16–bit, sign–extended two’s plement reading. Table 1 describes the exact relationship of output data to measured temperature. The data is transmitted serially over the 1–Wire interface. The DS1820 can measure temperature over the range of –55176。C to +125176。C in 176。C increments. For Fahrenheit usage, a lookup table or conversion factor must be used.Note that temperature is represented in the DS1820 in terms of a 1/2176。C LSB, yielding the following 9–bit format:The most significant (sign) bit is duplicated into all of the bits in the upper MSB of the two–byte temperature register in memory. This “sign–extension” yields the 16–bit temperature readings as shown in Table 1. Higher resolutions may be obtained by the following procedure. First, read the temperature, and truncate the 176。C bit (the LSB) from the read value. This value is TEMP_READ. The value left in the counter may then be read. This value is the count remaining (COUNT_REMAIN) after the gate period has ceased. The last value needed is the number of counts per degree C (COUNT_PER_C) at that temperature. The actual temperature may be then be calculated by the user using the following:1–WIRE BUS SYSTEMThe 1–Wire bus is a system which has a single bus master and one or more slaves. The DS1820 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).HARDWARE CONFIGURATION The 1–Wire bus has only a single line by definition。 it is important that each device on the bus be able to drive it at the appropriate time. To facilitate this, each device attached to the 1–Wire bus must have open drain or 3–state outputs.The 1–Wire port of the DS1820 (I/Opin) is open drain with an internal circuit equivalent to that shown in Figure 9. A multidrop bus consists of a 1–Wire bus with multiple slaves attached. The 1–Wire bus requires a pullup resistor of approximately 5KW.The idle state for the 1–Wire bus is high. If for any reason a transaction needs to be suspended, the bus MUST be left in the idle state if the transaction is to resume. Infinite recovery time can occur between bits so long as the 1–Wire bus is in the inactive (high) state during the recovery period. If this does not occur and the bus is left low for more than 480 ms, all ponents on the bus will be reset. TRANSACTION SEQUENCEThe protocol for accessing the DS1820 via the 1–Wire port is as follows:? Initialization? ROM Function Command? Memory Function Command? Transaction/DataINITIALIZATIONAll transactions on the 1–Wire bus begin with an initialization sequence. The initialization sequence consists of a reset pulse transmitted by the bus master followed by presenc