UG-549
ADuCM310 Hardware Reference Manual
Rev. C | Page 22 of 192
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
VREFN as the negative ADC input (AIN-)
ADCCNVC = 0x1400C8;
// Select 100 kSPS ADC update rate, 500 ns acquisition
time.
ADCCON |=0x2;
// Enable single conversion
2.
Wait for low voltage die interrupt.
lADCResult = 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
MUX
ADC
BUF
IBUFCON[5:0]
IBUFCON[5:0]
V
REF
A
IN
0
A
IN
27
ADCCHA[12:0]
1
1461-
008
Figure 8. ADC Input Buffer
An optional input buffer can be enabled for any ADC input channel on the
The IBUFCON control register controls the input buffer switches as follows:
•
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.
•
IBUFCON[3:2] power up or power down the ADC input buffer.
The input buffer has two options to eliminate the input buffer offset error.
Chop Mode
This mode requires IBUFCON[10] = [1]b. Set IBUFCON[5] = 1 to enable chopping of the positive input buffer.
IBUFCON[4] may be optionally set to enable chopping of the N-side buffer, especially for differential measurements. For single-ended
input measurements where the ADC negative input is ground, it is recommended to clear IBUFCON[4] = 0.