PDA

View Full Version : stumper ? 18s20 temp



jcleaver
- 13th February 2007, 16:07
why? i have attached 2 programs for reading temp

both work and read temp and can get temp to vary

however tempworks display accurate temp the other temp is 35 deg f low any
ideas?

Bruce
- 13th February 2007, 16:33
The 1st example is for a DS18B20 which has programmable
temperature resolutions of 0.5°C, 0.25°C, 0.125°C, or 0.0625°C.

It assumes the sensor is configured for 12 bit mode, with a resolution
of 0.0625°C per step.

The 2nd example is most likely for the DS18S20, which has 9-bit
resolution, which corresponds to 0.5°C steps.

jcleaver
- 13th February 2007, 20:54
thanks bruce

G-R-C
- 15th February 2007, 03:02
Hello all.
In regards to the posts about the DS18B20 sensors and resolution.
This seems to be a fairly common problem with these sensors.
I have trouble with this also. How can the resolution be set
in the DS18B20?

Hope this is not considered "Thread-Jacking".
Thanks in advance All.
Gordon

Bruce
- 15th February 2007, 13:32
You can change the resolution by issuing the read scratchpad command 4Eh
followed by three bytes. TH, TL, and config. The DS18B20 data sheet explains
how it works & what values to use for config for various temp resolutions.

jcleaver
- 15th February 2007, 15:16
bruce
thanks for the responce

any chance for a sample code line

maybe showing 2 different setups

thanks

Bruce
- 15th February 2007, 20:46
Just remember -- this still doesn't make it a DS18S20, DS1820, or any other
similar version.

jcleaver
- 15th February 2007, 21:23
bruce


thanks you are always a great resource
i am sure othersappreicate this also

jack

jcleaver
- 16th February 2007, 03:34
bruce's
program looks great but did bring up a question
how are the hser** and 2
labled on the 877a?