device driver in embedded system

Thread Starter

vead

Joined Nov 24, 2011
629
Hello Everyone
I don't understand exactly what is device driver in embedded system. I know in embedded system device means Microcontroller, microprocessor , LED, LCD , Motor ..etc and driver means something like program. we write program in assembly or C language. I don't understand practically what is device driver. can someone help me to understand with example . exactly what is device driver in embedded system ?
Thank you very much
 

Thread Starter

vead

Joined Nov 24, 2011
629
Hello,

Perhaps the following (9) pages might help:
http://microcontroller.com/wp/DeviceDrivers/device_drivers.htm

This was found using the following query:
"device driver in embedded system"

Bertus
Thank you for your quick response. I have read that link I know Microcontroller has features such as UARTs, Timers, A/D or D/A converters, CAN o etc. I think device driver is program provide interface for accessing hardware service in in peripheral modules such as UARTs, Timers, A/D or D/A converters, CAN o etc. But still have big confused
My understanding
1.Hardware (microcontroller example 8051 ,Cortex M0 )
2. Compiler ( Keil compiler ) and C programming
I just want to learn with simple task and looking small program for device driver
How to develop small device driver ?
:
 

bogosort

Joined Sep 24, 2011
696
A device driver provides the software/hardware interface needed to control external hardware. A very simple example would be an Arduino sketch that toggles an LED with the press of a button. When people say "device driver", however, they typically mean something a bit more complicated: a piece of software, itself part of a larger system of software, that controls peripheral hardware attached to a system bus.

For example, the ethernet card on your computer communicates to your CPU through the PCIe bus (on which other peripherals are attached, each with their own device driver). The ethernet driver in your OS knows how to talk to that particular ethernet card through the bus. The driver handles network traffic by reading from and writing to hardware registers on the ethernet card, providing a software "wrapper" around the hardware, abstracting the low-level details away from the OS and its user applications.

As for learning to write device drivers, where you should begin depends on how comfortable you are with hardware and programming. If you're a complete novice in both, buy an Arduino and a breadboard, and learn to make an LED blink with a push button using the beginner-friendly libraries. As you gain confidence, experiment with sensors that have a serial (UART) interface. Try to build complete systems that do useful things; you'll get the hang of it soon enough.

If you're already a proficient programmer, buy an external ADC and figure out how to get it talking to an Arduino or Teensy using only the ADC's datasheet. Once you've gotten the bus protocol figured out, create your own library and API for the ADC, so that any time you want an external ADC in a project, you can simply include your code and call the appropriate functions. Congrats, you've written a device driver.
 
Top