chips that can scan a matrix of buttons


I heard there are chips that can scan a matrix of buttons, or chips that send you an interrupt, if one of the buttons is pressed (so you don't have to constantly poll the button states).

can someone recommend those kind of chip?

PCF8574 Remote 8-Bit I/O Expander for I2C Bus

The PCF8574 device provides an open-drain output (INT) that can be connected to the interrupt input of a microcontroller. An interrupt is generated by any rising or falling edge of the port inputs in the input mode.

  • Scotty

The 74C922 or 74C923 will do the job, anyway, these are old parts, only useful if you have a real matrix, otherwise and I/O expander like the one one already suggested it's a better choice.

Ciao, Ale.

I would not use the PCF8574 these days, it is expensive and lacking in functions if you just want digital inputs. It will not give an output if any one input changes.

I would use the MCP23S17, it is a port expander that gives you 16 input / output pins and has an output that changes when any of a set of software definable inputs change, so you only need to monitor one digital pin on the Arduino. You can use 8 of these chips without resorting to any tricks and an unlimited number of chips if you resort to some simple tricks. All the change outputs can be combined into one Arduino input if required.

To implement a scanning matrix however you have to drive the output pins separately. Scanning matrix chips are by now mainly obsolete.

You can use Keypad.h to scan your matrix if you add some diodes to create an interrupt when a button is pressed. That's what I do on this RF remote - button press wakes it up, Keypad.h scans, sends the keypress info, and processor goes back to sleep. |500x459