248
4317I–AVR–01/08
AT90PWM2/3/2B/3B
• Bit 3, 2, 1, 0 – MUX3, MUX2, MUX1, MUX0: ADC Channel Selection Bits
These 4 bits determine which analog inputs are connected to the ADC input. The different set-
ting are shown in
If these bits are changed during a conversion, the change will not take effect until this conversion
is complete (it means while the ADIF bit in ADCSRA register is set).
21.8.2
ADC Control and Status Register A – ADCSRA
• Bit 7 – ADEN: ADC Enable Bit
Set this bit to enable the ADC.
Clear this bit to disable the ADC.
Clearing this bit while a conversion is running will take effect at the end of the conversion.
• Bit 6– ADSC: ADC Start Conversion Bit
Set this bit to start a conversion in single conversion mode or to start the first conversion in free
running mode.
Cleared by hardware when the conversion is complete. Writing this bit to zero has no effect.
The first conversion performs the initialization of the ADC.
• Bit 5 – ADATE: ADC Auto trigger Enable Bit
Set this bit to enable the auto triggering mode of the ADC.
Clear it to return in single conversion mode.
Table 21-4.
ADC Input Channel Selection
MUX3
MUX2
MUX1
MUX0
Description
0
0
0
0
ADC0
0
0
0
1
ADC1
0
0
1
0
ADC2
0
0
1
1
ADC3
0
1
0
0
ADC4
0
1
0
1
ADC5
0
1
1
0
ADC6
0
1
1
1
ADC7
1
0
0
0
ADC8
1
0
0
1
ADC9
1
0
1
0
ADC10
1
0
1
1
AMP0
1
1
0
0
AMP1 (- is ADC8, + is ADC9)
1
1
0
1
Reserved
1
1
1
0
Bandgap
1
1
1
1
GND
Bit
7
6
5
4
3
2
1
0
ADEN
ADSC
ADATE
ADIF
ADIE
ADPS2
ADPS1
ADPS0
ADCSRA
Read/Write
R/W
R/W
R/W
R
R/W
R/W
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
Содержание AT90PWM2
Страница 344: ...346 4317I AVR 01 08 AT90PWM2 3 2B 3B 31 1 SO24...
Страница 345: ...347 4317I AVR 01 08 AT90PWM2 3 2B 3B 31 2 SO32...
Страница 346: ...348 4317I AVR 01 08 AT90PWM2 3 2B 3B 31 3 QFN32...
Страница 347: ...349 4317I AVR 01 08 AT90PWM2 3 2B 3B...