Cheers Richard,
I stumbled across a PDF on one wire devices from Microchip, and it suggested the following
Code:
OW_reset_pulse
Describes 1-Wire protocol to generate Reset pulse to detect the presence of the 1-Wire slave device.
Syntax
unsigned char OW_reset_pulse(void)
Parameters
None
Return Values
Return ‘
0
’ if the slave device presence pulse is detected, return ‘
1
’ otherwise.
Precondition
None
Side Effects
None
Example
// OW_reset_pulse function return the presence pulse from the slave device
if (!OW_reset_pulse())
return HIGH; // Slave Device is detected
else
return LOW; // Slave Device is not detected
But this uses ASM, so I'll do some further reading on PBP to see if this can be done in basic rather than ASM
Bookmarks