Rainbow-electronics ATmega8HVD Manuel d'utilisateur Page 88

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 168
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 87
88
8052B–AVR–09/08
ATmega4HVD/8HVD
In 16-bit mode the OCRnB register contains the high byte of the 16-bit Output Compare Reg-
ister. To ensure that both the high and the low bytes are written simultaneously when the CPU
writes to these registers, the access is performed using an 8-bit temporary high byte register
(TEMP). This temporary register is shared by all the other 16-bit registers. See ”Accessing
Registers in 16-bit Mode” on page 82.
16.10.6 TIMSKn – Timer/Counter n Interrupt Mask Register
Bit 3 – ICIEn: Timer/Counter n Input Capture Interrupt Enable
When this bit is written to one, and the I-flag in the Status Register is set (interrupts globally
enabled), the Timer/Counter n Input Capture interrupt is enabled. The corresponding Interrupt
Vector (See Section “11.” on page 51.) is executed when the ICFn flag, located in TIFRn, is
set.
Bit 2 – OCIEnB: Timer/Counter n Output Compare Match B Interrupt Enable
When the OCIEnB bit is written to one, and the I-bit in the Status Register is set, the
Timer/Counter Compare Match B interrupt is enabled. The corresponding interrupt is executed
if a Compare Match in Timer/Counter occurs, i.e., when the OCFnB bit is set in the
Timer/Counter Interrupt Flag Register – TIFRn.
Bit 1 – OCIEnA: Timer/Counter n Output Compare Match A Interrupt Enable
When the OCIEnA bit is written to one, and the I-bit in the Status Register is set, the
Timer/Counter n Compare Match A interrupt is enabled. The corresponding interrupt is exe-
cuted if a Compare Match in Timer/Counter n occurs, i.e., when the OCFnA bit is set in the
Timer/Counter n Interrupt Flag Register – TIFRn.
Bit 0 – TOIEn: Timer/Counter n Overflow Interrupt Enable
When the TOIEn bit is written to one, and the I-bit in the Status Register is set, the
Timer/Counter n Overflow interrupt is enabled. The corresponding interrupt is executed if an
overflow in Timer/Counter n occurs, i.e., when the TOVn bit is set in the Timer/Counter n Inter-
rupt Flag Register – TIFRn.
16.10.7 TIFRn – Timer/Counter n Interrupt Flag Register
Bits 3 – ICFn: Timer/Counter n Input Capture Flag
This flag is set when a capture event occurs, according to the setting of ICENn, ICESn and
ICSn bits in the TCCRnA Register.
ICFn is automatically cleared when the Input Capture Interrupt Vector is executed. Alterna-
tively, ICFn can be cleared by writing a logic one to its bit location.
Bit 76543210
----ICIEnOCIEnBOCIEnATOIEnTIMSKn
Read/Write RRRRR/WR/WR/WR
Initial Value00000000
Bit 76543210
----ICFnOCFnB
OCFnA TOVn TIFRn
Read/Write R R R R R/W R/W R/W R/W
Initial Value00000000
Vue de la page 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 167 168

Commentaires sur ces manuels

Pas de commentaire