Page 1 of 1
how to connect keypad?
Posted: Fri Jun 24, 2011 10:20 am
by geetansh
i have to interface a keypad (12 button keypad,image attached below) with pic16f877a,can anyone tell me how to make connections with the help of a schematic etc.
from left to right is: No connection Column 1 Row 0 Column 0 Row 3 Column 2 Row 2 Row 1 No connection
Re: how to connect keypad?
Posted: Fri Jun 24, 2011 10:24 am
by Benj
Hello,
The last page of this datasheet contains the schematic you need.
http://www.matrixmultimedia.com/resourc ... .php?id=89
Re: how to connect keypad?
Posted: Fri Jun 24, 2011 12:32 pm
by geetansh
all pins of keypad will be connected to microcontroller??? none of them to +5v???
and can u plz tell me how it works,i saw in flowcode that keypad returns 255 when not pressed and it sends a different no. when a no. is pressed but i am not able to understand how the micro figures out which key is pressed?
Re: how to connect keypad?
Posted: Fri Jun 24, 2011 12:59 pm
by Benj
Hello,
No there are no connections to +5V.
The Flowcode component macro basically does a raster scan of the keypad a column at a time.
One column is pulled high and each row is then sampled to see if any of the switches in that column are pressed. This technique is then repeated for each column.
Once we know if and which switch is pressed we use a look up table to substitute for a value either in ASCII or numeric format.