log2(n)
n
being the number of buttons. I had another approach to use a grid of buttons where pressing a button lets power flow through its row and column so you can get an X,Y position(see drawing from second post). That method would have the # of output pins of sqrt(n)*2
. When I graphed the first two strategies the binary encoder one came out to have less output pins.
Today's stuff:
As I went to start designing the part today I learned there are no 40 input binary encoders, so that got me thinking of alternatives. After thinking for a while I thought, "What if you put binary encoders on the end of the grid method, that should have a # of output pins of log2(sqrt(n)*2)
, surely that should result in fewer output pins, right?" Well I graphed it and it actually resulted in less output pins(see image below). Tomorrow I plan on creating a schematic for the button pad with real parts. Here is the graph where I graphed the different methods.