This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
resources:tools-software:linux-drivers:iio-dac:ad5380 [14 Nov 2011 12:00] – created Lars-Peter Clausen | resources:tools-software:linux-drivers:iio-dac:ad5380 [05 Jan 2021 16:08] (current) – Removed old references Ioana Chelaru | ||
---|---|---|---|
Line 11: | Line 11: | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
- | |||
- | ===== Reference Circuits ===== | ||
- | |||
- | * [[adi> | ||
- | * [[adi> | ||
- | * [[adi> | ||
- | * [[adi> | ||
- | * [[adi> | ||
- | * [[adi> | ||
- | * [[adi> | ||
- | * [[adi> | ||
- | * [[adi> | ||
- | * [[adi> | ||
===== Evaluation Boards ===== | ===== Evaluation Boards ===== | ||
* [[adi> | * [[adi> | ||
- | * [[adi> | ||
* [[adi> | * [[adi> | ||
- | * [[adi> | ||
* [[adi> | * [[adi> | ||
* [[adi> | * [[adi> | ||
Line 45: | Line 30: | ||
===== Status ===== | ===== Status ===== | ||
- | ^ Source | + | ^ Source ^ Mainlined? ^ |
- | | [[bfgit>linux-kernel?drivers/staging/ | + | | [[git.linux.org>drivers/ |
===== Files ===== | ===== Files ===== | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
- | | driver | + | | driver |
====== Example platform device initialization ====== | ====== Example platform device initialization ====== | ||
Line 155: | Line 140: | ||
Depending on the converter IC used, you may need to set the modalias accordingly, | Depending on the converter IC used, you may need to set the modalias accordingly, | ||
- | <note>The part name needs a -3 or -5 depending on whether a 1.25V or 2.5V internal reference is used. E.g. " | + | <WRAP round help>The part name needs a -3 or -5 depending on whether a 1.25V or 2.5V internal reference is used. E.g. " |
The I2C device id depends on the AD0 and AD1 pin settings and needs to be set according to your board setup. | The I2C device id depends on the AD0 and AD1 pin settings and needs to be set according to your board setup. | ||
Line 198: | Line 183: | ||
"make qconfig" | "make qconfig" | ||
- | <note> | + | <WRAP round help> |
The AD5380 Driver depends on **CONFIG_SPI_MASTER** or **CONFIG_I2C** | The AD5380 Driver depends on **CONFIG_SPI_MASTER** or **CONFIG_I2C** | ||
- | </note> | + | </WRAP> |
< | < | ||
Linux Kernel Configuration | Linux Kernel Configuration | ||
- | Device Drivers | + | |
- | [*] Staging drivers | + | ... |
- | < | + | < |
- | | + | --- Industrial I/O support |
- | -*- | + | ... |
- | -*- | + | Digital to analog |
- | -*- | + | ... |
- | + | < | |
- | *** Digital to analog | + | ... |
- | [--snip--] | + | ... |
- | + | ... | |
- | | + | |
- | + | ||
- | [--snip--] | + | |
</ | </ | ||
- | |||
====== Hardware configuration ====== | ====== Hardware configuration ====== | ||
Line 228: | Line 208: | ||
{{page> | {{page> | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/> **cd / | root:/> **cd / | ||
Line 256: | Line 236: | ||
lrwxrwxrwx | lrwxrwxrwx | ||
-rw-r--r-- | -rw-r--r-- | ||
- | </ | + | </ |
=== Show device name === | === Show device name === | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
ad5380 | ad5380 | ||
- | </ | + | </ |
=== Show scale === | === Show scale === | ||
- | **Description: | + | **Description: |
- | scale to be applied to out_voltage0_raw | + | scale to be applied to out_voltageY_raw |
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
0.305000 | 0.305000 | ||
- | </ | + | </ |
=== Set channel Y output voltage === | === Set channel Y output voltage === | ||
**Description: | **Description: | ||
- | / | + | / |
Raw (unscaled, no bias etc.) output voltage for | Raw (unscaled, no bias etc.) output voltage for | ||
channel Y. | channel Y. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
- | </ | + | </ |
**U** = // | **U** = // | ||
Line 300: | Line 280: | ||
Each channel has an adjustable gain which can be used to calibrate the channel' | Each channel has an adjustable gain which can be used to calibrate the channel' | ||
- | If scale calibration is used the following formula can be used calculate the output voltage: | + | If scale calibration is used the following formula can be used calculate the output voltage: |
**U** = //( ( out_voltageY_raw * ( out_voltageY_calibscale + 2) ) / 2^14 + out_voltageY_calibbias ) * out_voltageY_scale// | **U** = //( ( out_voltageY_raw * ( out_voltageY_calibscale + 2) ) / 2^14 + out_voltageY_calibbias ) * out_voltageY_scale// | ||
Line 310: | Line 290: | ||
Each channel has an adjustable offset which can be used to calibrate the channel' | Each channel has an adjustable offset which can be used to calibrate the channel' | ||
- | If offset calibration is used the following formula can be used calculate the output voltage: | + | If offset calibration is used the following formula can be used calculate the output voltage: |
**U** = //( ( out_voltageY_raw * ( out_voltageY_calibscale + 2 ) ) / 2^14 + out_voltageY_calibbias ) * out_voltageY_scale// | **U** = //( ( out_voltageY_raw * ( out_voltageY_calibscale + 2 ) ) / 2^14 + out_voltageY_calibbias ) * out_voltageY_scale// | ||
Line 321: | Line 301: | ||
normal operation. | normal operation. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
Line 329: | Line 309: | ||
root:/ | root:/ | ||
0 | 0 | ||
- | </ | + | </ |
=== List available power down modes === | === List available power down modes === | ||
Line 338: | Line 318: | ||
Lists all available output power down modes. | Lists all available output power down modes. | ||
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
100kohm_to_gnd three_state | 100kohm_to_gnd three_state | ||
- | </ | + | </ |
=== Set power down mode === | === Set power down mode === | ||
Line 356: | Line 336: | ||
For a list of available output power down options read | For a list of available output power down options read | ||
- | out_voltage_powerdown_mode_available. | + | out_voltage_powerdown_mode_available. |
- | < | + | <WRAP box bggreen>< |
< | < | ||
root:/ | root:/ | ||
root:/ | root:/ | ||
three_state | three_state | ||
- | </ | + | </ |
====== More Information ====== | ====== More Information ====== | ||
{{page> | {{page> |