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">
Bookmarks