Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

why I2C communication pull up resistor needed?

Status
Not open for further replies.

praveen4u83

Newbie level 2
Joined
Apr 11, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore
Activity points
1,301
My question:

Why open drain PINS are used for I2C communication. Why not normal I/O pins are used for I2C communication.
 

Both SCL and SDA lines are "open drain" drivers. What this means is that the chip can drive its output low, but it cannot drive it high. For the line to be able to go high you must provide pull-up resistors to the 5v supply.

Using the I2C Bus
https://www.robot-electronics.co.uk/acatalog/I2C_Tutorial.html
 

Both SCL and SDA lines are "open drain" drivers. What this means is that the chip can drive its output low, but it cannot drive it high. For the line to be able to go high you must provide pull-up resistors to the 5v supply.

Using the I2C Bus
https://www.robot-electronics.co.uk/acatalog/I2C_Tutorial.html


Thank you for the reply.I understand about open drain pins.My question is why open drain pins are used for I2C communication,why cant normal I/O pins used for I2C communication.If we use normal I/O pins pull ups are not required right,controller can make it high or low.
 


Thank you for the reply.I understand about open drain pins.My question is why open drain pins are used for I2C communication,why cant normal I/O pins used for I2C communication.If we use normal I/O pins pull ups are not required right,controller can make it high or low.

The SDA pin of all devices are connected together on the bus. Ths use of 'normal i/o' could lead to short circuit if one device drives high and another drives low.
With open drain, multiple output can be connected together.
 

I understand about open drain pins.My question is why open drain pins are used for I2C communication,why cant normal I/O pins used for I2C communication.
Apparently you do not understand. Open drain drivers are required by design of the protocol.

If we use normal I/O pins pull ups are not required.
If you use normal (push-pull) I/O-pins, the I2C bus doesn't work, at least for SDA. SCL can be push-pull driven by the master under certain prerequisites.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
Apparently you do not understand. Open drain drivers are required by design of the protocol.


If you use normal (push-pull) I/O-pins, the I2C bus doesn't work, at least for SDA. SCL can be push-pull driven by the master under certain prerequisites.

but why big-banging works for GPIO (normal I/O pins) ?

please take a look at this link:

https://en.wikipedia.org/wiki/Bit_banging
 

but why big-banging works for GPIO (normal I/O pins) ?
Did you notice that all usual processor GPIO pins can be operated as open drain output? That's what we do in a "bit-banging" I2C interface.

The dedicated I2C pins of most processors are also general IO pins, by the way.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
Did you notice that all usual processor GPIO pins can be operated as open drain output? That's what we do in a "bit-banging" I2C interface.

The dedicated I2C pins of most processors are also general IO pins, by the way.

do you mean normal (push-pull) I/O-pins and GPIO are not the same?


Regards,
Chinlin
 

GPIO are capable of push-pull operation but not restricted to it. For the details, you should refer to specific processor hardware documentation.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
GPIO are capable of push-pull operation but not restricted to it. For the details, you should refer to specific processor hardware documentation.

sorry! my confuse is as on this statement "If you use normal (push-pull) I/O-pins, the I2C bus doesn't work".
Is GPIO pin normal I/O pins? If yes, by this statement, the I2C bus doesn't work?

Thanks
 

The term "normal I/O pin" has been introduced by the OP, he also associated it with driving "high or low", in other words push-pull operation. So besides all ambiguousities of terms, the question is rather clear and has been clearly answered by several contributors.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
The term "normal I/O pin" has been introduced by the OP, he also associated it with driving "high or low", in other words push-pull operation. So besides all ambiguousities of terms, the question is rather clear and has been clearly answered by several contributors.

Can you help to post where I can find the discussion?
It seems a bit confuse on the term definition "normal I/O", "general I/O" with/or without open drain support.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top