Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3576

General • Latching an "interrupt"

$
0
0
Hi all,

So in my current project I'm going to use an MCP2307 I2C I/O expander to control some outputs and inputs (buttons), as most of the I/O on the Pico 2 is currently in use. What I'd like to do is to program the MCP so that it generates an interrupt on pressing one of the buttons, then I can do a read to find out which was pressed.

However at the Pico end what I ideally want to do is not to trigger an immediate interrupt, but to latch the line change somehow, so that I can then poll for it in my main program loop, and if set clear it and then poll the MCP.

Is this do able?

Cheers.

Phill.

Statistics: Posted by PhillHS — Thu Sep 26, 2024 6:35 pm — Replies 2 — Views 57



Viewing all articles
Browse latest Browse all 3576

Trending Articles