I'm developing a solution based on a custom fitness mat that uses two (big) "push buttons" to sense the user steps, count them and send them to a PC via USB link. I'm using the MSP430F5529 and programed interrupts to trigger the counters for each button so that at the end of a dance routine lasting about 6 minutes, I have the number of steps given on the mat.
I need to be able to use 300 of these mats SIMULTANEOUSLY (for massive events) and show in real time on a big screen the steps given each and every one of the participants in a 20x15 table, so that they can compete.
The solution I have working is not feasible under those circumstances, because it would require 300 USB cables and ports.
First I thought on creating a keyboard-like matrix with the 600 buttons, so that each pair of buttons belonged to a mat, and then wait for an interrupt to occur, call a software debounce routine, and then scan the whole array to find the button pressed.
There are a couple of problems with this approach:
1. There is at least one moment (either at the beginning, the end or even both) where the 600 buttons might all be pressed at the same time. With 20ms of debouncing time I could not handle all of the interrupts and they might nest until the heap was full.
2. The wiring required for the solution would be a lot: 20 cols + 30 rows = 50 I/O ports
Then I thought on creating smaller solutions, i.e. one for each of the 20 columns having only 30 buttons to handle. The problem would be that in this case I would need 15 USB links to take all of the information to the central PC, or I would need a protocol to connect the 15 rows and then have one send the accumulated data to the screen. But I don't know if this could be done in real time.