3.4.1 VREFA

Documentation related to an external reference (VREFA) is removed from the ADC sections listed below, as the ATtiny212/214/412/414 Automotive devices do not have a VREFA pin:
  • Features
  • Overview
  • Signal Description
  • ADC Voltage Reference
  • REFSEL in ADCn.CTRLC

The affected ADC sections are listed below, with corrections shown in bold:

Features

  • 10-Bit Resolution
  • 0V to VDD Input Voltage Range
  • Multiple Internal ADC Reference Voltages
  • External Reference Input
  • Single Conversion Mode
  • Interrupt Available on Conversion Complete
  • Optional Interrupt on Conversion Results
  • Temperature Sensor Input Channel
  • Optional Event-Triggered Conversion
  • Window Comparator Function for Accurate Monitoring or Defined Thresholds
  • Accumulation of up to 64 Samples per Conversion

Overview

The Analog-to-Digital Converter (ADC) peripheral produces 10-bit results. The ADC input can either be internal (e.g., a voltage reference) or external through the analog input pins. The ADC is connected to an analog multiplexer, which allows the selection of multiple single-ended voltage inputs. The single-ended voltage inputs refer to 0V (GND).

The ADC supports sampling in bursts where a configurable number of conversion results are accumulated into a single ADC result (Sample Accumulation). Further, a sample delay can be configured to tune the ADC sampling frequency associated with a single burst. This is to tune the sampling frequency away from any harmonic noise aliased with the ADC sampling frequency (within the burst) from the sampled signal. An automatic sampling delay variation feature can be used to randomize this delay to slightly change the time between samples.

The ADC input signal is fed through a sample-and-hold circuit that ensures that the input voltage to the ADC is held at a constant level during sampling.

The voltage reference can be selected from the internal Voltage Reference (VREF) peripheral or the VDD supply voltage.

The selectable voltage references from the internal Voltage Reference (VREF) peripheral, are VDD supply voltage, or external VREF pin (VREFA).

A window compare feature is available for monitoring the input signal. This feature can be configured to only trigger an interrupt on user-defined thresholds for under, over, inside, or outside a window, with minimum software intervention required.

Signal Description

Pin NameTypeDescription
AIN[n:0]Analog inputAnalog input pin
VREFAAnalog inputExternal voltage reference pin

ADC Voltage Reference

The reference voltage for the ADC (VREF) controls the conversion range of the ADC. Input voltages that exceed the selected VREF will be converted to the maximum result value of the ADC. For an ideal 10-bit ADC, this value is 0x3FF.

VREF can be selected by writing the Reference Selection (REFSEL) bits in the Control C (ADCn.CTRLC) register as either VDD, external reference VREFA, or an internal reference from the VREF peripheral. VDD is connected to the ADC through a passive switch.

When using the external reference voltage VREFA, configure ADCnREFSEL[0:2] in the corresponding VREF.CTRLn register to the value that is closest, but above the applied reference voltage. For external references higher than 4.3V, use ADCnREFSEL[0:2] = 0x3.

The internal reference is generated from an internal band gap reference through an internal amplifier controlled by the Voltage Reference (VREF) peripheral.

REFSEL in ADCn.CTRLC

Bit 5:4 - REFSEL Reference Selection

This bit field selects the voltage reference for ADC.

ValueNameDescription
0x0INTERNALInternal reference
0x1VDDVDD
0x2VREFAExternal reference VREFA
Other-Reserved