Are the I2C (PC5 and PC4) on the Arduino UNO open drain?

I have read somewhere that all the digital GPIO pins on the Arduino are of the Push-Pull type. However the I2C communication protocol requires BOTH slave and master devices to have an open drain/collector configuration in order to pull the I2C bus lines down to LOW and never HIGH. Does this mean that the pins PC4 and PC5 are configured in open drain while all the others are push-pull?

The pins change their behaviour. Pin A4 and A5 are completely normal analog input pins, and also normal digital input and output pins and can also be set as I2C pins.
The I2C mode does more, it adds a filter to incoming data and a slew-rate limiter to outgoing data.

The analog circuit is a different circuit. That means you can measure the analog value of SDA and SCL while the pins are in I2C mode.

In order to pull the lines down and never to HIGH, it is not necessary that they be open drain.
In arduino this is achieved by switching pins from LOW to Z-state with internal or external pullup.

If you're asking a question, how can this be a tutorial?

I2C requires the master to provide the clock signal so the master SCL signal cannot be from an open drain since it must drive the clock line.

Even on the clock line the high state is created by the pullup resistors. The slave can hold down the clock line to delay the clock.

Simple answer is that @20nik00 posted in totally the wrong section, and didn't read the description of the section he / she posted in.

I have moved this to a better place.

Wrong. The clock signal is generated by pulling the clock line low. Don't forget the I2C bus needs a pull-up resistor on both signals.

Correct. The technician term for this is a wired OR.

3 Likes

I understand. Thank you.

The Wire library also enables internal (weak) pull up,
which can be disabled, if needed, just after wire.begin.
Leo..

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.