When I needed to manage over 20+ switches in one of my electronic projects, I opted for resistor networks instead of the row-column method for reading the switches You can read the complete article here.
The res values.png
file is from this link.
The sample_output.txt
is the output result for a 4x5 keypad, and the table you see in the file is calculations for the resistor values based on the image matrix.png
(The image itself is for a 4x4 keypad). As you see the final ADC gap for this type of keypad is 25.