PCF pcf8574 - software interrupts?

I have a remote PCB with PCF8574 connected via I2C (3 wires) to the Arduino controller.
The PCF8574's pins are configured as Inputs (push buttons) or outputs (LEDs) - all working properly.

At this stage, the Arduino is polling the push buttons as part of the main loop.
I would like to consider adding interrupt, to save some CPU time.
I know I can connect the PCF8574's INT pin (13), yet this will require to wire another line in addition to the SDA, SCL, GND.

Is there a way for the PCF8574 to send an I2C message to the arduino every time the value on the input pin is changing? Which will trigger an interrupt? This kind of "software" interrupt will save the another wire.

the PCF8574 datasheet show that it has a interrupt output which becomes active when an input pin changes state. it can generate an interrupt to the Arduino which can then poll the device to determine which input changed

1 Like

Not spontaneous, either the interrupt line js wired, or the chip gets polled.

I know about the INT signal, as I mentioned in my post.
This will force me adding another wire, which I prefer not too.

My question is about software solution: perhaps the PCF8574 can send an I2C interrupt message to the Arduino master via the regular 3 wires I2C.
I couldn't locate such thing in the spec.

Because the processor clocks the data into and out of the chip, what you want isn't possible. If it was, there wouldn't be a need for the interrupt line.

1 Like

Thanks you. In this case I will add the INT wire, and from now on design the PCBs with 4 I2C wires instead of 3.

Indeed.

@yigalb The big idea is that I2C slaves cannot generate and transmit messages to the master by themsleves, they can only respond to requests.

a7

1 Like

Thanks, got it. Still it is a nice and easy serial protocol.

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