Calibration
VCM-DAS-3 Reference Manual
34
Calibration
Calibration, if desired, is accomplished by mathematical transformation in software. Gain for the
board (not individual channels) can be adjusted using the ENCTRL register. Offset adjustments
are not currently implemented on the board.
An SPI transaction to the gain pot will take less than 10 us. However, the Gain pot takes up to 20
ms to update its EEPROM when written to. During calibration, you need to wait 2 ms after the
write command before measuring the voltage of the DAC output.
S
ETTING THE
G
AIN
The range of gain adjustment is 24 mV. The gain is encoded using the eight bits of the
ENDATLO register, so each step equals 0.094 mV. To perform the Set Gain command, write
E0h to the ENCTRL register at I/O port 0x30A, and then write the gain value to the ENDATLO
register at I/O port 0x308. The following procedure is recommended for setting the gain:
1.
Select channel 0 by writing 0h to the DACSEL register at I/O port 0x302.
2.
Output the code for 0V by writing 0h to both the DACHI and DACLO registers.
3.
Using high-precision volt meter (VOM), read the voltage on channel 0. The voltage read
is the offset.
4.
Output the code for known voltage minus the offset to channel 0.
5.
Using the VOM, read voltage on channel 0. The difference between the VOM reading
and the known voltage applied in step 4 is the gain error.
6.
Adjust gain pot up or down to reduce the gain error to the lowest possible amount.
Note that there is no adjustment for offset error. You must accommodate for offset with software.
The gain value you set is non-volatile.
R
EADING THE
G
AIN
To perform the Read Gain operation, write F0h to the ENCTRL register at I/O port 0x30A, and
then read the value of the ENDATLO register at I/O port 0x308.