Pages created and updated by Terry Sturtevant Date Posted: May 12, 2017


Keypads

A keypad provides an easy input device to a digital circuit. It consists of several switches, one under each key, which have one of their two poles in common.
Here are two similar keypads:

hex keypad

back of hex keypad

hex keypad

back of hex keypad

Note that on the back, you can see one pin that does not have a trace going from it. This is the common pin.


The pins for the keypad aren't connected in numerical order. You can see which pin goes with which key by looking at the bottom of the keypad. (If you look for the pin with no visible connection to a key, you can find the common pin.)

Because the side-by-side image is reversed left-to-right when it's upside down, it may be easier to figure out in the following diagram:

keypad alternate top and bottom view

Here's how the pin connections go, looking from the top:

keypad pin map

The common pin has the circle drawn on it.
(Note that A and E don't follow the normal pattern.)

Active high inputs

To use a key to send a HIGH (1) signal, one must connect the common pin to 5 volt supply and put a resistor to ground from each of the other pins, as with the DIP switch package. Using 16 individual resistors to do this it would be rather tedious, so we will once again use the resistor arrays. The particular resistor array which we will use has several resistors in it which all have one end in common.
Since the common pin for the keypad is sort of in the middle, note that the resistor array on the left has to have its common pin on the left, while the resistor array on the right has to have its common pin on the right.

keypad for active high output

Active low inputs

In some cases you will be using the keypad for input to devices which use active low inputs. This means that you will want a key pressed to give a low output on the corresponding line. To do this, simply switch the common connections of the keypad and resistor array mentioned above. This means you will connect the common pin of the keypad to ground and the resistor array to Vcc (+5V).



keypad for active low output

The actual resistor value isn't critical; anything between about 100 Ω and 1 k Ω should work. If the resistors get too large, then the circuit will stop working; if the resistors get too small, there will be excessive current drawn from the circuit. Ideally you want to choose a large value that works consistently.

Resources

To view pdf documents, you can download Adobe Acrobat Reader .
get Acrobat Reader
If you need to update a browser, you might try Firefox which is Get Firefox!
Since this page uses cascading style sheets for its layout, it will look best with a browser which supports the specifications as fully as possible.

If you are looking for an office package, with a word processor, spreadsheet, etc., you might try LibreOffice which is Get LibreOffice!

Go to the main page for the Department of Physics and Computer Science.

Valid XHTML 1.1

Valid CSS!

WCAG 2.0
(Level AA)

Wilfrid Laurier University