Datasheet

31
2586N–AVR–04/11
ATtiny25/45/85
Notes: 1. These options should only be used when not operating close to the maximum frequency of the
device, and only if frequency stability at start-up is not important for the application. These
options are not suitable for crystals.
2. These options are intended for use with ceramic resonators and will ensure frequency stability
at start-up. They can also be used with crystals when not operating close to the maximum fre-
quency of the device, and if frequency stability at start-up is not important for the application.
6.2.7 Default Clock Source
The device is shipped with CKSEL = “0010”, SUT = “10”, and CKDIV8 programmed. The default
clock source setting is therefore the Internal RC Oscillator running at 8 MHz with longest start-up
time and an initial system clock prescaling of 8, resulting in 1.0 MHz system clock. This default
setting ensures that all users can make their desired clock source setting using an In-System or
High-voltage Programmer.
6.3 System Clock Prescaler
The ATtiny25/45/85 system clock can be divided by setting the “CLKPR – Clock Prescale Regis-
ter” on page 33. This feature can be used to decrease power consumption when the
requirement for processing power is low. This can be used with all clock source options, and it
will affect the clock frequency of the CPU and all synchronous peripherals. clk
I/O
, clk
ADC
, clk
CPU
,
and clk
FLASH
are divided by a factor as shown in Table 6-15 on page 34.
6.3.1 Switching Time
When switching between prescaler settings, the System Clock Prescaler ensures that no
glitches occur in the clock system and that no intermediate frequency is higher than neither the
clock frequency corresponding to the previous setting, nor the clock frequency corresponding to
the new setting.
The ripple counter that implements the prescaler runs at the frequency of the undivided clock,
which may be faster than the CPU’s clock frequency. Hence, it is not possible to determine the
state of the prescaler – even if it were readable, and the exact time it takes to switch from one
clock division to another cannot be exactly predicted.
From the time the CLKPS values are written, it takes between T1 + T2 and T1 + 2*T2 before the
new clock frequency is active. In this interval, 2 active clock edges are produced. Here, T1 is the
previous clock period, and T2 is the period corresponding to the new prescaler setting.
0 11 1K (1024)CK
(2)
14CK + 4 ms
Ceramic resonator,
fast rising power
1 00 1K (1024)CK
(2)
14CK + 64 ms
Ceramic resonator,
slowly rising power
1 01 16K (16384) CK 14CK
Crystal Oscillator,
BOD enabled
1 10 16K (16384) CK 14CK + 4 ms
Crystal Oscillator,
fast rising power
1 11 16K (16384) CK 14CK + 64 ms
Crystal Oscillator,
slowly rising power
Table 6-13. Start-up Times for the Crystal Oscillator Clock Selection (Continued)
CKSEL0 SUT[1:0]
Start-up Time from
Power-down
Additional Delay
from Reset Recommended Usage