How to display I2C address in hex

I know what you mean. I have seen these ambiguities in documentation too. That doesn't make it right, though.

I personally only communicate the address as a 7 bit value, whether in binary (0-1111111), hex (0-7F), decimal (0-127) or some other scheme. The R/W bit is NOT part of the address. It and the address are two separate fields that happen to be crammed into the same byte.

Unfortunately, even though the 7-bit address interpretation is correct and does seem to be the more common, there is a lot of bad documentation out there. This means you can't count on the next datasheet you read to do it one way or the other. When reading documentation, this is a issue you just have to be aware of and be extra careful to see how exactly the address is being presented. So far I haven't come across a datasheet where this couldn't eventually be figured out.

When writing your own documentation, please do the rest of the world a favor and express the "address" as a 7 bit value. If you want to show it with the R/W bit, call it the "address byte" or something to make this clear.

Tags:

Hex

I2C