beautypg.com

Timer/counter0 control register – tccr0 – Rainbow Electronics AT90S1200 User Manual

Page 21

background image

21

AT90S1200

0838H–AVR–03/02

Figure 19. Timer/Counter0 Block Diagram

The 8-bit Timer/Counter0 can select clock source from CK, prescaled CK or an external
pin. In a dd itio n i t c an be s to pp ed a s de scribed i n th e sp eci fi ca ti on 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.

Timer/Counter0 Control
Register – TCCR0

• Bits 7..3 – Res: Reserved Bits

These bits are reserved bits in the AT90S1200 and always read as zero.

T0

Bit

7

6

5

4

3

2

1

0

$33

-

-

-

-

-

CS02

CS01

CS00

TCCR0

Read/Write

R

R

R

R

R

R/W

R/W

R/W

Initial Value

0

0

0

0

0

0

0

0