Problems with 1-Wire DS2438 and PIC16F88


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    May 2009
    Location
    Philadelphia, PA
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Thanks for your help, Darrel! Your EXT methods will be a great help with other projects.

    After adding in your code, I noticed that the raw data was still a series of 1's. I switched to a DS18B20 using your suggested code (with slight modification to the one-wire commands) and it worked perfectly.

    For kicks, I removed all of the 1-Wire devices and the raw data is still showing 1's. Seems like the PIC is reading the pin's state (pulled up with a resistor) rather than the data coming over the DQ wire. While the wiring and code seem correct and appear to conform with the datasheets, perhaps I'm missing something?

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


    Did you find this post helpful? Yes | No

    Default

    Try adding this before the Read command. (after the conversion)

    Code:
    OWOUT DQ_Pin,1,[$CC, $B8, $00] ' Recall Memory page 0
    From the datasheet ...
    Recall Memory [B8hxxh]
    This command recalls the stored values in EEPROM / SRAM page xxh to the scratchpad page xxh.
    This command must proceed a Read SPxx command in order to read any page of memory on the DS2438.
    hth,
    DT

  3. #3
    Join Date
    May 2009
    Location
    Philadelphia, PA
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    That worked perfectly. While I figured the recall function was a bit redundant, after some more studying of the datasheet, it now makes sense. I'll post the complete code and schematic once I've completed the project.

    Thanks for your help, Darrel.

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