SERIES IP330 INDUSTRIAL I/O PACK 16-BIT HIGH DENSITY ANALOG INPUT MODULE
___________________________________________________________________________________________
- 16 -
The 0 to +5v ADC range could alternatively be used with a gain of
4. This approach may reduce the affect of noise over the ADC
range and gain selected in this example.
The calibration parameters (CountCALHI and CountCALLO)
remain to be determined before uncorrected input channel data
can be taken and corrected.
Determination of the CountCALLO Value
1.
Execute Write of 0432H to Control Register at Base Address
+ 00H.
a) Select Straight Binary
b) External Trigger Input
c)
Select 0.6125v Calibration Voltage
d) Burst Single Scan Mode
e) Timer
Disabled
f) Interrupts
Disabled
2.
Execute Write of 1F00H to End/Start Channel Value Register
at Base A 06H. This will permit 32 conversions of
the calibration voltage to be stored in the 32 Mail Box Buffers.
3.
Execute Write of 03H, as byte data transfers only, to Gain
Select Channel Registers Base A 20H to 3FH. This
selects a gain of eight for all 32 channels.
4.
Execute Write 0001H to the Start Convert Bit at Base
A 10H to start burst single mode conversions. Thirty
two conversions of the calibration voltage are implemented
and stored in the 32 Mail Box Buffers.
5.
Execute Read of the 32 Mail Box Buffers at Base A
40H to 7EH.
6.
Take the average of the 32 ADC values and save this number
as CountCALLO.
Determination of the CountCALHI Value
7.
Execute Write of 042AH to Control Register at Base Address
+ 00H.
a) Select Straight Binary
b) External Trigger Input
c)
Select 1.2250v Calibration Voltage
d) Burst Single Scan Mode
e) Timer
Disabled
f) Interrupts
Disabled
8.
Writing the Start Channel Value, End Channel Value, and the
Gain Selects is not necessary if they have not been changed
from that programmed in steps 2 and 3 above.
9.
Execute Write 0001H to the Start Convert Bit at Base
A 10H. This starts a burst single mode of
conversions. Thirty two conversions of the 1.2250 calibration
voltage are implemented and stored in the 32 Mail Box
Buffers.
10. Execute Read of the 32 Mail Box Buffers at Base A
40H to 7EH.
11. Take the average of the 32 ADC values and save this number
as CountCALHI.
Calculate Equation 2
Calculate m = actual_slope from equation 2, since all parameters
are known. It is now possible to correct input channel data
from any input channel using the same input range (i.e. 0 to
+1.25 volts with a PGA gain = 8). Repeat the above steps
periodically to re-measure the calibration parameters
(CountCALHI and CountCALLO) as required.
Measure Channels 3 to 13 Single Ended and Correct Using
Uniform Single Mode
12. Execute Write of 0A0AH to Control Register at Base Address
+ 00H.
a) Select Straight Binary
b) External Trigger Input
c)
Select Single Ended Input
d) Uniform Single Scan Mode
e) Timer
Enabled
f) Interrupts
Disabled
13. Execute Write of 0D03H to End/Start Channel Value Register
at Base A 06H. This will permit conversions of
channels 3 to 13. Writing the Gain Selects is not necessary
since they do not need to change from that programmed in
step 3 above.
14. Execute Write of 50H, as a byte data transfer, to the Timer
Prescaler at Base A 02H. This sets the Timer
Prescaler to 80 decimal.
15. Execute Write 0008H to the Conversion Timer at Base
A 04H. This Conversion Timer value in conjunction
with the Timer Prescaler sets the interval time between
conversions to (80
∗
8)
÷
8 = 80
µ
seconds.
16. Execute Write 0001H to the Start Convert Bit at Base
A 10H. This starts a uniform single mode of
conversions. Conversions of channels 3 to 13 are
implemented and stored in their corresponding Mail Box
Buffers.
17. Execute Read of the Mail Box Buffers at Base A 46H
to 5AH. The data represents the uncorrected “Count_Actual”
term in equation 1. Since all parameters on the right hand
side of equation 1 are known. The calibrated value
"Corrected_Count" can be calculated for each of the
channels.
18. If channel response time requirements are not high speed it
is recommended that a running average (i.e. of the last 8, 16,
32, etc.) of readings be maintained for each channel. This
will minimize noise effects and provide the best accuracy.
Error checking should be performed on the "Corrected_Count"
value to make sure that calculated values below 0 or above 65,535
are restricted to those end points. Note that the software
calibration cannot recover signals near the end points of each
range which are clipped off due to the uncalibrated hardware (e.g.
PGA and ADC) or power supply limitations.
See the specification chapter for details regarding the
maximum corrected (i.e. calibrated) error.