Datasheet

39
7728G–AVR–06/10
ATtiny87/ATtiny167
4.5.3 CLKCSR – Clock Control & Status Register
Bit 7 – CLKCCE: Clock Control Change Enable
The CLKCCE bit must be written to logic one to enable change of the CLKCSR bits. The
CLKCCE bit is only updated when the other bits in CLKCSR are simultaneously written to
zero. CLKCCE is cleared by hardware four cycles after it is written or when the CLKCSR bits
are written. Rewriting the CLKCCE bit within this time-out period does neither extend the
time-out period, nor clear the CLKCCE bit.
Bits 6:5 – Res: Reserved Bits
These bits are reserved bits in the ATtiny87/167 and will always read as zero.
Bits 4 – CLKRDY: Clock Ready Flag
This flag is the output of the ‘Clock Availability ’ logic.
This flag is cleared by the ‘Request for Clock Availability’ command or ‘Enable Clock Source
command being entered.
It is set when ‘Clock Availabilitylogic confirms that the (selected) clock is running and is sta-
ble. The delay from the request and the flag setting is not fixed, it depends on the clock
Table 4-10. Clock Prescaler Select
CLKPS3 CLKPS2 CLKPS1 CLKPS0 Clock Division Factor
0000 1
0001 2
0010 4
0011 8
0100 16
0101 32
0110 64
0111 128
1000 256
1 0 0 1 Reserved
1 0 1 0 Reserved
1 0 1 1 Reserved
1 1 0 0 Reserved
1 1 0 1 Reserved
1 1 1 0 Reserved
1 1 1 1 Reserved
Bit 7 65 4 3210
CLKCCE CLKRDY CLKC3 CLKC2 CLKC1 CLKC0 CLKCSR
Read/Write R/W R R R R/W R/W R/W R/W
Initial Value0 00 0 0000