TS-8820-ADC: Difference between revisions

From embeddedTS Manuals
No edit summary
(Added reference to HOW to change the ADC range setting.)
Line 1: Line 1:
The 16 ADC channels are on [[#Terminal Blocks|P3, P4, P5]]. Inputs for these channels must be in the -10V to +10V range. It is also possible to select a -5V to +5V range in software. On [[#Terminal Blocks|P3, P4, P5]], all even numbered terminals are connected to ground. Odd numbered terminals are used for ADC inputs and DAC outputs.
The 16 ADC channels are on [[#Terminal Blocks|P3, P4, P5]]. Inputs for these channels must be in the -10V to +10V range. It is also possible to select a -5V to +5V range in software by pulling CN2_56 (adc1) and/or CN2_58 (adc2) high. On [[#Terminal Blocks|P3, P4, P5]], all even numbered terminals are connected to ground. Odd numbered terminals are used for ADC inputs and DAC outputs.


To sample the ADC channels:
To sample the ADC channels:

Revision as of 12:40, 26 February 2013

The 16 ADC channels are on P3, P4, P5. Inputs for these channels must be in the -10V to +10V range. It is also possible to select a -5V to +5V range in software by pulling CN2_56 (adc1) and/or CN2_58 (adc2) high. On P3, P4, P5, all even numbered terminals are connected to ground. Odd numbered terminals are used for ADC inputs and DAC outputs.

To sample the ADC channels:

# This will sample the ADC inputs 5 times a second.
ts8820ctl --sample=5

This will sample for 1 second 5 times. For example, this would return:

 Collected 80 samples total.
 
 Ch 1 Ch 2 Ch 3 Ch 4 Ch 5 Ch 6 Ch 7 Ch 8 Ch 9 Ch10 Ch11 Ch12 Ch13 Ch14 Ch15 Ch16 
 ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 
 9999 9999 9999 9999 9999 9999 9999 9999 2143 2136 2141 2144 2148 2143 2142 2143 
 9999 9999 9999 9999 9999 9999 9999 9999 2142 2137 2141 2144 2147 2143 2142 2142 
 9999 9999 9999 9999 9999 9999 9999 9999 2142 2136 2140 2144 2147 2143 2142 2142 
 9999 9999 9999 9999 9999 9999 9999 9999 2142 2136 2141 2144 2147 2142 2142 2142 
 9999 9999 9999 9999 9999 9999 9999 9999 2142 2136 2140 2144 2147 2143 2142 2142