RobTillaart / PCF8574

Arduino library for PCF8574 - I2C IO expander
MIT License
120 stars 35 forks source link

Question: Pullup for pins #53

Closed hasenradball closed 11 hours ago

hasenradball commented 1 day ago

Hi,

wanted to ask about the pin behaviour of the chip. Can you set a internal pullUp to have a defined state? Or how is it realized?

Frank

RobTillaart commented 1 day ago

Thanks for your question,

From my head, you need to check datasheet for a definitive answer.

There is no explicit internal pull up command otherwise I would have added this long ago.

You can write a 1 to an input pin and then read it back. If the line is floating it will return 1, if connected to GND it will return zero. You should be able to verify this easily.

In my projects I prefer explicit pull up / down as that gives more control over the edges of pulses (think long lines).

Does this answer your question

hasenradball commented 1 day ago

Yes perfekt thank you! 😊