Difference between revisions of "Max5821"
From ArmadeusWiki
m |
m (→Linux Driver) |
||
Line 16: | Line 16: | ||
==Linux Driver== | ==Linux Driver== | ||
− | + | 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. | |
+ | |||
+ | ===Usage=== | ||
+ | To set the DAC outputs to a given value, use the ''setDAC'' command: | ||
+ | <pre class="apf"> | ||
+ | # 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 | ||
+ | ## | ||
+ | </pre> | ||
+ | |||
+ | {{Warning|Do not forget to connect a voltage reference for the DAC !!}} | ||
==Links== | ==Links== |
Revision as of 13:13, 15 August 2010
This 2 channels I2C DAC (Digital to Analog Converter) is mounted as an option on some APF9328 boards. It is mounted in standard on the APF27Dev development boards.
Contents
Connections
On your Devlight/DevFull there are 3 signals to use the Max5821:
- DAC_OUTA: corresponds to OUTA (pin 7) on Max5821. It's the first output.
- DAC_OUTB: corresponds to OUTB (pin 8) on Max5821. It's the 2nd output.
- DAC_REF: corresponds to REF (pin 6) on Max5821. It's the reference voltage (max value that will be achieved by outputs). This input should be connected to a voltage reference between 0 and 3,3V.
Linux Driver
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.
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 ##