Ds18b20..


Results 1 to 6 of 6

Thread: Ds18b20..

Threaded View

  1. #5
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Am I right in assuming IF i dont use the constants then it would default to 0.0625°C resolution and take 750ms to take a reading?
    BUT IF I want to change the resolution I'd use the constants, but the code would be
    Code:
    OWOUT DQ, 1, [$CC, $4E, 0, 0, DS18B20_9bit] 
    OR OWOUT DQ, 1, [$CC, $4E, 0, 0, DS18B20_10bit] etc?
    and this would take 187.5ms?

    OK figured out $33 is skip rom command, and $4E is Write scratchpad
    but what's the 0,0 after it?


    ANd IF I was using more than 1 temp sensor then it would be something like
    Code:
    OWOUT  DQ, 1, [$55,$28,$B1,$FE,$22,$00,$00,$00,$5D,$44, $3F ] 
    ; or do I HAVE to use the DS18B20_10bit instead of $3F?
    Assuming the ROM address is $B1,$FE,$22,$00,$00,$00?

    I know that Match ROM is $55, Read ROM is $33, and Search Rom is $F0

    And I know the $44 at the end is telling it to start a temperature conversion


    Sorry for asking so many questions
    Last edited by karenhornby; - 18th June 2008 at 15:30.

Similar Threads

  1. Reading temperature using multi DS18B20
    By KVLV in forum Code Examples
    Replies: 16
    Last Post: - 3rd November 2017, 19:48
  2. Please help with code for DS18B20
    By fratello in forum mel PIC BASIC Pro
    Replies: 109
    Last Post: - 28th April 2013, 21:12
  3. Help with DS18B20 program
    By presario1425 in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 22nd August 2012, 00:50
  4. Multi DS18b20 Code help.
    By sccsltd in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th December 2009, 06:13
  5. DS18B20 error reading
    By Gaetano in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th August 2007, 16:21

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