What I2C address should I choose?

Pick a device you positively won't be using in your design and use it's I2C address. For instance, if you won't be needing a RTC, you can use 0xA2 and 0xA3, which are used by the NXP PCF8563 (and probably other RTCs).


First, don't use 0x00 and 0x01, those are reserved! Table 3 of the I2C Bus Specification lists the reserved addresses (and reasons why):

Slave addr  R/W        Description
 0000 000    0     General call address
 0000 000    1     START byte
 0000 001    X     CBUS address
 0000 010    X     Reserved for different bus format
 0000 011    X     Reserved for future purposes
 0000 1XX    X     Hs-mode master code
 1111 1XX    1     Device ID
 1111 0XX    X     10-bit slave addressing

You should also steer clear of 0x00 because that has no edge transitions, and might be an error condition (and it's hard to debug).

Other than that, I'd say "Just make it configurable." If you want to be able to plug in a wide variety of sensors, then you can either pay NXP for an address, or give it adjustable addresses. Software modifications should be obvious if you want to distribute the source code. A hardware option to toggle one or two bits of your selected address (solder jumpers on digital pins) is cheap and easy, or a ladder network of resistors with jumpers connected to an A/D pin could give you complete control in the hardware.


Here is a list of allocated addresses as of 1999: http://www.nxp.com/acrobat_download2/selectionguides/SELGUIDE.PDF

They don't release a full list with this reasoning:

Q: Is it possible to receive a list of all I²C-slave addresses used to date?

A: No. NXP Semiconductors do not issue this list of all previously assigned slave addresses, as this is the only way we can guarantee the list stays up to date and each assigned address is unique. If this list were made available, I²C-bus licensees would start selecting slave addresses themselves and the central list would soon become incomplete, which could lead to address conflicts. The principle established, proven to work well, is that each licensee sends a slave address request to a single contact within NXP Semiconductors, who then allocates the slave address based on a single master list.

From http://www.nxp.com/products/interface_control/i2c/faq/

Now, if everything is going to be internal to your project, there is no reason you can't just select any address that you want as long as it doesn't conflict with anything you plan on connecting.

Tags:

I2C