Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
resources:tools-software:linux-drivers:iio-dac:ad5380 [14 Nov 2011 12:00] – created Lars-Peter Clausenresources:tools-software:linux-drivers:iio-dac:ad5380 [05 Jan 2021 16:08] (current) – Removed old references Ioana Chelaru
Line 11: Line 11:
   * [[adi>AD5391]]   * [[adi>AD5391]]
   * [[adi>AD5392]]   * [[adi>AD5392]]
- 
-===== Reference Circuits ===== 
- 
-  * [[adi>CN0007]] 
-  * [[adi>CN0008]] 
-  * [[adi>CN0010]] 
-  * [[adi>CN0011]] 
-  * [[adi>CN0012]] 
-  * [[adi>CN0013]] 
-  * [[adi>CN0014]] 
-  * [[adi>CN0015]] 
-  * [[adi>CN0029]] 
-  * [[adi>CN0030]] 
  
 ===== Evaluation Boards ===== ===== Evaluation Boards =====
  
   * [[adi>EVAL-AD5380EBZ]]   * [[adi>EVAL-AD5380EBZ]]
-  * [[adi>EVAL-AD5381EBZ]] 
   * [[adi>EVAL-AD5382EBZ]]   * [[adi>EVAL-AD5382EBZ]]
-  * [[adi>EVAL-AD5383EBZ]] 
   * [[adi>EVAL-AD5390EBZ]]   * [[adi>EVAL-AD5390EBZ]]
   * [[adi>EVAL-AD5391EBZ]]   * [[adi>EVAL-AD5391EBZ]]
Line 45: Line 30:
 ===== Status ===== ===== Status =====
  
- Source   Mainlined?  +^ Source ^ Mainlined? ^ 
-| [[bfgit>linux-kernel?drivers/staging/iio/dac/ad5380.c|git]] | [[git.linux.org>drivers/staging/iio/dac/ad5380.c|Inprogress]] |+| [[git.linux.org>drivers/iio/dac/ad5380.c|git]] | [[git.linux.org>drivers/iio/dac/ad5380.c|Yes]] |
  
 ===== Files ===== ===== Files =====
  
 ^ Function ^ File ^ ^ Function ^ File ^
-| driver  | [[git.linux.org>drivers/staging/iio/dac/ad5380.c]] |+| driver  | [[git.linux.org>drivers/iio/dac/ad5380.c]] |
  
 ====== 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, matching your part name. Depending on the converter IC used, you may need to set the modalias accordingly, matching your part name.
-<note>The part name needs a -3 or -5 depending on whether a 1.25V or 2.5V internal reference is used. E.g. "ad5380-5" or "ad5391-3".</note>+<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. "ad5380-5" or "ad5391-3".</WRAP>
  
 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>
  
 <code> <code>
 Linux Kernel Configuration Linux Kernel Configuration
- Device Drivers  ---> +    Device Drivers  ---> 
- [*] Staging drivers  ---> +        ... 
- <*>     Industrial I/O support ---> +        <*>     Industrial I/O support ---> 
-     --- Industrial I/O support +            --- Industrial I/O support 
-     -*-   Enable ring buffer support within IIO +            ... 
-     -*-     Industrial I/O lock free software ring +            Digital to analog converters  --- 
-     -*-   Enable triggered sampling support +                ... 
- +                <*>  Analog Devices AD5380/81/82/83/84/90/91/92 DAC driver 
-           *** Digital to analog convertors *** +                ... 
-     [--snip--] +            ... 
- +        ...
-     <*>  Analog Devices Analog Devices AD5380/81/82/83/84/90/91/92 DAC driver +
- +
-     [--snip--] +
 </code> </code>
- 
 ====== Hardware configuration ====== ====== Hardware configuration ======
  
Line 228: Line 208:
 {{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}} {{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}}
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/> **cd /sys/bus/iio/devices/** root:/> **cd /sys/bus/iio/devices/**
Line 256: Line 236:
 lrwxrwxrwx    1 root     root             0 Jan  2 21:54 subsystem -> ../../../../../bus/iio lrwxrwxrwx    1 root     root             0 Jan  2 21:54 subsystem -> ../../../../../bus/iio
 -rw-r--r--    1 root     root          4096 Jan  2 21:54 uevent -rw-r--r--    1 root     root          4096 Jan  2 21:54 uevent
-</xterm></box>+</xterm></WRAP>
  
 === Show device name === === Show device name ===
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat name** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat name**
 ad5380 ad5380
-</xterm></box>+</xterm></WRAP>
  
 === Show scale === === Show scale ===
  
-**Description:**\\ /sys/bus/iio/devices/iio:deviceX/out_scaleY_raw \\+**Description:**\\ /sys/bus/iio/devices/iio:deviceX/out_scale_raw \\
  
-scale to be applied to out_voltage0_raw in order to obtain the measured voltage in millivolts.+scale to be applied to out_voltageY_raw in order to obtain the measured voltage in millivolts.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_scale** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_scale**
 0.305000 0.305000
-</xterm></box>+</xterm></WRAP>
  
 === Set channel Y output voltage === === Set channel Y output voltage ===
  
 **Description:**\\ **Description:**\\
-/sys/bus/iio/devices/iio:deviceX/out_voltageY_raw\\+/sys/bus/iio/devices/iio:deviceX/out_voltageY_raw \\
  
 Raw (unscaled, no bias etc.) output voltage for Raw (unscaled, no bias etc.) output voltage for
 channel Y. channel Y.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo 10000 > out_voltage0_raw** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo 10000 > out_voltage0_raw**
-</xterm></box>+</xterm></WRAP>
  
 **U** = //out_voltage0_raw * out_voltage0_scale// = 10000 * 0,305000 //mV// = **305,00 //mV//** **U** = //out_voltage0_raw * out_voltage0_scale// = 10000 * 0,305000 //mV// = **305,00 //mV//**
Line 300: Line 280:
 Each channel has an adjustable gain which can be used to calibrate the channel's scale and compensate for full-scale errors. The default value is 16382. The minimum value is 0, the maximum value is 16383. Each channel has an adjustable gain which can be used to calibrate the channel's scale and compensate for full-scale errors. The default value is 16382. The minimum value is 0, the maximum value is 16383.
  
-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's offset and compensate for zero-scale errors. The default value is 0. The minimum value is -8192, the maximum value is 8191. Each channel has an adjustable offset which can be used to calibrate the channel's offset and compensate for zero-scale errors. The default value is 0. The minimum value is -8192, the maximum value is 8191.
  
-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.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo 1 > out_voltage_powerdown** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo 1 > out_voltage_powerdown**
Line 329: Line 309:
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown**
 0 0
-</xterm></box>+</xterm></WRAP>
  
 === 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.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown_mode_available** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown_mode_available**
 100kohm_to_gnd three_state 100kohm_to_gnd three_state
-</xterm></box>+</xterm></WRAP>
  
 === 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.
  
-<box 100% green|shell prompt running on the target>+<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 <xterm> <xterm>
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo three_state > out_voltage_powerdown_mode** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo three_state > out_voltage_powerdown_mode**
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown_mode** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage_powerdown_mode**
 three_state three_state
-</xterm></box>+</xterm></WRAP>
 ====== More Information ====== ====== More Information ======
  
 {{page>software:linux:docs:iio:iio_snippets#iio pointers&noheader&firstseconly&noeditbtn}} {{page>software:linux:docs:iio:iio_snippets#iio pointers&noheader&firstseconly&noeditbtn}}
resources/tools-software/linux-drivers/iio-dac/ad5380.1321268449.txt.gz · Last modified: 14 Nov 2011 12:00 (external edit)