Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-08-23
6
Medium Priority
?
910 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 5

Accepted Solution

by:
Kendor earned 1000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 1000 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

Stack Overflow Podcast - Developer Story

Welcome to the Stack Overflow podcast recorded Thursday July 20 at Stack Overflow Headquearters in NYC. Your hosts today are podcast regulars Jay Hanlon, David Fullerton, and Ilana Yitzhaki, plus the quite irregular Matt Sherman (Stack Overflow Engineering Manager extraordinaire)

Question has a verified solution.

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

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

721 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