Datasheet

293
ATmega16U4/32U4 [DATASHEET]
Atmel-7766J-USB-ATmega16U4/32U4-Datasheet_04/2016
23. Analog Comparator
The Analog Comparator compares the input values on the positive pin AIN+ and negative pin AIN-. When the
voltage on the positive pin AIN+ is higher than the voltage on the negative pin AIN-, the Analog Comparator
output, ACO, is set. The comparator’s output can be set to trigger the Timer/Counter1 Input Capture function. In
addition, the comparator can trigger a separate interrupt, exclusive to the Analog Comparator. The user can
select Interrupt triggering on comparator output rise, fall or toggle. A block diagram of the comparator and its
surrounding logic is shown in Figure 23-1
. AIN+ can be connected either to the AIN0 (PE6) pin, or to the internal
Bandgap reference. AIN- can only be connected to the ADC multiplexer.
The Power Reduction ADC bit, PRADC, in “Power Reduction Register 0 - PRR0” on page 47 must be disabled
by writing a logical zero to be able to use the ADC input MUX.
Figure 23-1. Analog Comparator Block Diagram
(2)
Notes: 1. See Table 23-2 on page 295.
2. Refer to “Pinout” on page 3 and Table 10-3 on page 74 for Analog Comparator pin placement.
ACBG
BANDGAP
REFERENCE
ADC MULTIPLEXER
OUTPUT
ACME
ADEN
(1)
AIN+
AIN-
BANDGAP
REFERENCE