Microchip logo
  • All
  • Products
  • Documents
  • Applications Notes
×

8-Bit MCUs

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?

Input Enhancement

  • Programmable Gain Amplifier (PGA)
  • Operational Amplifier (Op Amp)
  • Differential Inputs

Core-Independent Operation

  • Operation During Sleep
  • Continuous Operation
  • Auto-Trigger Conversion

Computational Features

  • Thresholding/Window Comparison
  • Accumulation and Averaging
  • Low-Paass Filtering
  • Capacitive Voltage Divider
Programmable Gain Amplifier (PGA) and Operational Amplifier (Op Amp)
+

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.

Differential Inputs
+

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

Continuous Operation
+

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.

Accumulation and Averaging
+

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

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.

Burst Averaging

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.

Recommended Device Families: PIC18-Q43 , PIC16F18446 , AVR DA , ATtiny160

Low-Pass Filtering
+

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.

Recommended Device Families: PIC18-Q43 , PIC18-Q10 , PIC16F18446

Thresholding/Window Comparison
+

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.

Recommended Device Families: PIC18-Q43 , PIC16F18446 , AVR DA, ATtiny1607

Capacitive Voltage Divider
+

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.

Recommended Device Families: PIC18-Q43 , PIC18-Q10, PIC16F18446

Auto-Trigger Conversion
+

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.