English
Language : 

ATMEGA644_0702 Datasheet, PDF (232/374 Pages) ATMEL Corporation – 8-bit Microcontroller with 64K Bytes In- System Programmable Flash
When changing the ACIS1/ACIS0 bits, the Analog Comparator Interrupt must be disabled by
clearing its Interrupt Enable bit in the ACSR Register. Otherwise an interrupt can occur when the
bits are changed.
20.1 Analog Comparator Multiplexed Input
It is possible to select any of the ADC7..0 pins to replace the negative input to the Analog Com-
parator. 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), MUX2..0 in ADMUX
select the input pin to replace the negative input to the Analog Comparator, as shown in Table
20-2. If ACME is cleared or ADEN is set, AIN1 is applied to the negative input to the Analog
Comparator.
Table 20-2.
ACME
0
1
1
1
1
1
1
1
1
1
Analog Comparator Mulitiplexed Input
ADEN
MUX2..0 Analog Comparator Negative Input
x
xxx
AIN1
1
xxx
AIN1
0
000
ADC0
0
001
ADC1
0
010
ADC2
0
011
ADC3
0
100
ADC4
0
101
ADC5
0
110
ADC6
0
111
ADC7
20.1.1 DIDR1 – Digital Input Disable Register 1
Bit
7
6
5
4
3
2
1
0
(0x7F)
–
–
–
–
–
–
AIN1D
AIN0D
DIDR1
Read/Write
R
R
R
R
R
R
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
• Bit 1:0 – AIN1D:AIN0D: AIN1:AIN0 Digital Input Disable
When this bit is written logic one, the digital input buffer on the AIN1/0 pin is disabled. The corre-
sponding PIN Register bit will always read as zero when this bit is set. When an analog signal is
applied to the AIN1/0 pin and the digital input from this pin is not needed, this bit should be writ-
ten logic one to reduce power consumption in the digital input buffer.
232 ATmega644
2593L–AVR–02/07