Device+Drivers

=Add-On Module DAC=

Basic Device driver for the Add-on module DAC



Download the file in Ubunto to your home directory and copy it to the Devkit using scp.

To use the module you must insert it into the kernel: code insmod dac7612.ko code

Next, to add the devices you must make two nodes: code mknod /dev/dac0 c 63 0 mknod /dev/dac1 c 63 1 code

This gives you two devices, one for each DAC channel. To set a DAC value you must write the output voltage in millivolt to the device (0 - 4096).

Example: Set the dac output A to 2.35 volt: code echo 2350 > /dev/dac0 code

=Using I/O from user space= To get you going in PRJ3, check this source code. Please note that the application uses the inputs (gpio_key) and outputs (gpio_led) defined in the board-omap3devkit8000.c file, and thereby the kernel drivers for these two i/o. Note that the "read" function is a blocking read, it waits for data to be available.