This documentation is out of date.
The new version of the documentation is here: https://cannylogic.com/docs |
Difference between revisions of "CANNY 5.2 duo, ADC Driver"
From CANNY Wiki
[checked revision] | [checked revision] |
Line 1: | Line 1: | ||
− | == | + | == General Description == |
+ | CANNY 5.2 duo supports Analog-to-Digital Converter (ADC) mode for one of three IO channels - IO Channel #10. This ADC converter have about 33k input impedance and can be used to measurement the input voltage from 0 to 15 V with 12-bit resolution and 1 millisecond sample rate. | ||
− | + | To activate the ADC, you need to write any non-zero to register «ADC Enable Register, IO Channel 10». | |
− | + | == Drivers Registers == | |
− | + | The following shows permissible values for control registers of ADC Driver | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ADC driver configuration register allows to enable or disable driver: | |
{|border="1" style="border-collapse:collapse;" align="left" width="100%" | {|border="1" style="border-collapse:collapse;" align="left" width="100%" | ||
|- align="center" valign="top" | |- align="center" valign="top" | ||
− | !width="250px"| | + | !width="250px"|Register |
− | ! | + | !Expected Values |
|- valign="top" | |- valign="top" | ||
| | | | ||
{|border="0" align="left" | {|border="0" align="left" | ||
|- valign="top" | |- valign="top" | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|ADC Enable Register, IO Channel 10 |
|} | |} | ||
|valign="top"| | |valign="top"| | ||
Line 32: | Line 24: | ||
|width="70px" style="padding-left:0.5em;"|≥ 1 | |width="70px" style="padding-left:0.5em;"|≥ 1 | ||
|style="padding-left:0.5em;"|= | |style="padding-left:0.5em;"|= | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|enable ADC Driver; |
|- valign="top" | |- valign="top" | ||
|width="70px" style="padding-left:0.5em;"|0 | |width="70px" style="padding-left:0.5em;"|0 | ||
|style="padding-left:0.5em;"|= | |style="padding-left:0.5em;"|= | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|disable ADC Driver. |
|} | |} | ||
|} | |} | ||
− | + | ||
+ | ADC driver input registers allows access to the measured value: | ||
{|border="1" style="border-collapse:collapse;" align="left" width="100%" | {|border="1" style="border-collapse:collapse;" align="left" width="100%" | ||
|- align="center" valign="top" | |- align="center" valign="top" | ||
− | !width="250px"| | + | !width="250px"|Register |
− | ! | + | !Returning Values |
|- valign="top" | |- valign="top" | ||
| | | | ||
{|border="0" align="left" | {|border="0" align="left" | ||
|- valign="top" | |- valign="top" | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|ADC Value Register, IO Channel 10 |
|} | |} | ||
|valign="top"| | |valign="top"| | ||
Line 56: | Line 49: | ||
|width="70px" style="padding-left:0.5em;"|0...4095 | |width="70px" style="padding-left:0.5em;"|0...4095 | ||
|style="padding-left:0.5em;"|= | |style="padding-left:0.5em;"|= | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|measured ADC value for IO Channel 10 |
|} | |} | ||
|} | |} | ||
<br clear="all"> | <br clear="all"> | ||
− | == | + | == Examples == |
− | + | Example of input voltage measurement diagram. | |
[[File:14_12_2_1.png]] | [[File:14_12_2_1.png]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<!--/NOPDF--> | <!--/NOPDF--> | ||
Latest revision as of 14:32, 14 December 2018
General Description
CANNY 5.2 duo supports Analog-to-Digital Converter (ADC) mode for one of three IO channels - IO Channel #10. This ADC converter have about 33k input impedance and can be used to measurement the input voltage from 0 to 15 V with 12-bit resolution and 1 millisecond sample rate.
To activate the ADC, you need to write any non-zero to register «ADC Enable Register, IO Channel 10».
Drivers Registers
The following shows permissible values for control registers of ADC Driver
ADC driver configuration register allows to enable or disable driver:
Register | Expected Values | |||||||
---|---|---|---|---|---|---|---|---|
|
|
ADC driver input registers allows access to the measured value:
Register | Returning Values | ||||
---|---|---|---|---|---|
|
|
Examples
Example of input voltage measurement diagram.
Смотри также