EmbeddedRelated.com
Forums

keypad controller

Started by Unknown May 31, 2005
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

>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 > >
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
<praveen.kantharajapura@gmail.com> wrote in message 
news:1117536016.887828.186350@g14g2000cwa.googlegroups.com...
> 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 >
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
Hi you,

> 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??
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
On Tue, 31 May 2005 19:23:31 +0200, the renowned Michael Lange
<leckmich@despammed.com> wrote:

>Hi you, > >> 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?? > >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- > | | | | > | | | |
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" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Michael Lange wrote:
> >> I want to implement a 6x6 matrix keypad controller in hardware >> which should be able to detect multiple key presses. > > 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)
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 "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
Hi,

> Perhaps obvious, but you do need some pull-down resistors on the X > lines.
that's totally correct. Thanks. Michael
On Wed, 01 Jun 2005 05:39:08 GMT, CBFalconer <cbfalconer@yahoo.com>
wrote:

>Michael Lange wrote: >> >>> I want to implement a 6x6 matrix keypad controller in hardware >>> which should be able to detect multiple key presses. >> >> 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) > >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.
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 Manufacturers and Suppliers of HF Selcall P O Box 1108, Morley, WA, 6943 Tel: +61 8 9370 5533 Fax +61 8 9467 6146 Web Site: http://www.jenal.com Contact: http://www.jenal.com/?p=1 ++++++++++++++++++++++++++++++++++++++++++
I am implementing the Keypad scanner in an FPGA , how will i go about
the design of multiple key presses.
Spehro Pefhany wrote:
> On Tue, 31 May 2005 19:23:31 +0200, the renowned Michael Lange > <leckmich@despammed.com> wrote: > > >Hi you, > > > >> 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?? > > > >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- > > | | | | > > | | | | > > > > 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" > speff@interlog.com Info for manufacturers: http://www.trexon.com > Embedded software/hardware/analog Info for designers: http://www.speff.com

praveen.kantharajapura@gmail.com wrote:
> I am implementing the Keypad scanner in an FPGA , how will i go about > the design of multiple key presses.
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.
> Spehro Pefhany wrote: > > On Tue, 31 May 2005 19:23:31 +0200, the renowned Michael Lange > > <leckmich@despammed.com> wrote: > > > > >Hi you, > > > > > >> 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?? > > > > > >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- > > > | | | | > > > | | | | > > > > > > > > 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" > > speff@interlog.com Info for manufacturers: http://www.trexon.com > > Embedded software/hardware/analog Info for designers: http://www.speff.com