attiny167-esxz ATMEL Corporation, attiny167-esxz Datasheet - Page 202

no-image

attiny167-esxz

Manufacturer Part Number
attiny167-esxz
Description
8-bit Avr 8-bit Microcontroller Microcontroller With 16k Bytes In-system Programmable Flash And Lin Controller
Manufacturer
ATMEL Corporation
Datasheet
18. AnaComp - Analog Comparator
18.1
18.1.1
202
Register Description
ATtiny167
ADC Control and Status Register B – ADCSRB
The Analog Comparator compares the input values on the positive pin (AIN1) and negative pin
(AIN0). When the voltage on the positive pin is higher than the voltage on the negative pin, the
Analog Comparator output, ACO, is set. The comparator can trigger a separate interrupt, exclu-
sive to the Analog Comparator. The user can select Interrupt triggering on comparator output
rise, fall or toggle. A block diagram of the comparator and its surrounding logic is shown in
Figure
Figure 18-1. Analog Comparator Block Diagram
Notes:
• Bit 6 – ACME: Analog Comparator Multiplexer Enable
When this bit is written logic one and the ADC is switched off (ADEN in ADCSRA is zero), the
ADC multiplexer selects the positive input to the Analog Comparator. When this bit is written
logic zero, AIN1 is applied to the positive input of the Analog Comparator.
When the Analog to Digital Converter (ADC) is configured as single ended input channel, it is
possible to select any of the ADC[10..0] pins to replace the positive input to the Analog Compar-
ator. The ADC multiplexer (MUX[4..0]) is used to select this input, and consequently, the ADC
must be switched off to utilize this feature.
Bit
Read/Write
Initial Value
ADC Multiplexer
(from ADC)
REFS0
REFS1
Output
ADEN
18-1.
1. See
2. Refer to
(1)
2.56 / 1.1V
Reference
placement.
Internal
Table 18-2 on page 205
BIN
R
ACIRS
7
0
ACME
Figure 1-2 on page 4
(PA7)
(PA6)
AIN1
AIN0
ACME
R/W
1.1 V
2.56 V
2.56 V /2
2.56V /4
2.56V /8
6
0
ACIR0
ACIR1
ACIR1
R/W
5
0
and
and
ACD
Table 18-3 on page 205
Table 9-3 on page 73
ACIR0
R/W
AVcc
4
0
(1)(2)
ACIS1
R
3
0
Sensivity
Interrupt
Control
ACIS0
ADTS2
R/W
for Analog Comparator pin
2
0
ACIE
ADTS1
R/W
1
0
ACO
ACI
Analog Comparator
ADTS0
R/W
0
0
7728A–AUTO–07/08
Interrupt
16-bit Timer/Counter
Input Capture
ADCSRB

Related parts for attiny167-esxz