keypad controller

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi all,

I want to implement a 6x6 matrix keypad controller in hardware which
should be able to detect multiple key presses.
Can anybody suggets how to go about this.

Regards,
Praveen


Re: keypad controller
Hi all,

I want to implement a 6x6 matrix keypad controller in hardware which
should be able to detect multiple key presses.
Can anybody suggest how to go about this??

Regards,
Praveen


Re: keypad controller
Quoted text here. Click to load it

By "multiple" do you mean simultaneous key presses, or just a memory of
sequence of several key presses?

        
This message was sent using the comp.arch.embedded web interface o
www.EmbeddedRelated.com

Re: keypad controller

Quoted text here. Click to load it

Sounds like a standard matrix to me. This is a link to a diode rom circuit.
The only difference is that you don't burn out the diodes but put a keypad
switch in series with them.
http://www.electronics.dit.ie/staff/tscarff/memory/rom.htm


Peter




Re: keypad controller
Hi you,

Quoted text here. Click to load it

if you mean more than one key pressed same time, you could use this.
(Please expand to 6x6 matrix). Set the Y-lines to high, only one at same
time, and read the X-lines to get the pressed key(s) in this row.

       Y0 o          Y1 o          Y2 o          Y3 o
          |   T         |   T         |   T         |   T
          |  ---        |  ---        |  ---        |  ---
          o--o o-->|--. o--o o-->|--. o--o o-->|--. o--o o-->|--.
          |           | |           | |           | |           |
   X0 o---)-----------o-)-----------o-)-----------o-)-----------o-
          |   T         |   T         |   T         |   T
          |  ---        |  ---        |  ---        |  ---
          o--o o-->|--. o--o o-->|--. o--o o-->|--. o--o o-->|--.
          |           | |           | |           | |           |
   X1 o---)-----------o-)-----------o-)-----------o-)-----------o-
          |   T         |   T         |   T         |   T
          |  ---        |  ---        |  ---        |  ---
          o--o o-->|--. o--o o-->|--. o--o o-->|--. o--o o-->|--.
          |           | |           | |           | |           |
   X2 o---)-----------o-)-----------o-)-----------o-)-----------o-
          |   T         |   T         |   T         |   T
          |  ---        |  ---        |  ---        |  ---
          o--o o-->|--. o--o o-->|--. o--o o-->|--. o--o o-->|--.
          |           | |           | |           | |           |
   X3 o---)-----------o-)-----------o-)-----------o-)-----------o-
          |             |             |             |
          |             |             |             |
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

HTH
Michael


Re: keypad controller
On Tue, 31 May 2005 19:23:31 +0200, the renowned Michael Lange

Quoted text here. Click to load it



Perhaps obvious, but you do need some pull-down resistors on the X
lines. Less obviously, there is an RC time constant between the stray
capacitance and the resistors you choose (when the line is going low),
so you might want to have the processor twiddle its thumbs for enough
time to let the voltage settle. Maybe a microsecond or so with 10K
(assuming short connections), proportionally longer with higher
resistances.


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: keypad controller
Hi,

Quoted text here. Click to load it

that's totally correct. Thanks.

Michael


Re: keypad controller

I am implementing the Keypad scanner in an FPGA , how will i go about
the design of multiple key presses.
Spehro Pefhany wrote:
Quoted text here. Click to load it


Re: keypad controller


Quoted text here. Click to load it

By scanning all the lines and using shifting registers.
How are you going to debounce the signals?
That would be much simpler to use a 6I6O microcontroler.

Quoted text here. Click to load it


Re: keypad controller
Quoted text here. Click to load it

Do what the PS/2 keyboard does. Use keycodes to indicate key
transistions, eg. 0xFF01 for keypress and 0xF001 for key release. Buffer
these codes in the FPGA using a FIFO. Let the firmware figure out how to
use these codes for its purposes.

Some FPGA ideas...
  - use two flip-flops in series and an XOR to capture the transistion
  - Generate logic to create the keypress and keyrelease codes, then
place the code into the FIFO. Generate unique codes for each key (0x00 -
0x0F for the keypad below) and place these into the FIFO after the
transistion code.
  - Use an arbiter to prevent key collisions.
  - Use a slow scanrate (10ms per row?) to prevent keybounce problems.

Hope this helps,

  - Richard


Quoted text here. Click to load it

Re: keypad controller
Quoted text here. Click to load it

A few years ago there was a discussion of key matrices that
dispensed with diodes and that could detect various things, such as
multiple keys down, rollover, etc.  I have lost what I saved, but I
recall that the cost was the full intersection range of the key
positions.  I.e. a 4x4 matrix could handle, say, 10 keys in place
of 16.  I think the discussion was right here on c.a.e.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: keypad controller

Quoted text here. Click to load it

Have a look at:
http://www.freescale.com/files/32bit/doc/app_note/MC68EZ328KEYPAD.pdf

5 lines can hanlde a 4 x 4 matrix
6 lines can handle a 5 x 5 matrix
7 lines can handle a 6 x 6 matrix
etc.

I made a full 4 row querty keyboard using this scheme and it does
work.

Alan


--
++++++++++++++++++++++++++++++++++++++++++
Jenal Communications
We've slightly trimmed the long signature. Click to see the full one.
Re: keypad controller
Quoted text here. Click to load it
... snip ...
Quoted text here. Click to load it

That's the sort of thing.  There was a better discussion and/or
refs than that app-note, IIRC.  It also developed the generic rules
and penalties for configurations.

--
 Some informative links:
   news:news.announce.newusers
We've slightly trimmed the long signature. Click to see the full one.
Re: keypad controller

Quoted text here. Click to load it

In that example, it appears:

I/O      Usable   Required  Required
Pins    Switches   Diodes   Resistors

 3          4         4         4
 4          9         6         6
 5         16         8         8
 6         25        10        10

Half the diodes are used as a wire-OR configuration.

It will work okay with n-keys, _up to a point_.  The keys along the
diagonal can only be detected if they are the only key pressed,
because their feedback is returned to the current scan line, where it
cannot be detected (read back.)  The way they are detected, despite
this problem, is only because of the wire-OR providing feedback, too.
But that only provides a unique indication if no other keys are being
pressed at the time.

So, if you eliminate the diagonal keys (reducing from 16 to 12, or
from 25 to 20, etc.), then n-keys can be detected.

Jon

Re: keypad controller
On Thu, 02 Jun 2005 17:01:10 GMT, Jonathan Kirwan

Quoted text here. Click to load it
I actually have a product which uses 20 keys in a 5 x 5 matrix with
the diagonal keys eliminated.  It makes it easier to detect (or rather
ignore) the diagonal keys.

Also I don't require roll-over for this unit. In fact two keys pressed
together usually means an error condition - so ignore/alarm (except on
power up when holding two specific keys down together puts the unit
into programming mode).

Alan

--
++++++++++++++++++++++++++++++++++++++++++
Jenal Communications
We've slightly trimmed the long signature. Click to see the full one.
Re: keypad controller

Quoted text here. Click to load it


Indeed.  I just thought it might not be entirely clear from the PDF
file you pointed at and was worth bringing to the surface in the clear
light of day.  Particularly since the OP was talking about "multiple
key presses."

Quoted text here. Click to load it

Well, the OP was talking about that feature in particular.  So it
doesn't hurt to point out the boundaries/limitations of the indicated
solution.  (And the PDF did a poor job of explaining the reasoning
behind the design, in my opinion, so this aspect wasn't particularly
clear to an inexperienced eye.)

But since you've brought up your case, one can design such features as
you probably needed using only four I/O lines instead of 5 for all 20
keys.  Including detecting special key pairs.  Speaking minimally.

Jon

Re: keypad controller
On Fri, 03 Jun 2005 03:37:48 GMT, Jonathan Kirwan

Quoted text here. Click to load it
Agreed - that's why I specifically noted that I ignore the diagonals,
but well worth highlghting for the OP.

Quoted text here. Click to load it

Agreed again.  There are many different ways to skin a cat (as they
say).  This one worked for me in this instance.  Other times I have
just used enough I/O pins as required for one per row and one per
column (usually 3 x 4 keypads).  I NEVER scan them continuously
though, like some people seem to do automatically, I always wait for a
keypress then scan.

Alan


--
++++++++++++++++++++++++++++++++++++++++++
Jenal Communications
We've slightly trimmed the long signature. Click to see the full one.
Re: keypad controller

Quoted text here. Click to load it

I must have missed the fact that you pointed it out in your first post
on the matter.

Jon

Site Timeline