Using pin declaration with INPUT_PULLUP when working with PCF8574 expander

The laibrary allows following pin declaration when working with PCF8574

pcf8574.pinMode(P2, INPUT_PULLUP);

For me that would indicate existance of built in pullup resistors in PCF8574 chip and I believe that is not the case.

Someone hinted to me that if I declare expander pin this way the internal pullup resistors of Arduino I2C pins is used. But what if I declare all 8 pins on the expande this way.
Can someone clarify this to me.

Please give a link to that library. The PCF8574 Arduino library has no method pinMode().

If you read the related documentation then you'll find:

When using the pins as inputs, the pins are set to HIGH by the MCU, which turns on a weak 100 uA internal pull-up to Vcc.

There is no difference between INPUT and INPUT_PULLUP. The pin is open drain with a pullup current source.

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