atmega323l ATMEL Corporation, atmega323l Datasheet - Page 46

no-image

atmega323l

Manufacturer Part Number
atmega323l
Description
Atmega323 8-bit Avr Microcontroller With 32k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
46
ATmega323(L)
Figure 33. Timer/Counter2 Block Diagram
The 8-bit Timer/Counter0 can select clock source from CK, prescaled CK, or an external
pin.
The 8-bit Timer/Counter2 can select clock source from CK, prescaled CK, external
TOSC1 or prescaled external TOSC1.
Both Timers/Counters can be stopped as described in section “Timer/Counter0 Control
Register – TCCR0” on page 47 and “Bit 7 – FOC0/FOC2: Force Output Compare” on
page 47.
The various Status Flags (Overflow and Compare Match) are f ound in the
Timer/Counter Interrupt Flag Register – TIFR (see page 36). Control signals are found in
the Timer/Counter Control Register – TCCR0 and TCCR2. The interrupt enable/disable
settings are found in the Timer/Counter Interrupt Mask Register – TIMSK (see page 34).
When Timer/Counter0 is externally clocked, the external signal is synchronized with the
Oscillator frequency of the CPU. To assure proper sampling of the external clock, the
minimum time between two external clock transitions must be at least one internal CPU
clock period. The external clock signal is sampled on the rising edge of the internal CPU
clock.
The 8-bit Timer/Counters feature both a high-resolution and a high-accuracy usage with
the lower prescaling opportunities. Similarly, the high-prescaling opportunities make the
Timer/Counter0 useful for lower speed functions or exact timing functions with infre-
quent actions.
7
7
7
TIMER/COUNTER2
8-BIT COMPARATOR
OUTPUT COMPARE
REGISTER2 (OCR2)
REGISTER (TIMSK)
TIMER INT. MASK
8-BIT DATA BUS
8-BIT ASYNCH T/C2 DATA BUS
(TCNT2)
PCK2
0
0
0
CK
T/C2 OVER-
FLOW IRQ
T/C CLEAR
T/C CLK SOURCE
UP/DOWN
REGISTER (TIFR)
TIMER INT. FLAG
SYNCH UNIT
T/C2 COMPARE
MATCH IRQ
REGISTER (TCCR2)
CONTROL
T/C2 CONTROL
LOGIC
REGISTER (ASSR)
ASYNCH. STATUS
SPECIAL FUNCTIONS
IO REGISTER (SFIOR)
1457G–AVR–09/03
TOSC1
CK

Related parts for atmega323l