83
ATtiny25/45/85 [DATASHEET]
2586Q–AVR–08/2013
12. 8-bit Timer/Counter1
The Timer/Counter1 is a general purpose 8-bit Timer/Counter module that has a separate prescaling selection
from the separate prescaler.
12.1
Timer/Counter1 Prescaler
Figure 12-1 shows the Timer/Counter1 prescaler that supports two clocking modes, a synchronous clocking mode
and an asynchronous clocking mode. The synchronous clocking mode uses the system clock (CK) as the clock
timebase and asynchronous mode uses the fast peripheral clock (PCK) as the clock time base. The PCKE bit from
the PLLCSR register enables the asynchronous mode when it is set (‘1’).
Figure 12-1. Timer/Counter1 Prescaler
In the asynchronous clocking mode the clock selections are from PCK to PCK/16384 and stop, and in the synchro-
nous clocking mode the clock selections are from CK to CK/16384 and stop. The clock options are described in
Table 12-5 on page 89 and the Timer/Counter1 Control Register, TCCR1. Setting the PSR1 bit in GTCCR register
resets the prescaler. The PCKE bit in the PLLCSR register enables the asynchronous mode. The frequency of the
fast peripheral clock is 64 MHz (or 32 MHz in Low Speed Mode).
12.2
Counter and Compare Units
The Timer/Counter1 general operation is described in the asynchronous mode and the operation in the synchro-
nous mode is mentioned only if there are differences between these two modes.
Figure 12-2 shows Timer/Counter
1 synchronization register block diagram and synchronization delays in between registers. Note that all clock gat-
ing details are not shown in the figure. The Timer/Counter1 register values go through the internal synchronization
registers, which cause the input synchronization delay, before affecting the counter operation. The registers
TCCR1, GTCCR, OCR1A, OCR1B, and OCR1C can be read back right after writing the register. The read back
values are delayed for the Timer/Counter1 (TCNT1) register and flags (OCF1A, OCF1B, and TOV1), because of
the input and output synchronization.
The Timer/Counter1 features a high resolution and a high accuracy usage with the lower prescaling opportunities.
It can also support two accurate, high speed, 8-bit Pulse Width Modulators using clock speeds up to 64 MHz (or 32
MHz in Low Speed Mode). In this mode, Timer/Counter1 and the output compare registers serve as dual stand-
alone PWMs with non-overlapping non-inverted and inverted outputs. Refer to
page 86 for a detailed description
on this function. Similarly, the high prescaling opportunities make this unit useful for lower speed functions or exact
timing functions with infrequent actions.
TIMER/COUNTER1 COUNT ENABLE
PSR1
CS10
CS11
CS12
PCK 64/32 MHz
0
CS13
14-BIT
T/C PRESCALER
T1CK/2
T1CK
T1CK/4
T1CK/8
T1CK/16
T1CK/32
T1CK/64
T1CK/128
T1CK/256
T1CK/512
T1CK/1024
T1CK/2048
T1CK/4096
T1CK/8192
T1CK/16384
CK
PCKE
T1CK