This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

why the i2c lines are open drain

Other Parts Discussed in Thread: ASH

The reason of why the i2c lines are open drain is(please review and correct me if I missed any point)-

I2C is multi-master and multi-slave protocol.If the lines are not open drain then there may chance that one slave pulling the device low and other slave is trying to pull the same line high.This situation is called as the bus contention.

But actually i2c is  open drain configuration, the device can't pull the line high.It can only pull the line low.Whichever slave pull the line low will get control of the bus.

Regards

Ash

  • Hello ASHU,
    You have some of this correct.

    The reason you need bidirectional control is that the data goes from the master to the slave and from the Slave to the Master. For example, the Master sends out a command to a slave and at the end of the command the Slave must pull the SDA line low to show it was received and understood.

    Note I2C is a address based communication protocol, you have bus contention when you have two slaves on the same bus with the same address. The Master controls the control of the bus because it controls both SCL and SDA.
    -Francis Houde
  • hi Francis,

    Thanks for your reply.

    Your statements are true.But How this is related to open drain pins of i2c lines?I want to now the proper answer that why i2c pins are open drain configuration?

    Thanks
    Ash
  • Ash,
    Say for example your Master was driving the bus with a push pull driver. Say it places a high on the bus, which is what happens on I2C bus due to pull ups. This would mean that the output is driven high with an internal p-fet which has a low resistance. If the slave where to try and pull it low with it's internal FET then you would have the two fets fighting each other. Lets assume that the resistance of the Master FET driving high is approximately the same ON resistance of the SLAVE FET driving low. That would mean the bus voltage would be at Vcc/2. This same situation could happen if the SLAVE was driving high and the master went to drive low. This means you wouldn't know who was controlling the bus. Is you use open drain then the master would know when it is driving low and assuming that if it isn't driving it low and they see a low it must be from the slave. Are you understanding what I am trying to get at? Does this make sense to you? I am not sure what a "proper" answer is for you????
    -Francis Houde
  • Hello Ash,
    I am also putting some links to other reading material that might be more useful in understanding why you need an open drain.
    www.ti.com/.../slva704.pdf
    -Francis Houde