0
\$\begingroup\$

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?

\$\endgroup\$
1
\$\begingroup\$

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

|improve this answer|||||
\$\endgroup\$
1
\$\begingroup\$

If you have 10 multimaster capable masters on the bus, for example it might happen that all 10 send start condition at the same time and they all think they got the bus for themselves. Later on if a collision happens than some master sends a 0 bit and another sends 1 bit, they can detect that someone else is using the bus and can back off.

Connecting two push pull outputs is wrong because if one output pulls high and another pulls low at the same time then a large current can flow and voltage can be indeterminate as it is halfway between high and low. Therefore I2C defines a physical interface with open drain outputs, so as no chip can push high by definition so there is no problem. This is because even in single master configuration, at least the data wire is bidirectional, and sometimes the clock wire is also bidirectional so slave chips can slow down bit level or byte level communications.

|improve this answer|||||
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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