Difference between revisions of "DAC"

From ArmadeusWiki
Jump to: navigation, search
(No difference)

Revision as of 13:23, 19 September 2006

The DAC max5821L can be controlled from the user space by using the setDAC function

The Linux kernel configuration must enable the necessary I2C drivers (modules):

  • -> I2C support
  • -> I2C support -> I2C device interface
  • -> I2C support -> I2C Hardware Bus support -> I2C bus on i.MX

You must enable the max5821ctrl package into your buildroot configuration:
Board support Options->Board support for the Armadeus development boards->armadeus packages

If you are using modules instead 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

to set the DAC 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

Do not forget to connect a voltage reference for the DAC