Difference between revisions of "DAC"
From ArmadeusWiki
m (→Installation) |
m (→Linux) |
||
Line 5: | Line 5: | ||
Activate the necessary I2C drivers in the Linux kernel configuration (modules or builtin): | Activate the necessary I2C drivers in the Linux kernel configuration (modules or builtin): | ||
− | + | Device Drivers ---> <*> I2C support ---> <*> I2C device interface | |
− | + | Device Drivers ---> <*> I2C support ---> I2C Hardware Bus support ---> <*> i2c bus on i.MX | |
− | * | + | |
− | + | ||
'''By default I2C drivers are builtin in Armadeus Linux kernel''' | '''By default I2C drivers are builtin in Armadeus Linux kernel''' |
Revision as of 11:33, 20 November 2008
The Max5821L DAC can be controlled from the user space by using the setDAC function.
Installation (not necessary on latest version)
Linux
Activate the necessary I2C drivers in the Linux kernel configuration (modules or builtin):
Device Drivers ---> <*> I2C support ---> <*> I2C device interface Device Drivers ---> <*> 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:
Package Selection for the target->Hardware handling->max5821ctrl
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
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 !!