18.11.2014 Views

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

The Microcontroller Idea Book - Jan Axelson's Lakeview Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7<br />

Figure 7-7. A matrix-encoded keypad.<br />

style keypads are widely available and versatile, since they have all 10 digits plus two keys<br />

(* and #) that you can designate for special functions.<br />

Decoding Unfamiliar Keypads<br />

You can find surplus keypads for a dollar or so each. <strong>The</strong>se usually include no explanation<br />

of their pin connections, so it’s up to you to figure out how to decode them.<br />

To decode an unknown keypad, you need only an ohmmeter and a pencil and paper to record<br />

your findings. To determine the key connections one by one, begin by clipping an ohmmeter<br />

lead to one of the keypad’s connector pins. Set the ohmmeter to a low scale, such as 200<br />

ohms.<br />

Press a key and hold it down while touching the other ohmmeter lead to each of the remaining<br />

keypad pins in turn. When the ohmmeter reads a few ohms or less, you’ve found the pins<br />

that correspond to the key in question. If you find no connection, move the first ohmmeter<br />

lead to a different pin and repeat the procedure. When you find the two pins that connect,<br />

write down their numbers and the key they correspond to.<br />

Follow the same procedure for the other keys. As you progress, you may detect a pattern<br />

that makes it easier to guess which pins will correspond to each keypress. Some keypads<br />

don’t seem to correspond to any obvious layout, however. When you know how the keypad<br />

decodes, you can wire the connections and write your programs to match.<br />

118 <strong>The</strong> <strong>Microcontroller</strong> <strong>Idea</strong> <strong>Book</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!