Strange I2C Bus Behavior

  • I have a LoPy connected to four I2C devices. One of those devices is an NXP PCF8593, which has a fixed I2C address of 0xA2. After doing an I2C scan(), all four of the devices show up, and the other three have the correct address in the scan() result. But the PCF8593 shows as 81 (which is not 0xA2 in decimal). I've verified that the device in the scan() result that shows up as 81 is the PCF8593.

    Any thoughts on how/why this would happen?

    PS - I've not tried communicating with the PCF8593, but that and an o'scope trace is next on the list.

  • @robert-hh Thank you, that makes perfect sense. I knew that (the 7-bit address), but it didn't register with me because the datasheet for the PCF8593 says it's I2C address is 0xA2, but now that I look at it again, they are including the R/W bit. To much late-night prototyping. :o

  • @Eric24 I2C devices have an 7 bit address, so i cannot be 0xA2, which is 162 decimal or 2 times 81. So I think everything is fine, and the difference is just a matter of representation code vs. manual.

Log in to reply

Pycom on Twitter