42.
AC – Analog Comparators
42.1. Overview
The Analog Comparator (AC) supports two individual comparators. Each comparator (COMP) compares
the voltage levels on two inputs, and provides a digital output based on this comparison. Each
comparator may be configured to generate interrupt requests and/or peripheral events upon several
different combinations of input change.
Hysteresis and propagation delay are two important properties of the comparators’ dynamic behavior.
Both parameters may be adjusted to achieve the optimal operation for each application.
The input selection includes four shared analog port pins and several internal signals. Each comparator
output state can also be output on a pin for use by external devices.
The comparators are always grouped in pairs on each port. The AC peripheral implements one pair of
comparators. These are called Comparator 0 (COMP0) and Comparator 1 (COMP1) They have identical
behaviors, but separate control registers. The pair can be set in window mode to compare a signal to a
voltage range instead of a single voltage level.
42.2. Features
•
Two individual comparators
•
Selectable propagation delay versus current consumption
•
Selectable hysteresis
–
4-levels or Off
•
Analog comparator outputs available on pins
–
Asynchronous or synchronous
•
Flexible input selection:
–
Four pins selectable for positive or negative inputs
–
Ground (for zero crossing)
–
Bandgap reference voltage
–
64-level programmable VDD scaler per comparator
•
Interrupt generation on:
–
Rising or falling edge
–
Toggle
–
End of comparison
•
Window function interrupt generation on:
–
Signal above window
–
Signal inside window
–
Signal below window
–
Signal outside window
•
Event generation on:
–
Comparator output
–
Window function inside/outside window
•
Optional digital filter on comparator output
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
1030