will not be affected and the full dynamic range of the ADC will be maintained for any trim value. Calling the
Device_cal() function writes the ADCOFFTRIM register with the factory calibrated offset error correction, but the
user can modify the ADCOFFTRIM register to compensate for additional offset error induced by the application
environment. This can be done without sacrificing an ADC channel by using the VREFLOCONV bit in the
ADCCTRL1 register.
Use the following procedure to re-calibrate the ADC offset:
1.
Set ADCOFFTRIM to 80 (50h)
. This adds an artificial offset to account for negative offset that may reside in
the ADC core.
2.
Set ADCCTL1.VREFLOCONV to 1.
This internally connects VREFLO to input channel B5. See the
ADCCTL1 register description.
3.
Perform multiple conversions on B5 (sample VREFLO) and take an average to account for board
noise.
See
on how to setup and initiate the ADC to sample B5.
4.
Set ADCOFFTRIM to 80 (50h) minus the average obtained in step 3.
This removes the artificial offset
from step 1 and creates a two's compliment of the offset error.
5.
Set ADCCTL1.VREFLOCONV to 0.
This connects B5 back to the external ADCINB5 input pin.
Note
The AdcOffsetSelfCal() function located in F2806x_Adc.c in the common header files performs these
steps.
8.9.3 ADC Full Scale Gain Calibration
Gain error occurs as an incremental error as the voltage input is increased. Full scale gain error occurs at the
maximum input voltage. As in offset error, gain error can be positive or negative. A positive full scale gain error
means that the full scale digital result is reached before the maximum voltage is input. A negative full scale error
implies that the full digital result will never be achieved. The calibration function Device_cal() writes a factory
trim value to correct the ADC full scale gain error into the ADCREFTRIM register. This register should not be
modified after the Device_cal() function is called.
8.9.4 ADC Bias Current Calibration
To further increase the accuracy of the ADC, the calibration function Device_cal() also writes a factory trim value
to an ADC register for the ADC bias currents. This register should not be modified after the Device_cal() function
is called.
8.10 Internal/External Reference Voltage Selection
8.10.1 Internal Reference Voltage
The ADC can operate in two different reference modes, selected by the ADCCTL1.ADCREFSEL bit. By default
the internal bandgap is chosen to generate the reference voltage for the ADC. This will convert the voltage
presented according to a fixed scale 0 to 3.3 V range. The equation governing conversions in this mode is:
Digital Value = 0
when Input ≤ 0 V
Digital Value = 4096 [(Input – VREFLO)/3.3 V]
when 0 V < Input < 3.3 V
Digital Value = 4095,
when Input ≥ 3.3 V
*All fractional values are truncated
**VREFLO must be tied to ground in this mode. This is done internally on some devices.
Analog-to-Digital Converter (ADC)
526
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......