Bit timer/counter0 – Rainbow Electronics AT90S2313 User Manual

Page 28

Advertising
background image

28

AT90S2313

0839I–AVR–06/02

The four different prescaled selections are: CK/8, CK/64, CK/256, and CK/1024, where
CK is the Oscillator clock. For the two Timer/Counters, added selections such as CK,
external clock source and stop can be selected as clock sources.

8-bit Timer/Counter0

Figure 29 shows the block diagram for Timer/Counter0.

The 8-bit Timer/Counter0 can select clock source from CK, prescaled CK or an external
p in . In a dd i tio n, i t can b e sto pp ed as de scri be d i n the spe ci fica tio n fo r th e
Timer/Counter0 Control Register (TCCR0). The Overflow Status Flag is found in the
Timer/Counter Interrupt Flag Register (TIFR). Control signals are found in the
Timer/Counter0 Control Register (TCCR0). The interrupt enable/disable settings for
Timer/Counter0 are found in the Timer/Counter Interrupt Mask Register (TIMSK).

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/Counter0 features 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.

Figure 29. Timer/Counter0 Block Diagram

T0

Advertising