Wiki

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linux-drivers:iio-dac:ad5504 [09 Nov 2011 11:39] – [Supported Devices] Michael Hennerichresources:tools-software:linux-drivers:iio-dac:ad5504 [23 Feb 2017 13:32] (current) Lars-Peter Clausen
Line 1: Line 1:
 ====== AD5504 IIO High Voltage ADC Linux Driver ====== ====== AD5504 IIO High Voltage ADC Linux Driver ======
- 
  
 ===== Supported Devices ===== ===== Supported Devices =====
Line 6: Line 5:
   * [[adi>AD5504]]   * [[adi>AD5504]]
   * [[adi>AD5501]]   * [[adi>AD5501]]
 +
 +===== Reference Circuits =====
 +
 +  * [[adi>CN0193]]
  
 ===== Evaluation Boards ===== ===== Evaluation Boards =====
Line 11: Line 14:
   * [[adi>EVAL-AD5504EBZ]]   * [[adi>EVAL-AD5504EBZ]]
   * [[adi>EVAL-AD5501EBZ]]   * [[adi>EVAL-AD5501EBZ]]
 +
 ===== Description ===== ===== Description =====
  
Line 22: Line 26:
  
 ^  Source  ^  Mainlined?  ^ ^  Source  ^  Mainlined?  ^
-| [[bfgit>linux-kernel?drivers/staging/iio/dac/ad5504.c|git]] |  [[git.linux.org>drivers/staging/iio/dac/ad5504.c|Yes]]  |+| [[git.linux.org>drivers/iio/dac/ad5504.c|git]] |  [[git.linux.org>drivers/iio/dac/ad5504.c|Yes]]  |
 ===== Files ===== ===== Files =====
  
 ^ Function ^ File ^ ^ Function ^ File ^
-| driver  | [[git.linux.org>drivers/staging/iio/dac/ad5504.c]] | +| driver  | [[git.linux.org>drivers/iio/dac/ad5504.c]] | 
-| include | [[git.linux.org>drivers/staging/iio/dac/ad5504.h]] |+| include | [[git.linux.org>drivers/iio/dac/ad5504.h]] |
  
 ====== Example platform device initialization ====== ====== Example platform device initialization ======
Line 41: Line 45:
 </code> </code>
  
-<note tip> +<WRAP tip> 
 This driver supports also an alternative way of specifying the reference voltage, by using the Linux regulator framework. This driver supports also an alternative way of specifying the reference voltage, by using the Linux regulator framework.
-</note>+</WRAP>
  
 ===== Specifying reference voltage via the regulator framework ===== ===== Specifying reference voltage via the regulator framework =====
Line 147: Line 151:
 "make qconfig") "make qconfig")
  
-<note>+<WRAP round help>
 The AD5504 Driver depends on **CONFIG_SPI** The AD5504 Driver depends on **CONFIG_SPI**
-</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 +
-     -*-   Enable triggered sampling support +
- +
-           *** Digital to analog convertors *** +
-     [--snip--] +
- +
-     <*>   Analog Devices AD5504/AD5501 DAC spi driver +
- +
-     [--snip--]+
  
 +           *** Digital to analog convertors ***
 +     [--snip--]
 +     <*>   Analog Devices AD5504/AD5501 DAC spi driver
 +     [--snip--]
 </code> </code>
  
Line 177: Line 174:
 {{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 200: Line 197:
 lrwxrwxrwx    1 root     root             0 Jan  3 14:39 subsystem -> ../../../../../bus/iio lrwxrwxrwx    1 root     root             0 Jan  3 14:39 subsystem -> ../../../../../bus/iio
 -rw-r--r--    1 root     root          4096 Jan  3 14:39 uevent -rw-r--r--    1 root     root          4096 Jan  3 14:39 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**
 ad5504 ad5504
-</xterm></box>+</xterm></WRAP>
  
 === Show scale === === Show scale ===
Line 216: Line 213:
 scale to be applied to out_voltage0_raw in order to obtain the measured voltage in millivolts. scale to be applied to out_voltage0_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**
 7.324 7.324
-</xterm></box>+</xterm></WRAP>
  
 === Set channel Y output voltage === === Set channel Y output voltage ===
Line 230: Line 227:
 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 1234 > out0_raw root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> echo 1234 > out0_raw
-</xterm></box>+</xterm></WRAP>
  
 **U** = //out_voltage0_raw * out_voltage_scale// = 1234 * 7.324 = **9037,816 //mV//** **U** = //out_voltage0_raw * out_voltage_scale// = 1234 * 7.324 = **9037,816 //mV//**
Line 245: Line 242:
 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**
 20kohm_to_gnd three_state 20kohm_to_gnd three_state
-</xterm></box>+</xterm></WRAP>
  
 === Set power down mode === === Set power down mode ===
Line 266: Line 263:
  
  
-<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>
  
 === Enable power down mode on output Y === === Enable power down mode on output Y ===
Line 283: Line 280:
 controlled together. controlled together.
  
-<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_voltage0_powerdown** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **echo 1 > out_voltage0_powerdown**
Line 291: Line 288:
 root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage0_powerdown** root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> **cat out_voltage0_powerdown**
 0 0
-</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/ad5504.1320835176.txt.gz · Last modified: 09 Nov 2011 11:39 by Michael Hennerich