tempr not working


Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3348
Posted: 10:55pm 29 May 2026      

Thanks for the extra testing. It filled all the gaps in the T3 data which I now see goes from 16 to 1 with increasing temperature.
And that makes quite a difference. The equation in the datasheet does not appear to be correct.

The data you have given me should be enough to simulate a DS18S20 properly and find the correct equation. More to follow.

Edit.
This gives the most sensible results:-
DS18S20t = Str2bin(int16,Chr$(T1)+Chr$(T2))\2 + (16 - T3)/16 -0.9375
'or
Value = Str2bin(int16,Chr$(T1)+Chr$(T2))\2 + (16-T3)/16 -0.9375


And also appears to work below zero.
Edited 2026-05-30 12:26 by phil99