cancel
Showing results for 
Search instead for 
Did you mean: 

I2C address length selection - 7 or 10 bit

dplaczek
Associate
Posted on February 07, 2010 at 06:46

I2C address length selection - 7 or 10 bit

1 REPLY 1
Posted on May 17, 2011 at 10:00

You don't have to select it (beyond external jumpers, what I2C slave device are you using?), the sequence which you send to the slave device uses a reserved address on the I2C bus, devices that don't recognize it aren't going to activate, and those which do will decode and handle appropriately. The address is sent as two bytes, the first includes a ''magic'' address, including 2 bits of your address, the second 8 bits is the remainder of the 10-bit address. Should be transparent.

A device supporting BOTH modes may decode different 7 and 10-bit addresses. If all you I2C slaves support the 10-bit mode the fact that their 7-bit addresses might clash doesn't matter if you use 10 bit mode for ALL operations. External jumper(s) usually allow you to move the decode space around.

I2C is usually implemented as a very simple state machine, the parts are usually not very smart.

-Clive
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..