27.2 Analog Comparator Multiplexed Input
It is possible to select any of the ADC[7:0] pins to replace the negative input to the analog 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 in the ADC Control and Status Register B (ADCSRB.ACME) is '1' and the ADC is switched off (ADCSRA.ADEN=0), the three least significant analog channel selection bits in the ADC Multiplexer Selection register (ADMUX.MUX[2:0]) select the input pin to replace the negative input to the analog comparator, as shown in the table below. When ADCSRB.ACME=0 or ADCSRA.ADEN=1, AIN1 is applied to the negative input of the analog comparator.
ACME | ADEN | MUX[2:0] | Analog Comparator Negative Input |
---|---|---|---|
0 | x | xxx | AIN1 |
1 | 1 | xxx | AIN1 |
1 | 0 | 000 | ADC0 |
1 | 0 | 001 | ADC1 |
1 | 0 | 010 | ADC2 |
1 | 0 | 011 | ADC3 |
1 | 0 | 100 | ADC4 |
1 | 0 | 101 | ADC5 |
1 | 0 | 110 | ADC6 |
1 | 0 | 111 | ADC7 |