Datasheet

214
7728G–AVR–06/10
ATtiny87/ATtiny167
18.2.2 Analog Compare Negative Input
It is possible to select an internal voltage reference to replace the negative input to the Analog
Comparator. The output of a 2-bit DAC using the Internal Voltage Reference of the DAC is
available when ACIRS bit of ACSR register is set. The voltage reference division factor is
done by ACIR[1..0] of ADCSRB register.
If ACIRS is cleared, AIN0 pin is applied to the negative input to the Analog Comparator.
Table 18-2. Analog Comparator Positive Input
ACME ADEN MUX[4..0] Analog Comparator Positive Input - Comment
0 x x xxxx
b
AIN1
ADC
Switched On
x 1 x xxxx
b
AIN1
1 0 0 0000
b
ADC0
ADC Switched Off.
1 0 0 0001
b
ADC1
1 0 0 0010
b
ADC2
1 0 0 0011
b
ADC3 / ISRC
1 0 0 0100
b
ADC4
1 0 0 0101
b
ADC5
1 0 0 0110
b
ADC6
1 0 0 0111
b
ADC7
1 0 0 1000
b
ADC8
1 0 0 1001
b
ADC9
1 0 0 1010
b
ADC10
1 0 Other This doesn’t make sense - Don’t use.
Table 18-3. Analog Comparator Negative Input
ACIRS ACIR[1..0] REFS[1..0] Analog Comparator Negative Input - Comment
0x xAIN0
1x
0 0
b
0 1
b
1 0
b
Reserved
10 0
b
1 1
b
2.56 V - using Internal 2.56V Voltage Reference
10 1
b
1 1
b
1.28 V (
1
/
2
of 2.56 V) - using Internal 2.56V Voltage Reference
11 0
b
1 1
b
0.64 V (
1
/
4
of 2.56 V - using Internal 2.56V Voltage Reference
11 1
b
1 1
b
0.32 V (
1
/
8
of 2.56 V) - using Internal 2.56V Voltage Reference