LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Interface GPIO driven matrix keypad (https://www.linuxquestions.org/questions/linux-newbie-8/interface-gpio-driven-matrix-keypad-848301/)

linux_ 12-04-2010 06:18 AM

Interface GPIO driven matrix keypad
 
Hello,
I want to interface GPIO driven matrix keypad(4X4) to my linux box.
I saw a driver source file
linux-2.6.32.2/drivers/input/keyboard/matrix_keypad.c

How can I use this to achieve what I want?

tommyttt 12-05-2010 01:47 AM

Quote:

Originally Posted by linux_ (Post 4180357)
Hello,
I want to interface GPIO driven matrix keypad(4X4) to my linux box.
I saw a driver source file
linux-2.6.32.2/drivers/input/keyboard/matrix_keypad.c

How can I use this to achieve what I want?

It would be helpful if you could provide some information on your system, make/model, what ports are available, etc. A matrix keypad (4x4) requires at least 8 directional signal paths, 4 output and 4 input unless you also use multiplexing which requires more hardware.

Is this for a desktop or laptop system? It's much easier to do on a desktop in which you can add an interface card.

As to the software you indicate, we can't say what it does without looking at it's listing which could vary with kernel version and distro. It is a "c" program which may need to be compiled depending on its format.

Supply the forum with the above info and we'll try to be more helpful.

Tom

linux_ 12-06-2010 06:07 AM

I am working on an embedded box called FriendlyARM.
There are eight GPIOs available that i am using to interface keypad(4x4).

tommyttt 01-04-2011 01:33 AM

Quote:

Originally Posted by linux_ (Post 4182100)
I am working on an embedded box called FriendlyARM.
There are eight GPIOs available that i am using to interface keypad(4x4).

Sorry to take so long replying, had health problems.

That looks like an interesting device with plenty of I/O. The GPIO should work fine as 4 inputs and 4 outputs. Send a low level to one of the outputs which should have pullup resistors and test for a low level on each of the 4 inputs (also pulled high). That would detect which key was pressed and you would adjust your programming accordingly.

Tom

mohsenkazemi 09-15-2013 01:11 AM

use input driver in GPIO Pin
 
hi,
i have a question about how to use this driver(keypad 4*4) in my applications?
it didn't need to determine which pins(such that PA1-PA8) i want to use or?
P.S. my development board work with FriendlyARM toolchain.


All times are GMT -5. The time now is 09:12 PM.