Re: keypad scanner
- From: Ben Bradley <ben_nospam_bradley@xxxxxxxxxxxxxxx>
- Date: Wed, 08 Jun 2005 03:54:59 GMT
On 6 Jun 2005 10:02:19 -0700, "Adrian" <adrianbica@xxxxxxxxx> wrote:
>
>
>Ben Bradley wrote:
>>
>> Or four keys pressed along a diagonal. How does the chip determine
>> which keys are pressed? Without diodes, it appears 16 are pressed.
>>
>
>Are you sure? Can you explain?
Well, it might vary depending on how the output port feels about
having shorted output, but let's assume, both for the simplest
explanation and to prevent hardware damage, that the outputs going to
the key matrix are open-collector (or thesedays, open-drain), meaning
when the processor sets the output state high it can 'float' high or
low, but wnen it's low it's pulled low.
Suppose you have a 4x4 key matrix, and the four horizontal lines
are driven by open-collector outputs, and pulled high by resistors.
The vertical lines go to microcontroller port inputs.
Now that I think about it, I posted too soon...the matrix would
sense diagonally-pressed buttons just fine. I was imagining something
that would short out the whole matrix, and that won't do it.
Quoting the first response
>a) If you use a MATRIX, what are the sense limits on
>multiple key presses ? Start by considering 4 closed keys,
>one in each corner.
Here, if you press any three keys forming three corners of a
rectangle (without diodes), the processor will also "see" the fourth
corner pressed, as the wires to it will have an electical connection
through the other three switches. This is the sort of problem I was
thinking of.
-----
http://mindspring.com/~benbradley
.
- References:
- keypad scanner
- From: praveen . kantharajapura
- Re: keypad scanner
- From: Jim Granville
- Re: keypad scanner
- From: JohnH
- Re: keypad scanner
- From: Ben Bradley
- Re: keypad scanner
- From: Adrian
- keypad scanner
- Prev by Date: Re: simple CLI architecture
- Next by Date: Re: Embedded Systems Programming drops the ball.
- Previous by thread: Re: keypad scanner
- Next by thread: simple CLI architecture
- Index(es):