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. -Adam "M. Adam Davis" wrote: > > 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