Electrical – How to master connect to a slave at a wrong I2C address

i2c

I connected an IO expander (PCA6416A) to Arduino using I2C bus. I used I2C Scanner script to find the address. I tried clock speeds from 30 to 100 kHz and used 2k and 10k resistors on bus lines. Whaterver I do the script always detects expander IC at address 0x40 while according to datasheet the expander IC is either 0x80 or 0x82 ( actually in my board it must be 0x80). Interestingly I can read IC registers without error but with some noise.
So my questions is why I2C master consistently detects slave at a wrong address?

Best Answer

You have misread the datasheet. As you can see from the page in question:

I2C address

The slave address is a 7-bit field which the I2C scanner is reporting as 0x40 (or 0x41 depending on the ADDR pin).

To be honest, though, I don't see where you are getting 0x80 from. That isn't mentioned in the datasheet, and the "8-bit" address shown in the graphic would be 0x40 (or 0x42) and the 7-bit address would be 0x20 (or 0x21).

Notice how the high-order bit is zero? There is no way that is going to be 0x80.