Hi
Has anyone set the DS18B20 low temperature threshold (do a Write Scratchpad 4Eh command) to < 0 C? e.g. -20C for example.
The problem I'm seeing is if I set the low threshold to negative value, while the high threshold to be positive, when I read back (Read Scratchpad BEh), the high threshold just becomes "-1". However if I write low threshold as 0 C and above positive number, the high threshold reads exactly the correct value I set before the read.
Comments?
Thanks.
MI
Just example of setting TH, TL, config and then read back after write to scratchpad. High Threshold wrong -1C value when Low Threshold temp set to -20 before read. High threshold set to +50 C / +122 F but read back as -1C. If TL set to -1 C, TH reads back as 0 C. Disproportional error. (NOTE: "factory default" from waterproof device is TL = 70C, TH = 75C, small range.) What you see here is what's read back after answering "Y" & "S" to prompt.
[2020-09-28 10:16:45.194] Change the high and low temperature thresholds (Y/N)? y
[2020-09-28 10:16:47.275]
[2020-09-28 10:16:47.275] Change to factory default (D) or specified thresholds (S)? s
[2020-09-28 10:16:48.108]
[2020-09-28 10:16:56.882] DS18B20 configuration register = 01111111
[2020-09-28 10:16:58.804]
[2020-09-28 10:17:05.903] DS18B20 Low threshold temperature = 11101100 Celsius = -20 C Farenheit = -4 F
[2020-09-28 10:17:36.127]
[2020-09-28 10:18:52.019] DS18B20 High threshold temperature = 11111111 Celsius = -1 C Farenheit = 31 F
Hi @mignacio,
I hope you are doing great.
This product is not part of the NXP portfolio. I am not sure what you are doing with the FRDM-K64 or how you are connecting these products.
Regards,
Mario