I've checked the 1-wire presence with a different PIC and different 1-wire device, and it seems to be working ok.
I noticed the point that your program jumps to doesn't give any indication that it jumped there.
Maybe you could try something like this for testing purposes.
Code:
Sensor:
OWOUT OWnet,1, [skiprom,WriteScratchpad,$00,$00],Senout
OWOUT OWnet,1, [skiprom,ConvertT] :pause 10
OWOUT OWnet,1, [skipROM,ConvertV] :pause 5
OWOUT OWnet,1, [skipROM,RecallMemory, $00] ; Skip ROM search, Recall Memory
OWOUT OWnet,1, [skipROM,ReadScratchpad, $00] ; Skip ROM search, Read
OWIN OWnet,2, [STR DSbuffer\9]' Read 9 bytes
Serout2 TX_485, 84,[" 1-Wire is present on main"]
GOSUB GetT_V
RETURN
Senout:
Serout2 TX_485, 84,[" 1-Wire presence NOT DETECTED!"]
RETURN
Bookmarks