DS18B20-PAR
4 of 19
resolution, bits 1 and 0 are undefined, and for 9-bit resolution bits 2, 1 and 0 are undefined. Table 2 gives
examples of digital output data and the corresponding temperature reading for 12-bit resolution
conversions.
TEMPERATURE REGISTER FORMAT Figure 3
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
LS Byte
2
3
2
2
2
1
2
0
2
-1
2
-2
2
-3
2
-4
bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8
MS Byte
S S S S S 2
6
2
5
2
4
TEMPERATURE/DATA RELATIONSHIP Table 2
TEMPERATURE DIGITAL OUTPUT
(Binary)
DIGITAL OUTPUT
(Hex)
+85°C* 0000 0101 0101 0000 0550h
+25.0625°C 0000 0001 1001 0001 0191h
+10.125°C 0000 0000 1010 0010 00A2h
+0.5°C 0000 0000 0000 1000 0008h
0°C 0000 0000 0000 0000 0000h
-0.5°C 1111 1111 1111 1000 FFF8h
-10.125°C 1111 1111 0101 1110 FF5Eh
-25.0625°C 1111 1110 0110 1111 FE6Fh
-55°C 1111 1100 1001 0000 FC90h
*The power-on reset value of the temperature register is +85°C
OPERATION – ALARM SIGNALING
After the DS18B20-PAR performs a temperature conversion, the temperature value is compared to the
user-defined two’s complement alarm trigger values stored in the 1-byte T
H
and T
L
registers (see Figure
4). The sign bit (S)
indicates if the value is positive or negative: for positive numbers S = 0 and for
negative numbers S = 1. The T
H
and T
L
registers are nonvolatile (EEPROM) so they will retain data
when the device is powered down. T
H
and T
L
can be accessed through bytes 2 and 3 of the scratchpad as
explained in the MEMORY section of this datasheet.
T
H
AND T
L
REGISTER FORMAT Figure 4
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
S 2
6
2
5
2
4
2
3
2
2
2
1
2
0
Only bits 11 through 4 of the temperature register are used in the T
H
and T
L
comparison since T
H
and T
L
are 8-bit registers. If the result of a temperature measurement is higher than or equal to T
H
or lower than
or equal to T
L
, an alarm condition exists and an alarm flag is set inside the DS18B20-PAR. 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.
DS18B20-PAR
5 of 19
The master device can check the alarm flag status of all DS DS18B20-PARs on the bus by issuing an
Alarm Search [ECh] command. Any DS18B20-PARs with a set alarm flag will respond to the command,
so the master can determine exactly which DS18B20-PARs have experienced an alarm condition. If an
alarm condition exists and the T
H
or T
L
settings have changed, another temperature conversion should be
done to validate the alarm condition.
64-BIT LASERED ROM CODE
Each DS18B20-PAR contains a unique 64–bit code (see Figure 5) stored in ROM. The least significant 8
bits of the ROM code contain the DS18B20-PAR’s 1–wire family code: 28h. The next 48 bits contain a
unique serial number. The most significant 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 and associated ROM function control logic
allow the DS18B20-PAR to operate as a 1–wire device using the protocol detailed in the 1-WIRE BUS
SYSTEM section of this datasheet.
64-BIT LASERED ROM CODE Figure 5
8-BIT CRC 48-BIT SERIAL NUMBER 8-BIT FAMILY CODE (28h)
MEMORY
The DS18B20-PAR’s memory is organized as shown in Figure 6. The memory consists of an SRAM
scratchpad with nonvolatile EEPROM storage for the high and low alarm trigger registers (T
H
and T
L
)
and configuration register. Note that if the DS18B20-PAR alarm function is not used, the T
H
and T
L
registers can serve as general-purpose memory. All memory commands are described in detail in the
DS18B20-PAR FUNCTION COMMANDS section.
Byte 0 and byte 1 of the scratchpad contain the LSB and the MSB of the temperature register,
respectively. These bytes are read-only. Bytes 2 and 3 provide access to T
H
and T
L
registers. Byte 4
contains the configuration register data, which is explained in detail in the CONFIGURATION
REGISTER section of this datasheet. Bytes 5, 6 and 7 are reserved for internal use by the device and
cannot be overwritten.
Byte 8 of the scratchpad is read-only and contains the cyclic redundancy check (CRC) code for bytes 0
through 7 of the scratchpad. The DS18B20-PAR generates this CRC using the method described in the
CRC GENERATION section.
Data is written to bytes 2, 3, and 4 of the scratchpad using the Write Scratchpad [4Eh] command, and the
data must be transmitted to the DS18B20-PAR starting with the least significant bit of byte 2. To verify
data integrity, the scratchpad can be read (using the Read Scratchpad [BEh] command) after the data is
written. When reading the scratchpad, data is transferred over the 1-Wire bus starting with the least
significant bit of byte 0. To transfer the T
H
, T
L
and configuration data from the scratchpad to EEPROM,
the master must issue the Copy Scratchpad [48h] command.
Data in the EEPROM registers is retained when the device is powered down; at power-up the EEPROM
data is reloaded into the corresponding scratchpad locations. Data can also be reloaded from EEPROM
to the scratchpad at any time using the Recall E
2
[B8h] command. The master can issue “read time slots”
(see the 1-WIRE BUS SYSTEM section) following the Recall E
2
command and the DS18B20-PAR will
indicate the status of the recall by transmitting 0 while the recall is in progress and 1 when the recall is
done.
MSB MSB LSB LSB LSBMSB
DS18B20-PAR
6 of 19
DS18B20-PAR MEMORY MAP Figure 6
SCRATCHPAD (Power-up State)
byte 0 Temperature LSB (50h)
byte 1 Temperature MSB (05h)
EEPROM
byte 2 T
H
Register or User Byte 1* T
H
Register or User Byte 1
byte 3 T
L
Register or User Byte 2* T
L
Register or User Byte 2
byte 4 Configuration Register* Configuration Register
byte 5 Reserved (FFh)
byte 6 Reserved
byte 7 Reserved (10h)
byte 8 CRC*
*Power-up state depends on value(s) stored
in EEPROM
CONFIGURATION REGISTER
Byte 4 of the scratchpad memory contains the configuration register, which is organized as illustrated in
Figure 7. The user can set the conversion resolution of the DS18B20-PAR using the R0 and R1 bits 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-4
in the configuration register are reserved for internal use by the device and cannot be overwritten.
CONFIGURATION REGISTER Figure 7
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
0 R1 R0 1 1 1 1 1
THERMOMETER RESOLUTION CONFIGURATION Table 3
R1 R0 Resolution Max Conversion Time
0 0 9-bit 93.75 ms (t
CONV
/8)
0 1 10-bit 187.5 ms (t
CONV
/4)
1 0 11-bit 375 ms (t
CONV
/2)
1 1 12-bit 750 ms (t
CONV
)
CRC GENERATION
CRC bytes are provided as part of the DS18B20-PAR’s 64-bit ROM code and in the 9
th
byte 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. The scratchpad CRC is calculated 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-PAR. To
verify that data has been read correctly, the bus master must re-calculate the CRC from the received data
(85°C)

DS18B20+PAR

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Board Mount Temperature Sensors Prgmble Resolution 1-Wire Parasite Pw
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet