Electrical – I2C Communication Open drain benefits vs Push pull

communicationi2copen-drainpush-pull

I am reading this TI I2C App Note for understanding the I2C operation and need to understand how Multi master I2C will operate.

I was not able to understand this para in the app note, "Since no device may force a high on a line, this means that the bus will never
run into a communication issue where one device may try to transmit a high, and another transmits a low,
causing a short (power rail to ground). I
2C requires that if a master in a multi-master environment transmits
a high, but see's that the line is low (another device is pulling it down), to halt communications because
another device is using the bus. Push-pull interfaces do not allow for this type of freedom, which is a
benefit of I
2C.
"

This is the first para of Section 1.1 Open-Drain for Bidirectional Communication

I have some doubts :

  1. I don't understand how they are saying Open drain is better than push pull config? Can someone give an example? And when they say two devices start communicate at the same time, how is this possible? Two devices can't communicate at the same time, right? And are the two devices slaves? or masters?

  2. Please provide an example how push pull is dangerous when compared to Open drain in I2C?

Best Answer

"Two devices can't communicate at the same time, right? And are the two devices slaves? or masters?"

Two devices can communicate at the same time on the same bus (with eachother), but not more, no matter their role.

On I2C, only the master(s) can start communcations. If a masters wants to do so, he can check wether the SDA pin is pulled low (for the duration of 2x I2C cycle time), which means another master is currently active, so it can wait for the other master/slave to finish before transmitting itself.

I don't understand how they are saying Open drain is better than push pull config? Please provide an example how push pull is dangerous when compared to Open drain in I2C?

Consider the scenario with push/pull: Imagine two masters and one slave on the bus. How could a master check whats happenning on the bus - i.e. is another IC currently talking? If you configure the master(s) to pull SDA to HIGH while they are idle, and then tell one master to start sending data, he will pull SDA low - and you have a short circuit.

So the solution is not to pull SDA to HIGH by any of the ICs, but have it pulled high by a pull-up resistor. Now your ICs only need to pull SDA to LOW to do their work (and the other ICs can sense that), and leave SDA floating otherwise (which will be pulled up by the resistor). This way, no short circuits are possible, as none of the ICs are supplying current to SDA, they only sink the (very small) current supplied through the pull-up to do their signalling.