AT90S/LS4434 and AT90S/LS8535
65
ADC Noise Canceler Function
The ADC features a noise canceler that enables conversion during Idle Mode to reduce noise induced from the CPU core.
To make use of this feature, the following procedure should be used:
1.
Make sure that the ADC is enabled and is not busy converting. Single Conversion Mode must be selected and the
ADC conversion complete interrupt must be enabled.
ADEN = 1
ADSC = 0
ADFR = 0
ADIE = 1
2.
Enter Idle Mode. The ADC will start a conversion once the CPU has been halted.
3.
If no other interrupts occur before the ADC conversion completes, the ADC interrupt will wake up the MCU and
execute the ADC Conversion Complete Interrupt routine.
ADC Multiplexer Select Register – ADMUX
•
Bits 7..3 – Res: Reserved Bits
These bits are reserved bits in the AT90S4434/8535 and always read as zero.
•
Bits 2..0 – MUX2..MUX0: Analog Channel Select Bits 2-0
The value of these three bits selects which analog input ADC7..0 is connected to the ADC. See Table 28 for details.
If these bits are changed during a conversion, the change will not go into effect until this conversion is complete (ADIF in
ADCSR is set).
Table 27.
ADC Conversion Time
Condition
Sample and Hold (Cycles
from Start of Conversion)
Conversion Time (Cycles)
Conversion Time (µs)
Extended Conversion
14
25
125 - 500
Normal Conversion
14
26
130 - 520
Bit
7
6
5
4
3
2
1
0
$07 ($27)
–
–
–
–
–
MUX2
MUX1
MUX0
ADMUX
Read/Write
R
R
R
R
R
R/W
R/W
R/W
Initial value
0
0
0
0
0
0
0
0
Table 28.
Input Channel Selections
MUX2.0
Single-ended Input
000
ADC0
001
ADC1
010
ADC2
011
ADC3
100
ADC4
101
ADC5
110
ADC6
111
ADC7