UG-498
ADuCM320 Hardware Reference Manual
Rev. C | Page 24 of 196
ADC TYPICAL SETUP SEQUENCE
After being configured via the ADC control and channel selection registers, the ADC converts the analog input and provides a 16-bit
result in the ADC data registers.
The following is an example sequence to set up the ADC and generate a single conversion on AIN0 using a single-ended measurement:
1.
Configure the device as follows:
ADCCON = 0x280;
// Power up the ADC, enable reference buffer, idle mode.
ADCCHA = 0x1100;
// Select AIN0 as the positive ADC input (AIN+) and ADC_REFN as
the negative ADC input (AIN−).
ADCCNVC = 0xA00C8;
// Select 100 kSPS ADC update rate and 500 ns acquisition time.
ADCCON | = 0x2;
// Enable single conversion.
2.
Wait for LV die interrupt
3.
iADCRESULT = ADCDAT0;
// Read the ADC result.)
Note that if the ADC is set from continuous conversion mode to idle mode after a full ADC sequence is completed, ADCSEQ[31] must
be set to 1 before starting another sequence and reconfiguring the ADC back to continuous conversion mode. This ensures that the
sequencer restarts with the first selected channel in ADCSEQ.
ADC INPUT BUFFER
An optional input buffer can be enabled for any ADC input channel on the
The control register IBUFCON controls the input buffer switches as follows:
•
IBUF_BYP (IBUFCON[1:0]) controls the bypass switches on the ADC input buffer. If the input buffer is required on either the
positive or negative input, the bypass switch must be turned off.
•
IBUF_PD (IBUFCON[3:2]) powers up or powers down the ADC input buffer.
ADC INTERNAL CHANNELS
Temperature Sensor Settings
The
provides a voltage output from an on-chip band gap reference that is proportional to the absolute temperature of the low
voltage die. This voltage output is routed through the front end of the ADC multiplexer (effectively, an additional ADC channel input),
facilitating an internal temperature sensor channel that measures die temperature.
The internal temperature sensor is not designed for use as an absolute ambient temperature calculator. Its intended use is as an
approximate indicator of the temperature of the
low voltage analog die.
An ADC temperature sensor conversion differs from a standard ADC voltage. The ADC performance specifications do not apply to the
temperature sensor.
When the temperature sensor channel is selected, the ADC update rate should be 80 kSPS.
The ADC automatically changes the ADC update rate to 80 kSPS when the temperature sensor, AVDD/2, or IOVDD/2 input channel is
selected. If a different ADC sampling rate is required for other channels after the conversion on any of these three channels is completed,
the ADCCNVC register must be updated.
Note that when the sequencer is enabled and includes any of these three channels, the value in the ADCCNVC register does not change
and the ADC sampling rate does not change.
The temperature sensor settings are as follows:
Enable the temperature sensor on the ADC; set ADCCHA[12:0] = 0x1116.