Difference between revisions of "DAC"

From ArmadeusWiki
Jump to: navigation, search
m (Links)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The DAC '''max5821L''' can be controlled from the user space by using the setDAC function
+
The [[Max5821 | Max5821L DAC]] can be controlled from the user space by using the '''setDAC''' function. No special driver is needed except the i2c host one, which is statically built into the kernel.
  
 
==Installation==
 
==Installation==
===Linux===
+
Not needed on latest versions (> Armadeus 3.0): the tool is installed by default. Informations are kept [[Talk:DAC|here]].
Activate the necessary I2C drivers in the Linux kernel configuration (modules or builtin):
+
 
+
* -> Device Drivers
+
* -> I2C support
+
* -> I2C support -> I2C device interface
+
* -> I2C support -> I2C Hardware Bus support -> I2C bus on i.MX
+
 
+
'''By default I2C drivers are builtin in Armadeus Linux kernel'''
+
 
+
===Buildroot===
+
You must enable the '''max5821ctrl''' package into your buildroot configuration:<br>
+
Board support Options->Board support for the Armadeus development boards->armadeus packages
+
 
+
 
+
If you are using modules instead of builtin linux drivers, you can check if the modules are loaded with:
+
# lsmod
+
i2c_imx                4008  0
+
i2c_dev                5024  0
+
i2c_core              11472  2 i2c_imx,i2c_dev
+
  
 
==Usage==
 
==Usage==
to set the DAC use the '''setDAC''' command:
+
To set the DAC outputs to a given value, use the ''setDAC'' command:
 +
<pre class="apf">
 
  # setDAC
 
  # setDAC
 
   
 
   
Line 35: Line 17:
 
   If no VALUE is given, then the output is powered down
 
   If no VALUE is given, then the output is powered down
 
  ##
 
  ##
 +
</pre>
  
Do not forget to connect a voltage reference for the DAC
+
{{Warning|Do not forget to connect a voltage reference for the DAC !!}}
  
 
==Links==
 
==Links==
 
* [[Max5821|How to connect Max5821 on your board]]
 
* [[Max5821|How to connect Max5821 on your board]]
 
* [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3288 Max5821 Webpage]
 
* [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3288 Max5821 Webpage]
 +
 +
[[Category:Linux drivers]]

Latest revision as of 22:56, 27 October 2009

The Max5821L DAC can be controlled from the user space by using the setDAC function. No special driver is needed except the i2c host one, which is statically built into the kernel.

Installation

Not needed on latest versions (> Armadeus 3.0): the tool is installed by default. Informations are kept here.

Usage

To set the DAC outputs to a given value, use the setDAC command:

 # setDAC
 
 ##Usage: setDAC OUTPUT [VALUE]
 power down or set DAC output with value 0 - 1023
 
  OUTPUT is A , B or AB (both)
  VALUE must be 0 - 1023
 
  If no VALUE is given, then the output is powered down
 ##
Warning Warning: Do not forget to connect a voltage reference for the DAC !!


Links