3.9 Performing a DA Autocalibration
On supported boards (-AT boards), the user may auto-calibrate the board's D/A circuit in software, rather than undergoing a tedious process of manual calibration.
Autocalibration is used for two purposes:
- Calibrate the fixed D/A ranges, such as 0-5V or 0-10V
- Calibrate the programmable range, e.g. 0-1V or 0-4.096V
Autocalibration utilizes an autodetect feature to determine the jumper configuration of the D/A circuit, and then calibrates the circuit for the detected range.
NOTE: Performing a D/A autocalibration causes significant fluctuations in the D/A outputs. The fluctuations will either be from mid-scale to full-scale or from zero-scale to full-scale, depending on the board and the range. Be sure these fluctuations will not have adverse effects on any devices connected to the board before performing D/A autocalibration. Otherwise, disconnect the devices from the D/A outputs before performing D/A autocalibration.
Create and initialize a D/A auto-calibration settings structure (DSCDACALPARAMS).
Call dscDAAutoCal and pass it a pointer to this structure in order to calibrate the D/A circuit on the board.
NOTE: Performing a D/A auto-calibration takes about 2-5 seconds depending on the board and the mode.
...
DSCB dscb;
DSCDACALPARAMS dscdacalparams;
BYTE result;
...
/* Step 1 - set the programmable D/A range to 4.096V.
Calibrate voltage point at 0.0.
(jumpers on board are set for programmable range) */
dscdacalparams.da_range = 4.096;
dscdacalparams.cal_point = 0.0;
/* Step 2 */
if ((result = dscDAAutoCal(dscb, &dscdacalparams)) != DE_NONE)
return result;
...
Last modified 4yr ago