LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-04-2010, 06:18 AM   #1
linux_
LQ Newbie
 
Registered: Mar 2010
Location: Pune, India
Distribution: Fedora, CentOS, Ubuntu
Posts: 24

Rep: Reputation: 1
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?
 
Old 12-05-2010, 01:47 AM   #2
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Quote:
Originally Posted by linux_ View Post
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
 
Old 12-06-2010, 06:07 AM   #3
linux_
LQ Newbie
 
Registered: Mar 2010
Location: Pune, India
Distribution: Fedora, CentOS, Ubuntu
Posts: 24

Original Poster
Rep: Reputation: 1
I am working on an embedded box called FriendlyARM.
There are eight GPIOs available that i am using to interface keypad(4x4).
 
Old 01-04-2011, 01:33 AM   #4
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Quote:
Originally Posted by linux_ View Post
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
 
Old 09-15-2013, 01:11 AM   #5
mohsenkazemi
LQ Newbie
 
Registered: Sep 2013
Posts: 1

Rep: Reputation: Disabled
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.

Last edited by mohsenkazemi; 09-15-2013 at 01:13 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Matrix keypad driver for uclinux fairuz.ismail Linux - Hardware 1 06-09-2010 05:29 PM
Matrix keypad driver for uclinux fairuz.ismail Programming 1 06-08-2010 10:05 AM
implementing matrix based keypad on x86 processor using GPIO's nathan Programming 1 02-06-2010 11:32 AM
Using GPIO (from kernel GPIO support) in MY application DannyGilbert Linux - Kernel 2 03-16-2009 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration