Rainbow-electronics ATmega8515L Manuel d'utilisateur Page 160

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 223
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 159
160
ATmega8515(L)
2512A–AVR–04/02
Analog Comparator TheAnalog Comparatorcompares theinput values on the positive pin AIN0and nega-
tive pin AIN1. When thevoltage on the positive pin AIN0ishigher than thevoltage on
the negative pin AIN1, theAnalog ComparatorOutput, ACO, isset. The comparators
output can be set to trigger theTimer/Counter1 Input Capture function. Inaddition, the
comparatorcan trigger a separate interrupt, exclusive to theAnalog Comparator.The
usercan select Interrupttriggering on comparator output rise,fall or toggle. A block dia-
gram of the comparator and itssurrounding logic isshowninFigure 70.
Figure 70. Analog ComparatorBlock Diagram
(1)
Note: 1. Refer to Figure1onpage 2 and Table29 on page 64 for Analog Comparatorpin
placement.
Analog Comparator Control
and Status Register – ACSR
Bit 7 – ACD: Analog Comparator Disable
When thisbit iswritten a logic one, the power to theAnalog Comparator isswitched off.
Thisbit can be set at any time to turnoff theAnalog Comparator.Thiswill reduce power
consumption in Active andIdlemode. When changing theACD bit, theAnalog Compar-
atorInterruptmust be disabledbyclearing theACIE bit in ACSR. Otherwiseaninterrupt
can occurwhen the bit ischanged.
Bit 6 – ACBG: Analog Comparator Bandgap Select
When thisbit isset, a fixedbandgapreferencevoltage replaces the positive input to the
Analog Comparator. When thisbit iscleared, AIN0is applied to the positive input of the
Analog Comparator. See “Internal Voltage Reference” on page 47.
Bit 5 – ACO: Analog Comparator Output
Theoutput of theAnalog Comparator issynchronized and then directly connected to
ACO.The synchronization introduces a delay of 1 - 2 clock cycles.
Bit 4 – ACI: Analog Comparator Interrupt Flag
Thisbit isset by hardware when a comparator output event triggers theinterruptmode
definedbyACIS1and ACIS0. TheAnalog ComparatorInterrupt routine is executed if
ACBG
BANDGAP
REFERENCE
Bit 76543 210
ACD ACBG ACO ACI ACIE ACIC ACIS1 ACIS0 ACSR
Read/Write R/W R/W RR/W R/W R/W R/W R/W
Initial Value 0 0 N/A00000
Vue de la page 159
1 2 ... 155 156 157 158 159 160 161 162 163 164 165 ... 222 223

Commentaires sur ces manuels

Pas de commentaire