IIC communication

Thread Starter

Kittu20

Joined Oct 12, 2022
511
Slaves are easy to identify on the I2C bus as each slave device has a unique address that can be easily identified.

How do we identify the master device when there are two or more master devices on I2C a bus ?
 

Papabravo

Joined Feb 24, 2006
22,082
Slaves are easy to identify on the I2C bus as each slave device has a unique address that can be easily identified.

How do we identify the master device when there are two or more master devices on I2C a bus ?
Are you certain that multi-master operation is possible? How do they arbitrate for access to the bus?
The reason I ask is because I have never seen it in the wild.
 

Ian0

Joined Aug 7, 2020
13,131
Are you certain that multi-master operation is possible? How do they arbitrate for access to the bus?
The reason I ask is because I have never seen it in the wild.
They read back the data on SDA and if it doesn't agree with what was transmitted, then arbitration is lost.
The I2C master cannot send a logic high, it has to rely upon the pullup resistor.
https://www.i2c-bus.org/i2c-primer/clock-generation-stretching-arbitration/
It follows that the one trying to output the lowest numbered slave address will win (much like CAN)
 

Papabravo

Joined Feb 24, 2006
22,082

Ian0

Joined Aug 7, 2020
13,131
Is the I2C interface hardware or software driven? If it is in software, maybe it is just a cheap and cheerful version with no thought given to the possibility of multi-master mode, or maybe it is written properly.
 
Top