Solved

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

Posted on 2010-08-23
6
849 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
Comment Utility
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
Comment Utility
Thanks Kendor for your links.
0
 
LVL 5

Expert Comment

by:Kendor
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:vinit_0932
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks HappyCactus for your pointers on Linux Device Driver development.
Appreciate your inputs.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
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 recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now