I2C Identification question
Tapperman
Posts: 319
Hello All,
Is there a way to 'snoop' (as the Master) for any slaves present? Has someone already written code to do so? And measure how far away they are?
... Tim
Is there a way to 'snoop' (as the Master) for any slaves present? Has someone already written code to do so? And measure how far away they are?
... Tim
Comments
No idea how to determine the distance.
IMHO distance measurement is not possible with standard mode 0, 10k pullups--- about 99% sure. Unless you can figure out a way to use mode 1 to get the bus to act as a TDR.
Easy-peasy -- you simply do a start, then write the control byte (slave id) for the device you're looking. If you get an ACK, it's there, A NAK means it's not. My I2C object has a method called present() that can poll a specific device id and return true or false.
I ran the attached program on a PAB and it correctly identified the boot EEPROM (id is $A0) as being attached.
No.