bfwolf Senior Member Joined: 03/01/2025 Location: GermanyPosts: 242
Posted: 09:19pm 09 Mar 2025
@WhiteWizzard, @Peter:
I didn't know that the DS18B20 had a configurable resolution! I simply ordered a few from a Chinese company I trust and used them on an Arduino UNO and it worked - with 12 bits of resolution. You learn something new every day - thanks to you too!
I just took the trouble to take a quick look at the data sheet: The resolution must be specified by a "Write Configuration Register". What happens if a transmission error occurs (e.g. due to interference or poor power supply)? I'm not sure that a CRC check is carried out before the data is transferred to the RAM?
The data sheet says: "Byte 8 of the scratchpad is read-only and contains the CRC code for bytes 0 through 7 of the scratchpad. The DS18B20 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; the data must be transmitted to the DS18B20 starting with the least signifi- cant bit of byte 2. To verify data integrity, the scratchpad can be read (using the Read Scratchpad [BEh] command) after the data is written."
That sounds like it would be left to the user to test?