Solved

How do I write Embedded Linux Driver for nXn matrix keyboard & LCD?

Posted on 2010-08-23
6
875 Views
Last Modified: 2012-05-10
Hi,
I am attempting to write a 8 x 8 matrix keyboard driver for a open embedded linux platform, need help learning writing basic device drivers in linux and interfacing a 16 x 2 alphanumeric LCD based on the HD 44780 display controller.
I would like if someone would point me to links where i can understand Linux device driver development such as GPIO port usage etc.  This is for a embedded development platform.
Thanks
0
Comment
Question by:vinit_0932
  • 3
  • 2
6 Comments
 
LVL 5

Accepted Solution

by:
Kendor earned 250 total points
ID: 33498697
when I visited the courses rtos and embedded linux we had a pretty cool script done by our prof. unfortunately i don't have it as pdf. but there's good books out there (and i know that you know how to get them as pdfs once you know the title)
get this one:
http://www.amazon.de/s?ie=UTF8&keywords=9780132396554&index=blended
and this:
http://www.amazon.com/Embedded-Linux-Hardware-Software-Interfacing/dp/0672322269

furthermore the internet brings:
- http://free-electrons.com/doc/embedded_linux_kernel_and_drivers.pdf
- http://www.linuxjournal.com/article/7355


if you know german you'll love this:
https://ezs.kr.hsnr.de//TreiberBuch/html//
(it is the university level course in linux driver development)

i try to find some more stuff for you...

0
 

Author Comment

by:vinit_0932
ID: 33499274
Thanks Kendor for your links.
0
 
LVL 5

Expert Comment

by:Kendor
ID: 33499725
by the way - for the hd44780 there are drivers for sure...
check : http://lcdproc.org/
and: http://www.home.unix-ag.org/nils/lcd.html
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:vinit_0932
ID: 33500062
Hi Kendor,
I have had a look at the links for drivers you suggested but they all use either a serial or parallel port. The serial port essentially needs additional hardware but the parallel port driver in the second link may be useful...
Thanks again.
0
 
LVL 12

Assisted Solution

by:HappyCactus
HappyCactus earned 250 total points
ID: 33511456
If your driver is for your own use, you only need a way to send data and commands to the lcd controller. It depends on the processor you have and how the lcd controller is interfaced with the cpu (by using a local bus driven by gpio, or via a memory mapped bus line...)
Also, you need to decide how to control the lcd with software, using ioctl, write or both.
Take a basic linux device driver tutorial, and start with a very basic one. If you do not need to follow a standard interface, you are free to make decisions. Since it's an alpha numeric device, I think you do not need any standard interface (like a frame buffer interface) so the driver is potentially very simple.
Take a look to rubini's book "Writing linux device driver, 2nd edition", freely available on internet. You need to read the chapters about device drivers basics and character devices (you do not need interrupts or dma, I think).
Start modifying a working, and very basilar, driver. It's not too difficult.
0
 

Author Comment

by:vinit_0932
ID: 33517783
Thanks HappyCactus for your pointers on Linux Device Driver development.
Appreciate your inputs.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question