Keypad Interface on the LK202-24-USB-WB

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
dkrst13
LCD?
Posts: 4
Joined: Tue Oct 07, 2003 10:55 am
Location: USA
Contact:

Keypad Interface on the LK202-24-USB-WB

Post by dkrst13 »

I need help on an issue concerning the concept of operation of the keypad interface on the LK202-24-USB-WB. I scoped a keypad I had hooked up to the C1 and R1 pins on the keypad interface header on the LCD module and noticed the spike down (when a key is pressed) and the up (when the key is depressed). That's fine for the keypad, but I have a remote control that I want to use as some other keys. I basically want to tap off of two of the columns and use the C5 and C6 columns, which are currently spare, to implement the buttons on an RF remote. The decoder module I have for the remote will produce a Data valid pulse (active high) at which an 8-bit binary representing the value of the key pressed on the remote is shown on the decoder's data bus. Now, I can handle the decoding of this value to be a certain row and column combination, but I need to know how to incorporate this into the current keypad interface on the LK202-24-USB-WB.
Please, anyone, let me know ASAP :)

Dave Reed
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Hello...

Are you talking about a type of encoder...?
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
dkrst13
LCD?
Posts: 4
Joined: Tue Oct 07, 2003 10:55 am
Location: USA
Contact:

Encoder ?

Post by dkrst13 »

Yes, I am more interested in how the keypad interface works in more detail, speaking from an electric standpoint and not a high level one as found in the user manual. I need to know how it responds to keypresses so I can build the proper circuit to translate the 8-bit value into what the keypad interface (Chip, encoder, etc) needs to trigger a press and be decoded.
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

You might want to check out this link...it will give you ideas and explanations better than I can!!! :D

http://www.lcdforums.com/forums/viewtop ... coder#6920
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
Paradigm
Matrix Orbital
Matrix Orbital
Posts: 255
Joined: Thu Sep 13, 2001 6:00 pm
Location: Calgary, Alberta, Canada

Post by Paradigm »

We've actually been thinking about this for digital knobs and other input devices.

The keypad is 4x6, I will call the part that is 4 wide the rows and the one that is 6 wide the columns. It doesn't matter which is which, as long as you keep them straight.

Let's start off in the idle state. The rows are pulled high and the columns are pulled low (I can't remember which way around it is without looking at the code, but we'll go this way for this explanation). As long as one of the 4 rows isn't pulled low nothing happens.

When one of the rows changes to a low, the debounce counter is started. When it expires it checks to see if it is still low. If it is, then we process the keypress. The columns are set all to high (which causes the offending row to go high) and then they are pushed low one at a time. When a row changes then we know the column. Then we look to see which row went low, which gives us the row.

Now for your end. You need to allow this scanning to happen. Since the columns are driving the rows, your circuit must act like it is a switch. The easiest way to do that is with a MOSFET bridging the rows and columns. Drive the gate and the row will be bridged to the column to simulate a keypress. To speed up things you should put the debounce time to 0 since (as far as I remember) rotary encoders don't bounce. Since the keypad is interupt driven it is actually quite quick.
James McTavish, P.Eng
Director of Engineering
Matrix Orbital
dkrst13
LCD?
Posts: 4
Joined: Tue Oct 07, 2003 10:55 am
Location: USA
Contact:

Post by dkrst13 »

Thanks! I was thinking along that line, but was just confused on what I was seeing on the scope, but I will operate off of your explanation and keep you posted as to what happens.

Thanks again!
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Being a matrix stlye keypad, as long as column and rows are connected together any orientation will be fine. If you stray away from convention, make sure you map the new values appropriately. You may have to play with the debounce times varying from the type of encoder. Out of curiousity, what type of microcontroller are you using??? 8)
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
dkrst13
LCD?
Posts: 4
Joined: Tue Oct 07, 2003 10:55 am
Location: USA
Contact:

Post by dkrst13 »

I am not using a micro controller. I am building my own custom logic in an EPLD (namely the MAX 7000A from Altera) and using that to build an interface to the RF decoder I have as well a couple other things not related to the keypad interface. <:)
Miles
Matrix Orbital
Matrix Orbital
Posts: 1105
Joined: Mon Mar 04, 2002 4:00 pm

Post by Miles »

Sounds interesting...let us know how you make out as I would be interested how well this would work!! :D
Miles Y.
Head of Technical Support
Product Manager
Matrix Orbital
Post Reply