Datasheet

ADuC814
Rev. A | Page 23 of 72
ADCCON2 (ADC CONTROL SFR 2)
The ADCCON2 (byte addressable) register controls ADC channel selection and conversion modes as detailed below.
SFR Address D8H
SFR Power-On Default 00H
Bit Addressable Yes
ADCI ADCSPI CCONV SCOVC CS3 CS2 CS1 CS0
Table 7. ADCCON2 SFR Bit Designations
Bit No. Name Description
7 ADCI ADC Interrupt Bit.
ADCI is set at the end of a single ADC conversion cycle. If the ADC interrupt is enabled, the ADCI bit is cleared when
user code vectors to the ADC interrupt routine. Otherwise the ADCI bit should be cleared by the user code.
6 ADCSPI ADCSPI Mode Enable Bit.
ADCSPI is set to enable the ADC conversion results to be transferred directly to the SPI data buffer (SPIDAT) without
intervention from the CPU.
5 CCONV Continuous Conversion Bit.
CCONV is set to initiate the ADC into a continuous mode of conversion. In this mode the ADC starts converting
based on the timing and channel configuration already set up in the ADCCON SFRs. The ADC automatically starts
another conversion once a previous conversion cycle has completed. When operating in this mode from 3 V
supplies, the ADC should be configured for ADC clock divide of 16 using CK1 and CK0 bits in ADCCON1, and ADC
acquisition time should be set to four ADC clocks using AQ1, AQ0 bits in ADCCON1 SFR.
4 SCONV Single Conversion Bit.
SCONV is set to initiate a single conversion cycle. The SCONV bit is automatically reset to 0 on completion of the
single conversion cycle. When operating in this mode from 3 V supplies, the maximum ADC sampling rate should
not exceed 147 kSPS.
3 CS3 Channel Selection Bits.
2
1
CS2
CS1
CS3–CS0 allow the user to program the ADC channel selection under software control. Once a conversion is
initiated, the channel converted is pointed to by these channel selection bits.
0 CS0 The Channel Select bits operate as follows:
CS3 CS2 CS1 CS0 CHANNEL
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 X Not a vaild selection. No ADC channel selected.
0 1 1 1 X Not a valid selection. No ADC channel selected.
1 0 0 0 Temperature Sensor
1 0 0 1 DAC0
1 0 1 0 DAC1
1 0 1 1 AGND
1 1 0 0 V
REF