How a matrix keypad works?

Thread Starter


Joined Dec 4, 2007
Hi, is there anyone know how a matrix keypad works? i need it for my project. But , i don't how it's works. any website i can refer to?
btw, i need to study on PCB routing for a 8 layers board. Is there any useful resources i can refer to when do routing? any recommended e-books about pcb routing method?

thanks for your help. :p


Joined Apr 22, 2007
A keypad Matrix (that is i suppose a HEX matrix, with 16 pushbuttons) works a little like a transistor memory exept for it uses fisical switches istead of transistors:
It has 4 input lines, imagine four wires running vertically, and four output lines running across the first. If some of the crossings is pressed, it's wires are shortcut. e.g.:
Call the horizontal wires A0 to A3 and the vertical wires B0 to B3
the matrix of connections is like this:

A0B0 A0B1 A0B2 A0B3
A1B0 A1B1 A1B2 A1B3
A2B0 A2B1 A2B2 A2B3
A3B0 A3B1 A3B2 A3B3

then you cycle the input lines high (use a counter for example) and for each input line you read the output lines. The point where high lines cross indicates a pushed button. If you pull B1 High (and the others low) if some key is pressed the voltage is transferred to the corresponding row wire, so if you get A1 and A3 high as output you know that the buttons (A1B1) and (A3B1) are pressed.

As for the routing, i haven't got the slightest idea, i hate routing with all my heart!