As part of a project, I'd like to test the correct operation of a set of SPST switch ICs (maybe 8 or 16 or so). Each device contains six independent switches, and they are controlled through an SPI bus. I plan to operate the switches at around 10 or 20 kHz. I'm thinking of using an inexpensive microcontroller (mabye an Arduino MEGA) to exercise the switches and count the number of times they're switching.
I think I could use the Arduino's 16-bit Timer/Counters, clocked externally by the switches under test, to count how many switch cycles are actually occurring. However, most MCUs have a limited number of timer/counter peripherals. The ATmega2560 in the Arduino MEGA has four 16-bit timers, for example (assuming I can use them all).
As I'm monitoring more than four switches (we could be looking at something like 50 individual switches to be monitored across 16 devices, say), I need another solution. This may be a shopping question, and I might just need the name of what I'm looking for, but are there multi-channel event counter ICs that can operate independently, with internal registers or memory to store the counts on each channel and perhaps raise an interrupt when some count is reached or they overflow? Thanks!