Skip to content

Do not poll PCF8574/5, just use pin 13 (INT) #294

Open
@rlucassen2

Description

@rlucassen2

I have always found this a very very particular and amazing issue on the internet concerning the I/O expanders PCF8574 and PCF8575: nobody, but really nobody uses the interrupt lines (pin 13) of the PCF I/O expander. The INT is an open collector interrupt line (use a pull-up resistor). When serializing devices (up to 16 devices using the P and AP versions), just put all pin 13 outputs together and wait until INT goes down. When this happens, one or more of the chips detected a change on one or more of its inputs!

Then, start to read the first PCF, the second etc until the INT goes up again, then you have read all new states, the rest is not necessary as there has been no change on these devices (INT isn't pulled down anymore).

I justed installed mqtt-io and I saw python3 consuming up to 5% of CPU power for just nothing. Polling a PCF8574 and PCF8575 24 hours a day is just stupid.

I have no experience in writing python scripts, so I won't be a great contributor, but if anyone can help in realizing this that would be nice!

Richard.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions