Perform the following procedure to adjust ADC input. We recommend averaging ADC values over at least 256 samples in order to provide the most accurate calibration possible, reference the Voltage Input Conversion section under the ADC Data Register description. Full scale or gain calibration relies on the use of an external precision voltage source (or one can use a DAC output for this purpose as well).
- Select the desired input mode by configuring J8 for differential or single-ended inputs.
- Select the desired input range by configuring J9 for unipolar or bipolar inputs.
- Calibration of potentiometer PGA_OFF (R3), if present. If R3 is not present, then skip to step #4 below.
- Short J7 pin 36 to J7 pin 37. In the case of differential inputs (J8 not stuffed), also short J7 pin 35 to J7 pin 37.
- Using a voltmeter connected to the two test points VPGA and AGND, adjust R3 to obtain zero volts (+/- 1 LSB).
- Set the desired gain by writing to the ADC Configuration Register (base_address + 11) to the desired ADC input gain.
- Set the ADC Channel Register (base_address + 2) to zero so that we are observing input channel zero.
- Offset Adjustment.
- In the case of single-ended inputs (jumper J8 installed), short J7 pin 35 to J7 pin 37; effectively connecting the single-ended input to analog ground. In the case of differential inputs (jumper J8 not installed), short J7 pin 35 and pin 36 to J7 pin 37; effectively connecting the differential input to analog ground.
- While performing ADC conversions and reading the ADC value, adjust potentiometer ADC_OFFSET (R4) until the nearest zero value can be achieved, typically within one ADC step or LSB.
- Remove all jumpers from the I/O connector at J7.
- Gain Adjustment.
- In the case of single-ended inputs (jumper J8 installed), connect J7 pin 36 to the full scale voltage source. In the case of differential inputs (jumper J8 not installed), connect J7 pin 35 to J7 pin 37 and J7 pin 36 to the full scale voltage source. Adjust the DAC output for ADC full-scale input minus two LSB. Measure this value using a calibrated voltmeter to the accuracy you require.
- While performing ADC conversions and reading the ADC value, adjust potentiometer ADC_GAIN (R5) until full scale minus two LSB is achieved. This can be achieved through averaging ADC values. Please reference ADC Conversion Register for software example on how to average data.
- Remove all jumpers from the I/O connector at J7.
- Repeat steps 5 through 8 until the ADC input is calibration to within the accuracy you need or +/- 2 LSB.