Analog-to-Digital Converter (ADC)
Overview
The Analog-to-Digital Converter (ADC) converts analog signals to digital values. It has up to 12-bit resolution and is capable of a sampling rate of up to 1 MSPS. The input selection is flexible, and both differential and single-ended measurements can be performed. In addition, several internal signal inputs are available. The ADC can provide both signed and unsigned results.
ADC measurements can be started by either application software or an incoming event from another peripheral in the device. ADC measurements can be started with predictable timing and without software intervention. Both internal and external reference voltages can be used.
An integrated temperature sensor is available for use with the ADC. The Voltage Reference output (INTREF) reference, as well as the scaled I/O and core voltages, can also be measured by the ADC. The ADC has a compare function for accurate monitoring of user-defined thresholds, with minimum software intervention required.
The ADC can be configured for 8-, 10- or 12-bit results. ADC conversion results are provided left- or right-adjusted, which eases calculation when the result is represented as a signed value.
A Direct Memory Access (DMA) channel is available to move the ADC results directly to memory or peripherals when conversions are done.
Features
- 8-bit, 10-bit or 12-bit resolution
- Up to 1,000,000 samples per second (1 MSPS)
- Differential and single-ended inputs
- Up to 10 analog inputs: 10 positive and eight negative, including internal and external
- Internal inputs:
- Internal temperature sensor
- Bandgap voltage, INTREF voltage reference
- Scaled core supply
- Scaled I/O supply
- Digital-to-Analog Converter (DAC)
- Operational Amplifier Controller (OPAMP)
- Single, continuous, and sequencing options
- Windowing monitor with selectable channel
- Conversion range: Vref = [1.0V to VDDANA ]
- Built-in internal reference and external reference options
- Event-triggered conversion for accurate timing (one event input)
- Optional DMA transfer of conversion settings or result
- Hardware gain and offset compensation
- Averaging and oversampling with decimation to support up to 16-bit result
- Selectable sampling time
- Flexible power or throughput rate management
Block Diagram
Principle of Operation
Using the ADC's I/O lines requires the I/O pins to be configured using the IO Pin Controller (PORT).
I/O-pins (AINx), as well as the VREFA/VREFB reference voltage pins, are analog inputs to the ADC. Any internal reference source, such as a bandgap voltage reference, or DAC, must be configured and enabled prior to its use with the ADC. The analog signals of Analog Comparator (AC), ADC, DAC, and OPAMP can be interconnected. The AC and ADC peripheral can request the OPAMP using an analog ONDEMAND functionality.
The ADC will continue to operate in any Sleep mode where the selected source clock is running. The ADC’s interrupts, except the OVERRUN interrupt, can be used to wake up the device from Sleep modes. Events connected to the event system can trigger other operations in the system without exiting Sleep modes.
The ADC bus clock (CLK_ADC_APB) can be enabled in the Main Clock, which also defines the default state. The ADC requires a generic clock (GCLK_ADC). This clock must be configured and enabled in the Generic Clock Controller (GCLK) before using the ADC. A generic clock is asynchronous to the bus clock. Due to this asynchronicity, writes to certain registers will require synchronization between the clock domains. Refer to the "Synchronization" section in the device data sheet ("Oscillators Controller" chapter) for further details.
The DMA request line is connected to the DMA Controller (DMAC). Using the ADC DMA requests requires the DMA Controller to be configured first. The interrupt request line is connected to the interrupt controller. Using the ADC interrupt requires the interrupt controller to be configured first. The events are connected to the Event System.
By default, the ADC provides results with 12-bit resolution. 8-bit or 10-bit results can be selected in order to reduce the conversion time. The ADC has an oversampling with decimation option that can extend the resolution to 16 bits. The input values can be either internal (e.g., an internal temperature sensor) or external (connected I/O pins). The user can also configure whether the conversion should be single-ended or differential.
Refer to the "ADC – Analog-to-Digital Converter (ADC)" chapter from the product data sheet for more details.