English
Language : 

ATMEGA8U2_14 Datasheet, PDF (223/310 Pages) ATMEL Corporation – 125 Powerful Instructions – Most Single Clock Cycle Execution
ATmega8U2/16U2/32U2
22. Analog Comparator
22.1 Overview
The Analog Comparator compares the input values on the positive pin AIN0 and negative pin
AIN1. When the voltage on the positive pin AIN0 is higher than the voltage on the negative pin
AIN1, 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 com-
parator output rise, fall or toggle. A block diagram of the comparator and its surrounding logic is
shown in Figure 22-1. User can also replace by software the AIN0 input by the internal Bandgap
reference.
Figure 22-1. Analog Comparator Block Diagram(1)
BANDGAP
REFERENCE
ACBG
AIN0
ACMUX
AIN2
AIN3
AIN4
AIN5
AIN6
Notes: 1. Refer to Figure 1-1 on page 2 and Table 12-9 on page 79 for Analog Comparator pin
placement.
7799D–AVR–11/10
223