I am working on a project for the farm and I want to use a 1-wire DS2438 initialized to use the Vad voltage input. I am building on Darrel Taylor’s May 2009 post. I have been unable to write to the scratchpad. The scratchpad always reads defalt values. Temperature seems to be working as expected. The voltage is always equal to Vdd and not Vad. I am not sure if OWOUT will handle the necessary condition needed which is:
Reset, SkipRom, WriteScratchpad, page#, 1 data byte , Reset

I’ve tried:
OWOUT DQ_pin, 3 ,[ SkipRom, WriteScratchpad, $00, $00]
I’ve also tried:
OWOUT DQ_pin, 1 ,[ SkipRom, WriteScratchpad, $00]
OWOUT DQ_pin, 2 ,[ $00]
And:
OWOUT DQ_pin, 1 ,[ SkipRom, WriteScratchpad, $00, $00]
OWOUT DQ_pin, 1 ,[ SkipRom, ConvesrtT]
Nothing seems to work.

I am using an X1 board with 16F877 running at 16Mhz.
Has anyone had success at using PBP to write to the DS2438 scratchpad? Everything else worked as expected, what am I overlooking?
Code:
    define  osc 16

' -----[ Constants ]------------------------------------------------------------
' 1-Wire ROM Function Commands
ReadROM        CON $33    ;read ID, serial num, CRC
MatchROM       CON $55    ;look for specific device
SkipROM        CON $CC    ; skip rom (one device)
SearchROM      CON $F0    ;
' DS2438 Memory Command functions
ConvertV       CON $B4   ; convert the voltage
ConvertT       CON $44   ; convert the temperature
RecallMemory   CON $B8   ; set page to be read
ReadScratchpad CON $BE   ; set address to be read
CopyScratchpad CON $48
WriteScratchpad CON $4E
' configuratioin register status bits
ADVdd   CON %1000       ;Voltage A/D input slect Bit 1=Vdd 
ADVad   CON %0000       ;Voltage A/D input slect Bit 0=Vad  
TB      CON %10000      ;Temp conversion flag
ADB     CON %1000000    ;A/D conversion flag
' -----[ Variables ]------------------------------------------------------------
DSbuffer  VAR BYTE[9] BANK0
ASM          ;Typcasting Variables inside of Arrays
DSstat    = _DSbuffer      ; byte
DStemp    = _DSbuffer + 1  ; word
DSvolts   = _DSbuffer + 3  ; word
DScurrent = _DSbuffer + 5  ; word
DSthres   = _DSbuffer + 7  ; byte
DScrc     = _DSbuffer + 8  ; byte
ENDASM
DSstat      VAR  BYTE  EXT ; Status/Configuration
DStemp      VAR  WORD  EXT ; Temperature
DSvolts     VAR  WORD  EXT ; Voltage
DScurrent   VAR  WORD  EXT ; Current
DSthres     VAR  BYTE  EXT ; Threshold
DScrc       VAR  BYTE  EXT ; CRC

GB1net      VAR  PORTC.7  ' 1-Wire net work for Bin #1                            
sd_tran     VAR  PORTC.6  ' Transmit pin
sd_receive  VAR  PORTC.7  ' Receive pin

' -----[ Main Code ]------------------------------------------------------------
;Initialize:  ;set configuration to A/D convesion on Vad pin 4 of DS2438
Main:
    OWOUT GB1net,1,[SkipRom,WriteScratchpad,$00,$00]  
GetData:
    OWOUT GB1net,1,[SkipRom,ConvertT]
    pause 10 
    OWOUT GB1net,1,[SkipRom,ConvertV]
    pause 10
    OWOUT GB1net,1,[SkipRom,RecallMemory, $00]   ' Skip ROM search, Recall Memory page 0
    OWOUT GB1net,1,[SkipRom,ReadScratchpad, $00] ' Skip ROM search, Read SP 
    OWIN  GB1net,0,[STR DSbuffer\9]              ' Read 9 bytes                                                                                      
    Serout2 sd_tran, 84,["   Scratchpad ",bin DSstat,",  temp ",bin DStemp,",  DSvolts "_
      , bin DSvolts, ", DSthres ", bin DSthres, ",  DScrc ",bin DScrc,13,10,13,10  ]
    pause 5000
    goto GetData
    END