Rev. 1.1
47
C8051F350/1/2/3
5.3.1. Error Conditions
Any errors during a conversion or calibration are indicated using bits in the ADC0STA register. The
AD0S3C flag will be set to ‘1’ if there is a SINC3 filter clip during the conversion. Likewise, the AD0FFC
flag will be set to ‘1’ if there is a Fast filter clip during the conversion. A filter clip occurs whenever an inter-
nal filter register overflows during a conversion. The AD0OVR flag will be set to ‘1’ if an ADC overrun con-
dition occurs. An overrun occurs if the end of a conversion is reached while the AD0INT flag is still set to ‘1’
from the previous conversion. If the data registers have not been read, the new data values will be
updated, and the previous conversion will be lost. The general AD0ERR flag indicates that an AD0S3C,
AD0FFC, or AD0OVR error condition has occurred, or that a calibration resulted in a value that was
beyond the limits of the offset or gain register. The data output registers are updated at the end of every
conversion regardless of whether or not an error occurs.
5.4.
Offset DAC
An 8-bit offset DAC is included, which can be used for offset correction up to approximately ±1/2 of the
ADC’s input range on any PGA gain setting. The ADC0DAC register (
SFR Definition 5.7) controls the off-
set DAC voltage. The register is decoded as a signed binary word. The MSB (bit 7) determines the sign of
the DAC magnitude (0 = positive, 1 = negative), and the remaining seven bits (bits 6–0) determine the
magnitude. Each LSB of the offset DAC is equivalent to approximately 0.4% of the ADC’s input span. A
write to the ADC0DAC register initiates a change on the offset DAC output.
5.5.
Burnout Current Sources
The burnout current sources can be used to detect an open circuit or short circuit at the ADC inputs. The
burnout current sources are enabled by setting the AD0BCE bit in register ADC0CN to ‘1’ (
SFR Definition5.1). The positive-channel burnout current source sources approximately 2 A on AIN+, and the negative-
channel burnout current sinks approximately 2 A on AIN–. If an open circuit exists between AIN+ and
AIN– when the burnout current sources are enabled, the ADC will read a full scale positive value. If a
short-circuit exists between AIN+ and AIN– when the burnout current sources are enabled, the ADC will
read a value near zero. The burnout current sources should be disabled during normal ADC measure-
ments.
Table 5.1. ADC0 Unipolar Output Word Coding (AD0POL = 0)
Input Voltage* (AIN+ – AIN–) 24-bit Output Word (C8051F350/1) 16-bit Output Word (C8051F352/3)
VREF – 1 LSB
0xFFFFFF
0xFFFF
VREF / 2
0x800000
0x8000
+1 LSB
0x000001
0x0001
0
0x000000
0x0000
*Note:
Input Voltage is voltage at ADC inputs after amplification by the PGA.
Table 5.2. ADC0 Bipolar Output Word Coding (AD0POL = 1)
Input Voltage* (AIN+ – AIN–) 24-bit Output Word (C8051F350/1) 16-bit Output Word (C8051F352/3)
VREF – 1 LSB
0x7FFFFF
0x7FFF
VREF / 2
0x400000
0x4000
+1 LSB
0x000001
0x0001
0
0x000000
0x0000
–1 LSB
0xFFFFFF
0xFFFF
–VREF / 2
0xC00000
0xC000
–VREF
0x800000
0x8000
*Note:
Input Voltage is voltage at ADC inputs after amplification by the PGA.