19
\$\begingroup\$

Now I know in order to have an I2C address reserved for yourself you have to pay the I2C people some money. But I don't want to do this.

I'm asking for advice on what address I should choose for my slave and master MCUs on my project. There will also be an EEPROM on the board. So I will avoid using the address of the EEPROM. I plan for the master to connect to a wide range of sensors, including gyros and accelerometers, and perhaps additional memory devices. Are there any blocks of addresses I should stay clear of? I was thinking of just using 0x00 for the master and 0x01 for the slave, because those seem to be rarely used.

Another question: would it be a bad idea to mix 10-bit devices and 7-bit devices on the same bus? I was considering the possibility of having my MCUs communicate with 10-bit addressing, but only using 7-bit addresses for sensors.

\$\endgroup\$
14
  • 1
    \$\begingroup\$ @W5VO. Yep, right next to the SD card people only wanting $3,000. \$\endgroup\$
    – Thomas O
    Dec 5, 2010 at 23:56
  • 1
    \$\begingroup\$ @ThomasO, you do not need to pay them to get an address reserved, like an identifier, you do not have to pay this to make a device, they are selling a service. SDcard they are enforcing their intellectual property, they can tell you to do it or choose a different technology. \$\endgroup\$
    – Kortuk
    Dec 6, 2010 at 0:18
  • 1
    \$\begingroup\$ @ThomasO, I was making a point that there is something that you are paying for in this case. Also, two thousand is not much in a real product. \$\endgroup\$
    – Kortuk
    Dec 6, 2010 at 3:54
  • 1
    \$\begingroup\$ @Thomas O $3,000 is actually very reasonable for products. This is a drop in the bucket for any company making products. \$\endgroup\$
    – Kellenjb
    Dec 6, 2010 at 3:58
  • 2
    \$\begingroup\$ @reemrevnivek, but the patent holder chose that they would rather require that and cause open-hardware not to be able to allow use, and require paying this fee. as the patent holder, they have that right. I am, until laws change, going to make sure this is clear. I would like patent and copyright overhaul, but until they are, this is how engineers whom have good ideas are protected and rewarded. \$\endgroup\$
    – Kortuk
    Dec 7, 2010 at 3:50

4 Answers 4

15
\$\begingroup\$

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.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ +1 for configurable address. I have seen this on slaves that will have several of the same thing on the same bus. \$\endgroup\$
    – Kellenjb
    Dec 5, 2010 at 19:58
  • \$\begingroup\$ Yeah I was thinking of configurable addresses. It could be updated by changing settings from the menu system. One important thing is that safeguards need to be added to prevent someone changing the address and the master MCU losing communication with the slave, so some kind of protocol needs to be established which resets the addresses (e.g. after 5 seconds have no communication so reset address.) \$\endgroup\$
    – Thomas O
    Dec 6, 2010 at 9:48
20
\$\begingroup\$

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).

\$\endgroup\$
2
12
\$\begingroup\$

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.

\$\endgroup\$
4
  • \$\begingroup\$ Odd reasoning: by having no list they ensure to keep the list up to date... :-/ \$\endgroup\$ Jun 12, 2011 at 13:10
  • \$\begingroup\$ Simple reasoning: they want to ensure that anyone who allocates IDs will have a truly-up-to-date list; having out-of-date copies of the list floating around would undermine that goal. \$\endgroup\$
    – supercat
    Sep 8, 2011 at 23:25
  • 1
    \$\begingroup\$ @Federico They have a list, they just don't publish it so that people are forced to go through them to make sure that the list is up to date. If the list was published there would be tons of people who pick unused address, then what happens when someone properly reserves that address? \$\endgroup\$
    – Kellenjb
    Sep 8, 2011 at 23:44
  • \$\begingroup\$ FWIW: SELGUIDE.PDF is in the Internet Archive link \$\endgroup\$ Feb 10, 2018 at 8:09
2
\$\begingroup\$

As Kellenjb says you won't get a full list of slave device addresses.

However there are several reserved addresses which you can not use (0x00 for example is the general call address).

The list is here

Mixing 10 and 7 bit addressing is fine as long as the 7bit slaves obey the I2C standard and ignore 10 bit addresses.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.