Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
resources:tools-software:linux-drivers:iio-cdc:ad7745 [05 Sep 2012 13:25] – [Status] Michael Hennerich | resources:tools-software:linux-drivers:iio-cdc:ad7745 [20 Nov 2015 15:08] – [Reference Circuits] Add CN0346 Lars-Peter Clausen |
---|
| |
* [[adi>CN0129]] | * [[adi>CN0129]] |
| * [[adi>CN0346]] |
| |
===== Evaluation Boards ===== | ===== Evaluation Boards ===== |
==== AD7747 ==== | ==== AD7747 ==== |
| |
{{scrape>adi>AD7747#product_description}} | {{scrape>adi>AD7747#description}} |
| |
==== AD7746 ==== | ==== AD7746 ==== |
| |
{{scrape>adi>AD7746#product_description}} | {{scrape>adi>AD7746#description}} |
| |
==== AD7745 ==== | ==== AD7745 ==== |
| |
{{scrape>adi>AD7745#product_description}} | {{scrape>adi>AD7745#description}} |
| |
====== Source Code ====== | ====== Source Code ====== |
"make qconfig") | "make qconfig") |
| |
<note> | <WRAP round help> |
The driver depends on **CONFIG_I2C** | The driver depends on **CONFIG_I2C** |
</note> | </WRAP> |
| |
<code> | <code> |
{{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/** |
lrwxrwxrwx 1 root root 0 Jan 1 11:17 subsystem -> ../../../../../../bus/iio | lrwxrwxrwx 1 root root 0 Jan 1 11:17 subsystem -> ../../../../../../bus/iio |
-rw-r--r-- 1 root root 4096 Jan 1 11:17 uevent | -rw-r--r-- 1 root root 4096 Jan 1 11:17 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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat name** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat name** |
ad7746 | ad7746 |
</xterm></box> | </xterm></WRAP> |
| |
=== Show available sampling frequencies / update rates === | === Show available sampling frequencies / update rates === |
| |
<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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance_sampling_frequency_available** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance_sampling_frequency_available** |
50 31 16 8 | 50 31 16 8 |
root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> |
</xterm></box> | </xterm></WRAP> |
| |
=== Set sampling frequency / update rate === | === Set sampling frequency / update rate === |
| |
<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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance_sampling_frequency** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance_sampling_frequency** |
root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> |
| |
</xterm></box> | </xterm></WRAP> |
| |
=== Show scales for single and differential input channels === | === Show scales for single and differential input channels === |
| VIN_VDD_MON | in_voltage_supply_scale | | | VIN_VDD_MON | in_voltage_supply_scale | |
| |
<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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance_scale** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance_scale** |
0.000000488 | 0.000000488 |
</xterm></box> | </xterm></WRAP> |
| |
=== Show channel CIN1(+) measurement === | === Show channel CIN1(+) measurement === |
| VIN_VDD_MON | in_voltage1_supply_raw | | | VIN_VDD_MON | in_voltage1_supply_raw | |
| |
<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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance0_raw** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance0_raw** |
14914 | 14914 |
</xterm></box> | </xterm></WRAP> |
| |
**U** = //in_capacitance0_raw * in_capacitance_scale// = 14914 * 0.000000488 = **0.007278032 //pF//** | **U** = //in_capacitance0_raw * in_capacitance_scale// = 14914 * 0.000000488 = **0.007278032 //pF//** |
| |
| |
<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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_temp0_input** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_temp0_input** |
28756 | 28756 |
</xterm></box> | </xterm></WRAP> |
| |
**T** = //in_temp0_input// = 28756 = **28.756 //°C//** | **T** = //in_temp0_input// = 28756 = **28.756 //°C//** |
| CIN2(-) | CAPDAC(-) | in_capacitance0-capacitance2_offset | | | CIN2(-) | CAPDAC(-) | in_capacitance0-capacitance2_offset | |
| |
<note> | <WRAP round help> |
The AD7745/AD7746 CDC full-scale input range is ±4.096 pF. | The AD7745/AD7746 CDC full-scale input range is ±4.096 pF. |
The part can accept a higher capacitance on the input and the | The part can accept a higher capacitance on the input and the |
common-mode or offset (not-changing component) capacitance | common-mode or offset (not-changing component) capacitance |
can be balanced by programmable on-chip CAPDACs. | can be balanced by programmable on-chip CAPDACs. |
</note> | </WRAP> |
| |
**Example 4pF Offset:**\\ | **Example 4pF Offset:**\\ |
**in_capacitance0_offset** = //Offset / in_capacitance_scale// = 4pF / 0.000000488 = **8196721** | **in_capacitance0_offset** = //Offset / in_capacitance_scale// = 4pF / 0.000000488 = **8196721** |
| |
<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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **echo 8196721 > in_capacitance0_offset** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **echo 8196721 > in_capacitance0_offset** |
root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance0_offset** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance0_offset** |
8127504 | 8127504 |
</xterm></box> | </xterm></WRAP> |
| |
=== Perform channel gain calibration === | === Perform channel gain calibration === |
Triggers gain calibration on channel in_capacitance0 or in_capacitance1 | Triggers gain calibration on channel in_capacitance0 or in_capacitance1 |
| |
<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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **echo 1 > in_capacitance1_calibscale_calibration** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **echo 1 > in_capacitance1_calibscale_calibration** |
root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance1_calibscale** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance1_calibscale** |
1.000000 | 1.000000 |
</xterm></box> | </xterm></WRAP> |
| |
=== Set channel gain coefficient === | === Set channel gain coefficient === |
Valid range is between 1.0 and 1.99999999. | Valid range is between 1.0 and 1.99999999. |
| |
<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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **echo 1.5 > in_capacitance1_calibscale** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **echo 1.5 > in_capacitance1_calibscale** |
root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance1_calibscale** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance1_calibscale** |
1.500000 | 1.500000 |
</xterm></box> | </xterm></WRAP> |
| |
=== Perform channel offset calibration === | === Perform channel offset calibration === |
Triggers offset calibration on channel in_capacitance0 or in_capacitance1 | Triggers offset calibration on channel in_capacitance0 or in_capacitance1 |
| |
<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/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **echo 1 > in_capacitance1_calibbias_calibration** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **echo 1 > in_capacitance1_calibbias_calibration** |
root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance_calibbias** | root:/sys/devices/platform/i2c-bfin-twi.0/i2c-0/0-0048/iio:device0> **cat in_capacitance_calibbias** |
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}} |