Max5821

From ArmadeusWiki
Jump to: navigation, search

Description

This 2 channels 10bits 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.

MAX5821 on APF9328
File:Max5821 on APF27Dev.jpg
MAX5821 on APF27Dev

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
 ##
Warning Warning: Do not forget to connect a voltage reference for the DAC !!


Links