Datasheet

276
ATmega640/1280/1281/2560/2561
2549K–AVR–01/07
Analog Comparator
Multiplexed Input
It is possible to select any of the ADC15:0 pins to replace the negative input to the Ana-
log Comparator. The ADC multiplexer is used to select this input, and consequently, the
ADC must be switched off to utilize this feature. If the Analog Comparator Multiplexer
Enable bit (ACME in ADCSRB) is set and the ADC is switched off (ADEN in ADCSRA is
zero), MUX5 and MUX2:0 in ADMUX select the input pin to replace the negative input to
the Analog Comparator, as shown in Table 124. If ACME is cleared or ADEN is set,
AIN1 is applied to the negative input to the Analog Comparator.
Table 124. Analog Comparator Mulitiplexed Input
ACME ADEN MUX5 MUX2:0 Analog Comparator Negative Input
0 x x xxx AIN1
1 1 x xxx AIN1
1 0 0 000 ADC0
1 0 0 001 ADC1
1 0 0 010 ADC2
1 0 0 011 ADC3
1 0 0 100 ADC4
1 0 0 101 ADC5
1 0 0 110 ADC6
1 0 0 111 ADC7
1 0 1 000 ADC8
1 0 1 001 ADC9
1 0 1 010 ADC10
1 0 1 011 ADC11
1 0 1 100 ADC12
1 0 1 101 ADC13
1 0 1 110 ADC14
1 0 1 111 ADC15