Datasheet
351
XMEGA B [DATASHEET]
8291B–AVR–01/2013
Figure 27-1. Analog comparator overview.
27.3 Input Sources
Each analog comparator has one positive and one negative input. Each input may be chosen from a selection of analog
input pins and internal inputs such as a V
CC
voltage scaler. The digital output from the analog comparator is one when
the difference between the positive and the negative input voltage is positive, and zero otherwise.
27.3.1 Pin Inputs
Any of analog input pins on the port can be selected as input to the analog comparator.
27.3.2 Internal Inputs
Two internal inputs are available for the analog comparator:
Bandgap reference voltage
Voltage scaler, which provides a 64-level scaling of the internal V
CC
voltage
27.4 Signal Compare
In order to start a signal comparison, the analog comparator must be configured with the preferred properties and inputs
before the module is enabled. The result of the comparison is continuously updated and available for application
software and the event system.
27.5 Interrupts and Events
The analog comparator can be configured to generate interrupts when the output toggles, when the output changes from
zero to one (rising edge), or when the output changes from one to zero (falling edge). Events are generated at all times
for the same condition as the interrupt, regardless of whether the interrupt is enabled or not.
ACnMUXCTRL
ACnCTRL
Interrupt
Mode
Enable
Enable
Hysteresis
Hysteresis
AC1OUT
WINCTRL
Interrupt
Sensititivity
Control
&
Window
Function
Events
Interrupts
AC0OUT
Pin Input
Pin Input
Pin Input
Pin Input
Voltage
Scaler
Bandgap
+
AC0
-
+
AC1
-