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

  • 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 76
77
ATmega8515(L)
2512A–AVR–04/02
8-bit Timer/Counter0
with PWM
Timer/Counter0is ageneralpurpose,single channel, 8-bit Timer/Counter module. The
main features are:
Single Channel Counter
Clear Timer on Compare Match (Auto Reload)
Glitch-free, Phase Correct Pulse Width Modulator (PWM)
Frequency Generator
External Event Counter
10-bit Clock Prescaler
Overflow and Compare Match Interrupt Sources (TOV0 and OCF0)
Overview A simplifiedblock diagram of the8-bit Timer/Counter isshowninFigure 33. For the
actualplacement ofI/Opins, refer to “Pinout ATmega8515” on page 2. CPU accessible
I/O Registers, including I/Obits andI/Opins, are showninbold.The device-specificI/O
register andbit locations are listed in the“8-bit Timer/Counter RegisterDescription” on
page 87.
Figure 33. 8-bit Timer/CounterBlock Diagram
Registers TheTimer/Counter(TCNT0) andOutput CompareRegister(OCR0) are8-bit registers.
Interrupt request (abbreviated to Int.Req.inthe figure)signals areall visibleintheTimer
Interrupt Flag Register(TIFR).All interrupts areindividually maskedwith theTimer
Interrupt Mask Register(TIMSK).TIFRand TIMSK are not showninthe figure since
these registers are sharedbyother timer units.
TheTimer/Countercan be clocked internally, via the prescaler, orbyan externalclock
sourceontheT0pin. The Clock Select logicblock controls which clock sourceand edge
theTimer/Counter uses to increment (ordecrement) its value. TheTimer/Counter is
Timer/Counter
DATA B U S
=
TCNTn
Waveform
Generation
OCn
= 0
Control Logic
=
0xFF
BOTTOM
count
clear
direction
TOVn
(Int.Req.)
OCRn
TCCRn
Clock Select
Tn
Edge
Detector
( From Prescaler )
clk
Tn
TOP
OCn
(Int.Req.)
Zobrazit stránku 76
1 2 ... 72 73 74 75 76 77 78 79 80 81 82 ... 222 223

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

Žádné komentáře