C
Costas Vlachos
goose said:Hello all
I have a microntroller connected to a keypad. It only
reliably works when I use a resistor to ground on each
pin on the uC that connects to the pins on the keypad.
the keypad works as follows:
1. 3 pins are connected to each column.
2. 4 pins are connected to each row.
3. 1 pin seems to be bridged to everything.
[1] & [2] above is expected for a matrix keypad.
[3] supplys power (+5v).
I supply +5v to the power pin of the keypad, and
read the other 7 pins. when any key is pressed,
a pin for the column and a pin for the row goes
high.
each pin is wired as follows:
uC pin ---------+----------- keypad pin
|
|
R1
|
|
gnd
my question is what resistor should I choose for R1?
As I understand it, the smaller the resistance, the
greater the leakage current, no? I initially intended
to use 4,7k resistors (which is what I tested with),
but I now suspect that I should choose a larger
resistor (a coupe of mega ohms?).
From your description it looks like this is some sort of active keyboard
which requires a power supply and directly provides row/column signals which
you can read using the uC. If that's the case, then it looks like it needs
pull-down resistors to work. 4.7k or 10k should be fine. Don't use megaohm
resistors as they may not be able to pull the pins to ground hard enough.
Also, since you're posting to s.e.b, I have to ask: Are you sure the
keyboard works in the way you describe? Normally in matrix keyboards you
*send* signals to the columns (or rows) and *read* the rows (or columns) to
determine the key pressed. You don't directly read all 7 pins.
cheers,
Costas