Problems with 1-Wire DS2438 and PIC16F88


Results 1 to 13 of 13

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Code:
    OWOUT DQ_Pin,1,[$CC, $BE, $00] ' Skip ROM search, send Convert V, Read page 00h
    OWIN DQ_Pin,2,[voltage.lowbyte, voltage.highbyte] ' Read two bytes
    $BE is the Read Scratchpad command. (just a comment prob)

    The Read Scratchpad command always starts reading at address 0 of the selected page.

    The first 2 bytes of page 0 are STATUS/CONFIGURATION and TEMP LSB.
    The STATUS/CONFIGURATION defaults to 1's, which is probably what you're seeing.

    The Voltage value is at addresses 3-4, so you'll need to read at least 5 bytes to get to the Voltage.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3415&stc=1&d=124285359 2">
    Attached Images Attached Images  
    DT

Members who have read this thread : 2

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