Push button connecting multiple inputs

Thread Starter


Joined May 26, 2022
I'm attempting to make something like a keypad for a microcontroller, but instead of using a key matrix I've decided to have each key press generate a specific binary code by creating a connection between Vcc and specific output wires. For example, if I wanted the "E" key to correspond to the code 000101, then the "E" button would create a connection between Vcc and output wires 0 and 2. This leads to my question: do push buttons that create connections between multiple wires like this exist? My online searches have been completely unsuccessful. Perhaps there's a simple way of doing this without them that I'm completely missing.

I know for this specific application I could use a simple SPST push button switch with one terminal connected to Vcc and the other connected to diodes connecting to the outputs, but I really don't want to have to connect diodes to every connection of every key (about 100 diodes and an absolute mess on a breadboard). Also I feel like such a simple component has to exist. I'm almost tempted to make all the buttons myself.


Joined Jan 23, 2018
Diodes are used because they are the simplest effective method of producing codes. One alternative that I have seen is a ROM created by threading wires through magnetic memory cores. That is bigger than the diode arrays and it interfaces with IC devices no longer available
If you create your own multicontact buttons, know that all the contacts must close at the same time.
You could also use an E-Prom IC, which is much less flexible, limited to either 8 or 16 inputs, must be programmed, costs more, and is larger than the diode array.