Re: Dallas DS18B20 CRC



Another thing I noticed is this one.
For some couples (temperature, counts remaining) I always receive a
wrong CRC, while when "counts remaining" is one unit less, the crc is
correct. For example

Temperature - LSB = 0xA3
Temperature - MSB = 0x01
TH = 0x4B
TL = 0x46
configuration register = 0x7F
reserved = 0xFF
counts remaining = 0x0D <===
reserved = 0x10
CRC = 0xCE [CORRECT]

but sometimes I receive

Temperature - LSB = 0xA3
Temperature - MSB = 0x01
TH = 0x4B
TL = 0x46
configuration register = 0x7F
reserved = 0xFF
counts remaining = 0x0E <===
reserved = 0x10
CRC = 0xD8 [WRONG correct CRC is 0x9B]

Thermometer doesn't work in parasite power mode, and it has sufficient
time to perform temperature conversion (1 second).



Max
.