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
Next revisionBoth sides next revision
resources:tools-software:linux-drivers:iio-dac:ad5791 [16 Nov 2012 13:50] – [Reference Circuits] Add missing CN Lars-Peter Clausenresources:tools-software:linux-drivers:iio-dac:ad5791 [18 Feb 2013 14:56] – [Adding Linux driver support] The driver is no longer in staging Lars-Peter Clausen
Line 62: Line 62:
 </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 199: Line 199:
 "make qconfig") "make qconfig")
  
-<note>+<WRAP round help>
 The AD5791 Driver depends on **CONFIG_SPI** The AD5791 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 +            Digital to analog converters  --- 
-     -*-   Enable triggered sampling support +                ... 
- +                <*>   Analog Devices AD5760/AD5780/AD5781/AD5790/AD5791 DAC SPI driver 
-           *** Digital to analog convertors *** +                ... 
-     [--snip--] +            ... 
- +        ...
-     <*>   Analog Devices AD5791/AD5781 DAC spi driver +
- +
-     [--snip--]+
  
 </code> </code>
- 
 ====== Hardware configuration ====== ====== Hardware configuration ======
  
Line 229: Line 225:
 {{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 248: Line 244:
 lrwxrwxrwx    1 root     root             0 Jan  4 12:28 subsystem -> ../../../../../bus/iio lrwxrwxrwx    1 root     root             0 Jan  4 12:28 subsystem -> ../../../../../bus/iio
 -rw-r--r--    1 root     root          4096 Jan  4 12:28 uevent -rw-r--r--    1 root     root          4096 Jan  4 12:28 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**
 ad5791 ad5791
-</xterm></box>+</xterm></WRAP>
  
 === Show scale === === Show scale ===
Line 264: Line 260:
 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**
 0.019 0.019
-</xterm></box>+</xterm></WRAP>
  
 === Set channel Y output voltage === === Set channel Y output voltage ===
Line 278: Line 274:
 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 131579 > out_voltage0_raw root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> echo 131579 > out_voltage0_raw
-</xterm></box>+</xterm></WRAP>
  
 **U** = //out_voltage0_raw * out_voltage_scale// = 131579 * 0.019 = **2500.001 //mV//** **U** = //out_voltage0_raw * out_voltage_scale// = 131579 * 0.019 = **2500.001 //mV//**
  
-<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 -131579 > out_voltage0_raw root:/sys/devices/platform/bfin-spi.0/spi0.3/iio:device0> echo -131579 > out_voltage0_raw
-</xterm></box>+</xterm></WRAP>
  
 **U** = //out_voltage0_raw * out_voltage_scale// = -131579 * 0.019 = **-2500.001 //mV//** **U** = //out_voltage0_raw * out_voltage_scale// = -131579 * 0.019 = **-2500.001 //mV//**
Line 299: Line 295:
 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**
 6kohm_to_gnd three_state 6kohm_to_gnd three_state
-</xterm></box>+</xterm></WRAP>
  
 === Set power down mode === === Set power down mode ===
Line 320: Line 316:
  
  
-<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 337: Line 333:
 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 345: Line 341:
 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/ad5791.txt · Last modified: 11 Feb 2016 20:55 by Lars-Peter Clausen