Is it possible to read a 10 by 10 switch matrix with 8 by 8 I/O pins?
I would do something like this:







simulate this circuit &ndash; Schematic created using CircuitLab

I use 7 of the outputs and 8 of the inputs to create a matrix of 56 crosspoints, and I put two switches at each crosspoint, for a total of 112 switches. The 8th output is used to control a set of pullup/pulldown resistors for the inputs.

Scan the array twice. The first time, set Out7 low, and pulse the other outputs high one at a time. Look for any inputs going high. This tells you whether the lower switch at each crosspoint is closed.

The second time, set Out7 high, and pulse the other outputs low one at a time. Look for any inputs going low. This tells you whether the upper switch at each crosspoint is closed.