![Atmel AT90S8414 Скачать руководство пользователя страница 57](http://html1.mh-extra.com/html/atmel/at90s8414/at90s8414_manual_3003427057.webp)
AT90S8414
Preliminary
4-57
The Analog Comparator
The analog comparator compares the input values on the positive pin PB2 (AIN0) and negative pin PB3 (AIN1). When
the voltage on the positive pin PB2 (AIN0) is higher than the voltage on the negative pin PB3 (AIN1), the Analog
Comparator Output, ACO is set (one). The comparator’s output can be set to trigger the Timer/Counter1 Input Capture
function. In addition, the comparator can trigger a separate interrupt, exclusive 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 45.
Figure 45: Analog Comparator Block Diagram
THE ANALOG COMPARATOR CONTROL AND STATUS REGISTER - ACSR
Bit
7
6
5
4
3
2
1
0
$08
ACD
-
ACO
ACI
ACIE
ACIC
ACIS1
ACIS0
ACSR
Read/Write
R/W
R
R
R/W
R/W
R/W
R/W
R/W
Initial value
0
0
0
0
0
0
0
0
Bit 7 - ACD : Analog Comparator Disable
When this bit is set(one), the power to the analog comparator is switched off. This bit can be set at any time to turn off
the analog comparator. It is most commonly used if power consumption during Idle Mode is critical, and wake-up from
the analog comparator is not required. When changing the ACD bit, the Analog Comparator Interrupt must be disabled
by clearing the ACIE bit in ACSR. Otherwise an interrupt can occur when the bit is changed.
Bit 6 - Res : Reserved bit:
This bit is a reserved bit in the AT90S8414 and will always read as zero.
Bit 5 - ACO : Analog Comparator Output:
ACO is directly connected to the comparator output.
Bit 4 - ACI : Analog Comparator Interrupt Flag:
This bit is set (one) when a comparator output event triggers the interrupt mode defined by ACI1 and ACI0. The Analog
Comparator Interrupt routine is executed if the ACIE bit is set (one) and the I-bit in SREG is set (one). ACI is cleared by
hardware when executing the corresponding interrupt handling vector. Alternatively, ACI is cleared by writing a logic
one to the flag.
Содержание AT90S8414
Страница 4: ...4 4 AT90S8414 Preliminary...
Страница 6: ...4 6 AT90S8414 Preliminary Block Diagram Figure 1 The AT90S8414 Block Diagram...
Страница 65: ...AT90S8414 Preliminary 4 65 Figure 50 PORTB Schematic Diagram Pin PB5 Figure 51 PORTB Schematic Diagram Pin PB6...
Страница 68: ...4 68 AT90S8414 Preliminary Figure 53 PORTC Schematic Diagram Pins PC0 PC7...
Страница 87: ...AT90S8414 Preliminary 4 87...