Searching \ for '[OT] Simultaneous keypress detection (was: XY posi' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=posi
Search entire site for: 'Simultaneous keypress detection (was: XY posi'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Simultaneous keypress detection (was: XY posi'
2000\02\23@134707 by adavis

flavicon
face
Wagner Lipnharski wrote:
>
> Again, obstructing light in a matrix beam system doesn't work for
> multiple objects. is just like to use two switches per key in a matrix
> system, one switch interrupts the rows line another interrupt the
> columns, you would never know where are two or more objects.  Except if
> all objects are in the same row or the same column.

I can see how the laser system would have some difficulty with two objects
placed just right, but matrix keypads don't have that bad of a limitation:

You can detect at least two objects on a matrix system, such as a keypad.  If
you have more than two then there are positions which would obscure the
readings.

I'll use R and C for row and column, and assume the software sweeps the columns
in order.
we'll take a 4x4 matrix as an example.  There are three possibilites with two
simultaneous buttons: Two buttons in one row, two buttons in one column, buttons
have seperate rows and columns

 1 2 3 4
1 X X O O
2 O O O O
3 O O O O
4 O O O O
Software sees the following:
C1 returns R1
C2 returns R1
C3 returns nothing
C4 returns nothing

 1 2 3 4
1 X O O O
2 X O O O
3 O O O O
4 O O O O
Software sees the following:
C1 returns R1 & R2
C2 returns nothing
C3 returns nothing
C4 returns nothing

 1 2 3 4
1 X O O O
2 O X O O
3 O O O O
4 O O O O
Software sees the following:
C1 returns R1
C2 returns R2
C3 returns nothing
C4 returns nothing

These three cases cover every possible combination of two keys on one flat
matrix.  In all cases the software can easily determine which keys were pressed.

Three button presses causes problems if the matrix doesn't have diodes:
 1 2 3 4
1 X O O O
2 X X O O
3 O O O O
4 O O O O
Software sees the following:
C1 returns R1 & R2
C2 returns R1 & R2 (this is because the current flows through C1:R2 and is seen
on R1 through C1)
C3 returns nothing
C4 returns nothing

This can be ameliorated with careful key planning (ie, each key in a seperate
row or each in a seperate column) or through the use of diodes on each key.

With a laser system, though, the problem is that you can't select a row at a
time.

-Adam

"I have nothing against work, especially when it is performed quietly and
unobtrusively by someone else" - Barbara Ehrenreich

2000\02\23@150754 by paulb

flavicon
face
M. Adam Davis wrote:

> You can detect at least two objects on a matrix system, such as a
> keypad.  If you have more than two then there are positions which
> would obscure the readings.

 This is why the algorithms for doing so are generally categorised as
"No Rollover" (any 2 columns or 2 rows detected are regarded as invalid
and locked out until all released), "1-key rollover" (as before except
that second key will be detected when first released), "2-key rollover"
(second key will be detected as soon as pressed, more may be if
favourably placed) or "N-key rollover" (any number of presses detected,
including "phantom" fourth if diodes not present in matrix).

> With a laser system, though, the problem is that you can't select a
> row at a time.

 Unless you scan them of course...

> I should put a caveat here.  When testing a column, all other columns
> should be inputs.  If you drive the other columns low, and the one
> column high, then two buttons could cause you to short through the
> keypad.

 Certainly.  Quality keyboards have the diodes, or something
equivalent.  Whether the cheap ones are "2-key" or "N-Key" (with a
"phantom" problem which you just don't notice too often) I've never got
too keen to find out.
--
 Cheers,
       Paul B.

2000\02\24@143600 by Rich Leggitt

picon face
Hi guys, the phantom key occurs only when three keys are pressed, such
that two are in the same column and two in the same row, ie they form the
corners of a square, the phantom will be in the fourth corner. To detect,
simply AND all possible combinations of two rows, any result with more
than 1 bit indicates a phantom and the scan should be discarded.

-- Rich

On Thu, 24 Feb 2000, Paul B. Webster VK2BZC wrote:

{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...