1

Are the addresses reported by i2cdetect 7-bit or 8-bit I2C addresses? My hope is the more general 7-bit address.

I'm starting to run some experiments, but it would be nice if the manpages were a bit more explicit about the reported format.

$ sudo i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- 1d -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- 61 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --   
tarabyte
  • 4,166
  • 10
  • 36
  • 48
  • There is no mention of `8-bit slave address` in I2C spec https://www.nxp.com/docs/en/user-guide/UM10204.pdf – Arkadiusz Drabczyk May 24 '21 at 21:18
  • 1
    8-bits is when the 7-bit address is left-shifted one bit and a r/w or indication bit is added. From experiments, pretty sure these are 7-bit addresses being reported because that lsb is a mix of 0 and 1 in the results. – tarabyte May 24 '21 at 21:20

1 Answers1

4

my experiments say the same, they are 7 bits addresses, for example i2cdetect returns you 0x33 (0b00110011), however physically on the bus you will see:

  • 0x66 (0x33<<1 and LSB set to 0) master will send data to the slave
  • 0x67 (0x33<<1 and LSB set to 1) master will read the data from the slave
heniczyna
  • 56
  • 2