DS1820 resolution


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

    Default DS1820 resolution

    Hi

    If I understand well it should be possible to lower the resolution of the DS1820
    in order to speed-up the conversion time ?

    As I want to use several DS1820's and return there value on a HSERIN request
    this migh be a possibility

    Further I dont need more than 1 or 0.5 deg resolution

    Any one succeed in changing the resolution ?

    Walter

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    You can change the resolution of the DS18B20, but not the older DS1820.

    And yup, it goes much faster.
    <br>
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Sorry Darrel I mean 18B20

    Any code example on how to do this ?

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I do.

    Do you feel like beta testing something?
    <br>
    DT

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Ok, we'll go the easy way then.

    Assuming you're not using the alarms ...
    Code:
    DS18B20_9bit  CON %00011111 ; 93.75ms, 0.5°C
    DS18B20_10bit CON %00111111 ; 187.5ms, 0.25°C  <-- My favorite
    DS18B20_11bit CON %01011111 ; 375ms,   0.125°C
    DS18B20_12bit CON %01111111 ; 750ms,   0.0625°C  (default)
    
    OWOUT DQ, 1, [$CC, $4E, 0, 0, DS18B20_10bit]
    HTH,
    DT

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel

    Would it be possible to share your 9/10bit conversion routine to degrees centigrade
    ? Walter

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    The conversion is the same, no matter which resolution you use.

    At lower res, the least signifcant bit's become 0's.
    <br>
    DT

  8. #8
    Join Date
    Jun 2008
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Got a question.....

    Using the resolution setting would it be possible to make the 18S20 and the 18B20 interchangeable with the same software? I have tried setting the 18B20 to 9 bit and get readings using my 18S20 programming but get some very high temp readings.

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink

    Hi, Rich

    The 18S20 and 18B20 readings are just different from a shifting value ...

    So just you just have to ask the device for the family code ( 10h for S or 28 h for B ) and shift the result the convenient value ...

    That's all.

    Alain

    Hi, Walter

    The SEARCH function for "18B20" will give you the routine ...

    Alain
    Last edited by Acetronics2; - 5th June 2008 at 14:43.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Please help with 1-wire DS1820
    By hatuan291 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th March 2010, 13:51
  2. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 16:45
  3. DS1820 display with 7-seg 4 digits
    By chai98a in forum Code Examples
    Replies: 12
    Last Post: - 10th April 2008, 13:12
  4. PIC lcd ds1820
    By wchpikus in forum mel PIC BASIC
    Replies: 2
    Last Post: - 24th May 2007, 14:46
  5. DS1820 again
    By paxmowa in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th January 2006, 14:49

Members who have read this thread : 0

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