Rainbow-electronics ATmega8515L Uživatelský manuál Strana 90

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 223
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 89
90
ATmega8515(L)
2512A–AVR–04/02
Timer/Counter Register –
TCNT0
TheTimer/Counter Register givesdirectaccess, bothforread andwrite operations, to
theTimer/Counter unit 8-bit counter. Writing to theTCNT0 Registerblocks (removes)
the comparematch on the following timerclock. Modifying the counter(TCNT0)while
the counter isrunning, introduces a risk of missing a comparematch between TCNT0
and the OCR0 register.
Output Compare Register –
OCR0
The Output Compare Registercontains an 8-bit value that iscontinuously compared
with the counter value (TCNT0).Amatch can beused to generateanoutput compare
interrupt, or to generate a waveform output on the OC0 pin.
Timer/Counter Interrupt Mask
Register – TIMSK
Bit 1 – TOIE0: Timer/Counter0 Overflow Interrupt Enable
When theTOIE0 bit iswritten to one, and the I-bit in the Status Register isset (one), the
Timer/Counter0 Overflow interruptis enabled.The corresponding interruptis executed if
an overflow in Timer/Counter0occurs, i.e.,when theTOV0 bit isset in the
Timer/CounterInterrupt Flag Register –TIFR.
Bit 0 – OCIE0: Timer/Counter0 Output Compare Match Interrupt Enable
When the OCIE0 bit iswrittentoone, and the I-bit in the Status Register isset (one), the
Timer/Counter0 Compare Match interruptis enabled.The corresponding interruptis
executed if a comparematch in Timer/Counter0occurs, i.e.,when the OCF0 bit isset in
theTimer/CounterInterrupt Flag Register –TIFR.
Bit 76543 210
TCNT0[7:0] TCNT0
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Bit 76543 210
OCR0[7:0] OCR0
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Bit 76543 210
TOIE1 OCIE1A OCIE1B TICIE1 TOIE0 OCIE0 TIMSK
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value00000000
Zobrazit stránku 89
1 2 ... 85 86 87 88 89 90 91 92 93 94 95 ... 222 223

Komentáře k této Příručce

Žádné komentáře