- PIC MCUs
- AVR MCUs
- 8051 MCUs
- Angular Timer
- Configurable Logic Cell
- Cyclic Redundancy Check
- Complementary Waveform Generator
- Direct Memory Access
- Event System
- High Endurance Flash
- Math Accelerator
- Numerically Controlled Oscillator
- Peripheral Pin Select
- Pulse-Width Modulation
- Temperature Indicator
- Timer Peripheral
- Windowed Watch Dog Timer
- Intelligent Analog
- Input and Output Features
- Core Independent
- Functional Safety
- PIC Hardware
- PIC Software
- AVR Hardware
- AVR Software
8-bit Development Tools
Analog-to-Digital Converter with Enhanced Features
What is an ADC with Enhanced Features?
It is often necessary to run some type of computation or analysis on your Analog-to-Digital Converter (ADC) results, whether it is filtering or verifying if a value falls within a certain range or not. Software is normally needed to handle these computations which ties up your Central Processing Unit (CPU). Using an Analog-to-Digital Converter with Computation provides the ability to do complex operations on the data collected by the ADC without needing CPU intervention. Through these on-chip features, you will no longer need to write code to see if your readings fall inside or outside of a certain window, average sample readings, or filter sample readings. Through this intelligent analog on the ADC, much of the computation that you may need can be executed by the peripheral itself instead of occupying your CPU resources.
How are ADCs with Enhanced Features Used?
- Programmable Gain Amplifier (PGA)
- Operational Amplifier (Op Amp)
- Differential Inputs
- Operation During Sleep
- Continuous Operation
- Auto-Trigger Conversion
- Thresholding/Window Comparison
- Accumulation and Averaging
- Low-Paass Filtering
- Capacitive Voltage Divider
The ADCs equipped with a PGA can apply a selective gain (2x, 4x, … 16x) to the input voltage prior to the ADC sampling, which enables the measurement of small amplitude signals. Some MCUs feature one or more integrated op amps which can also be internally connected to the ADC to create a more flexible gain stage.
Some ADCs in PIC® and AVR® MCUs can take differential inputs to improve common-mode noise immunity and resolution in a narrower range. The conversion gives a signed value of the positive ADC input channel minus the negative ADC input channel.
Recommended Device Families: AVR DA
Free Running mode (for AVR MCUs) and Continuous Operation mode (for PIC MCUs) are available for most ADCs on recent PIC and AVR devices. In this mode, the ADC only needs to be triggered once. After being initialized, the ADC will continue to trigger itself until stopped. This enables the ADC to continuously monitor your system without needing CPU intervention.
The following strategies can be used to reduce the signal-to-noise ratio present in analog signal readings. This can provide more precise measurements and reduce the potential for false positives within your system.
Accumulation on PIC Devices
In accumulation mode for PIC devices, each time the ADC is triggered the output is added to an accumulated value. After each ADC trigger, a threshold comparison is performed on the aggregate and if the threshold criteria are met, an interrupt may trigger based on user initialization.
Accumulation on AVR Devices
Accumulation mode on AVR devices behaves differently than that of PIC devices. This mode allows for the ADC to take samples in bursts. Therefore, each time an ADC read is triggered, it takes a user-defined number of samples and adds them together automatically.
Averaging is available on PIC devices. In this behavior mode each time the ADC is triggered the result is added to an accumulated value until a user-defined number of ADC samples has been taken. The resulting value is then divided by the total number of samples, resulting in an average.
When in Burst Averaging mode, whether the device is operating in Free Running / Continuous Operation mode or not, ADC reads will continuously be sampled one after another and accumulated until a user-defined number of samples has been taken. The resulting value is then divided by the total number of samples, resulting in an average.
Threshold Comparison (for PIC MCUs) and Window Comparison (for AVR MCUs) are features that allow you to generate interrupts under certain conditions. If an ADC read falls inside, outside, above or below a configured threshold or window, an interrupt can be generated. With this advanced capability, ADC values can be monitored and can alert your system when certain criteria is met without needing CPU intervention.
Some PIC ADCs offer a Capacitive Voltage Divider, which is extremely useful in capacitive touch applications. It executes the capacitance measurement sequence within the module, so the ADC output can be directly used as the touch sensing data. This feature greatly reduces the code size and execution time compared to using a basic software library.
Most PIC and AVR on-chip ADCs are able to be triggered by an external or internal signal. With this feature, you can precisely control the sampling period of your ADC without any CPU intervention.