PicoMite V6.00.02 betas


Author Message
bfwolf
Senior Member

Joined: 03/01/2025
Location: Germany
Posts: 242
Posted: 09:19pm 09 Mar 2025      

  WhiteWizzard said  
NOTE: From the datasheet:

R0, R1: Thermometer resolution bits. Table 3 below defines the resolution of the digital thermometer, based on the settings of these 2 bits. There is a direct tradeoff between resolution and conversion time, as depicted in the AC Electrical Characteristics. The factory default of these EEPROM bits is R0=1 and R1=1 (12-bit conversions).

Thermometer Resolution Configuration

R1 R0  Thermometer Resolution    Max Conversion Time
0   0         9 bit               93.75 ms (tconv/8)
0   1        10 bit              187.50 ms (tconv/4)
1   0        11 bit              375.00 ms (tconv/2)
1   1        12 bit              750.00 ms (tconv)


  matherp said  MMBasic uses 10-bit as the default with the tempr function and allows 100mSec, 200mSec, 400mSec and 800mSec for the various modes. If the DS18B20 isn't ready after these times MMBasic returns 1000. This algorithm hasn't changed since the original Maximite


@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?

bfwolf.
Edited 2025-03-10 07:22 by bfwolf