Datasheet

Jon Waddington
29
After the Propeller issues a Read time slot, the bus is released. The DS18B20 can then
leave the bus to go high to transmit a ‘1’ or pull the bus low to transmit a ‘0’. After a
minimum of 60µs, the bus is released and pulled high by the 4.7k resistor shown in
figure 3.5.1.
The DS18B20 has a unique serial number to distinguish itself from other devices which
may be present on the 1-Wire bus. The lowest byte contains the DS18B20 family’s code,
0x28. The next six bytes contain the unique serial number and the most significant b yte
contains the cyclic redundancy check (CRC). The CRC is calculated based on the 6 byte
serial number and the DS18B20 family’s code. The Propeller can calculate the CRC and
compare it with the read value of the CRC to verify that the data is correct. The last byte
of the Scratchpad also contains a CRC which can be used to check that the information
received from the Scratchpad is correct.
The DS18B20’s Scratchpad is a block of ROM containing 9 bytes. The first byte holds the
least significant byte of the converted temperature and the second byte contains the
most significant byte of the converted temperature.
Bytes 2 and 3 are the temperature alarm triggers for high temperatures (T
H
) and low
temperatures (T
L
) respectively. These registers are not used in the Information System.
Byte 4 is the configuration register. Bits 5 and 6 (R0 and R1 respectively) of this register
are used to set the resolution of the temperature conversion. This is shown in the table
below.
R1
R0
Resolution (Bits)
Max Conversion Time
0
0
9
93.75ms
8
0
1
10
187.5ms
4
1
0
11
375ms
2
1
1
12
750ms
Bytes 5, 6 and 7 are unused and byte 8 is the Scratchpad CRC.
The temperature registers are arranged as shown in the tables below.
Most Significant Byte
Least Significant Byte
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
S
S
S
S
S
2
6
2
5
2
4
2
3
2
2
2
1
2
0
2
-1
2
-2
2
-3
2
-4