- PIC MCUs
- AVR MCUs
- 8051 MCUs
- 16-bit Pulse Width Modulation
- 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
- Temperature Indicator
- Timer Peripheral
- Windowed Watch Dog Timer
- Pulse-Width Modulation (PWM)
- Pulse Width Modulation Peripheral on PIC and AVR Microcontrollers
- Intelligent Analog
- 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.
|Basic PIC® ADC||●|
|Basic AVR® ADC||●||●|
|ADC with Computation (PIC)||●||●||●||●||●|
|Advanced ADC (AVR)||●||●||●||●|
|ADC with Gain Stage (AVR)||●||●|
How are ADCs with enhanced features used?
Free Running mode (for AVR MCUs) and Continuous Operation mode (for PIC MCUs) are available for most ADCs on recent PICand 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. Through this, the ADC can 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 a functionality 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 amount of ADC samples are taken. The resulting value is then divided by the total number of samples, resulting in an average.
When in Burst Averaging mode, regardless of if 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.
Low-Pass Filtering mode gathers data until a user-defined number of samples has been collected. A customizable digital low-pass filter within the ADC is then applied to the accumulated value. Through this you can reduce the amount of high-frequency noise on the 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.