stumper ? 18s20 temp


Closed Thread
Results 1 to 9 of 9
  1. #1

    Default stumper ? 18s20 temp

    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?
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    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.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3


    Did you find this post helpful? Yes | No

    Default ty

    thanks bruce

  4. #4
    Join Date
    May 2006
    Location
    MI
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    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

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    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.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6


    Did you find this post helpful? Yes | No

    Cool programing

    bruce
    thanks for the responce

    any chance for a sample code line

    maybe showing 2 different setups

    thanks

  7. #7
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Lightbulb

    Just remember -- this still doesn't make it a DS18S20, DS1820, or any other
    similar version.
    Attached Files Attached Files
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  8. #8


    Did you find this post helpful? Yes | No

    Default cheers

    bruce


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

    jack

  9. #9


    Did you find this post helpful? Yes | No

    Cool another question

    bruce's
    program looks great but did bring up a question
    how are the hser** and 2
    labled on the 877a?

Similar Threads

  1. Graphic LCD with PICbasic pro
    By amindzo in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th November 2012, 11:45
  2. Stuck with 85C temp on ds18b20
    By revelator in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd April 2009, 19:50
  3. Random Numbers
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 18th December 2008, 08:47
  4. help with write command
    By cphillips82 in forum General
    Replies: 9
    Last Post: - 20th April 2008, 23:49
  5. Temp sensor problem
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 14th June 2006, 14:49

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts