Microchip Technology DM240015 Data Sheet

Page of 472
PIC24FJ128GC010 FAMILY
DS30009312B-page 370
 
 2012-2013 Microchip Technology Inc.
27.1
Important Differences Compared 
to Conventional A/Ds
In principle, the Sigma-Delta A/D Converter does what
most other A/Ds do: it samples an analog input voltage
and generates a digital output code representing the
analog voltage. There are, however, a number of differ-
ences when comparing a Sigma-Delta Converter to
conventional A/D Converters, such as the Successive
Approximation Register (SAR) design that is popular
on many of today’s microcontrollers. 
The most important differences that are noticeable at
the application level include:
• Readily achieved resolution/quality of result
• Analog channel sampling methodology
• Uncorrected offset error
• Uncorrected gain error
27.1.1
RESULT QUALITY AND 
OVERSAMPLING
In a typical application, involving switching digital
circuitry, oscillators, clocks and other noise sources
common in a microcontroller-based circuit, it is often
difficult to reduce the high-frequency noise floor below
some arbitrary value. For A/Ds, which perform instan-
taneous “snapshot” based sampling (e.g., charging a
Sample-and-Hold capacitor in a conventional
SAR-based A/D), this noise floor ultimately restricts the
maximum achievable stable result resolution.
To achieve higher effective stable resolution and to
minimize the effects of high-frequency noise, the
Sigma-Delta A/D Converter implements inherent over-
sampling in the design. This oversampling has an
effect similar to low-pass filtering the analog signal and
voltage references to the A/D. Therefore, when the
converter generates a result, the output code rep-
resents the average voltage of the signal or reference
being measured over a specific time window, rather
than an instantaneous snapshot in time (like that of the
SAR-based A/D). This sampling method enables the
Sigma-Delta A/D Converter to generate stable results
at significantly higher resolution than is typically
achievable with conventional A/D designs.
The design of this Sigma-Delta A/D Converter allows
user-configurable Oversampling Ratios (OSRs),
between 16 and 1024. The lowest settings provide the
fastest results, but they sacrifice result code accuracy.
The highest OSR settings provide the best quality and
most stable results, but generate results at a much
slower rate.
27.1.2
UNCORRECTED OFFSET ERROR
When uncorrected, the Sigma-Delta A/D Converter
typically has more LSBs worth of offset error than
conventional SAR-based A/Ds. This is partly due to the
high resolution and small size of each LSB. Additionally,
internal or external input circuitry, such as the internal
input gain stage, can also introduce some offset error.
Fortunately, the Sigma-Delta A/D Converter imple-
ments a feature that allows it to measure its own
internal offset error. This feature is controlled by the
VOSCAL bit (SD1CON1<4>). Once the application
firmware has measured the internal offset error, the
digital output code can be saved in the firmware, and
subsequently subtracted from all future A/D measure-
ments on the regular input channel(s). This procedure
significantly improves the absolute accuracy of the A/D
and is recommended for most applications. 
27.1.3
UNCORRECTED GAIN ERROR
When uncorrected, Sigma-Delta A/D Converters typi-
cally exhibit high gain error compared to other A/D
designs. To obtain high absolute accuracy from the
Sigma-Delta A/D Converter, it is necessary to compen-
sate for both offset error and gain error. Gain error can
be corrected by first removing the offset error, then
multiplying the resulting code with a suitable gain error
correction factor.
One of the input channel settings, selectable in the
SD1CON3 register, allows the A/D to measure its own
references. When a measurement (with a gain of 1) is
performed on this channel, the result code can be cor-
rected for offset error (using the method described in
) and then
used to calculate the gain error correction factor. Once
the gain error correction factor is known, it can be
saved and stored in the firmware, so that it may be
used later to correct for gain error when performing
measurements on the other A/D input channels.