Datasheet

25
7728G–AVR–06/10
ATtiny87/ATtiny167
4.1.1 CPU Clock – clk
CPU
The CPU clock is routed to parts of the system concerned with the AVR core operation. Exam-
ples of such modules are the General Purpose Register File, the Status Register and the Data
memory holding the Stack Pointer. Halting the CPU clock inhibits the core from performing
general operations and calculations.
4.1.2 I/O Clock – clk
I/O
The I/O clock is used by the majority of the I/O modules, like synchronous Timer/Counter. The
I/O clock is also used by the External Interrupt module, but note that some external interrupts
are detected by asynchronous logic, allowing such interrupts to be detected even if the I/O
clock is halted.
4.1.3 Flash Clock – clk
FLASH
The Flash clock controls operation of the Flash interface. The Flash clock is usually active
simultaneously with the CPU clock.
4.1.4 Asynchronous Timer Clock – clk
ASY
The asynchronous timer clock allows the asynchronous Timer/Counter to be clocked directly
from an external clock or an external low frequency crystal. The dedicated clock domain
allows using this Timer/Counter as a real-time counter even when the device is in sleep mode.
4.1.5 ADC Clock – clk
ADC
The ADC is provided with a dedicated clock domain. This allows halting the CPU and I/O
clocks in order to reduce noise generated by digital circuitry. This gives more accurate ADC
conversion results.
4.2 Clock Sources
The device has the following clock source options, selectable by Flash Fuse bits (default) or
by the CLKSELR register (dynamic clock switch circuit) as shown below. The clock from the
selected source is input to the AVR clock generator, and routed to the appropriate modules.
Notes: 1. For all fuses “1” means unprogrammed while “0” means programmed.
2. Flash Fuse bits.
3. CLKSELR register bits.
Table 4-1. Device Clocking Options Select
(1)
vs. PB4 and PB5 Functionality
Device Clocking Option
CKSEL3..0
(2)
CSEL3..0
(3)
PB4 PB5
External Clock 0000
b
CLKI CLKO - I/O
Calibrated Internal RC Oscillator 8.0 MHz 0010
b
I/O CLKO - I/O
Watchdog Oscillator 128 kHz 0011
b
I/O CLKO - I/O
External Low-frequency Oscillator 01xx
b
XTAL1 XTAL2
External Crystal/Ceramic Resonator (0.4 - 0.9 MHz) 100x
b
XTAL1 XTAL2
External Crystal/Ceramic Resonator (0.9 - 3.0 MHz) 101x
b
XTAL1 XTAL2
External Crystal/Ceramic Resonator (3.0 - 8.0 MHz) 110x
b
XTAL1 XTAL2
External Crystal/Ceramic Resonator (8.0 - 16.0
MHz)
111x
b
XTAL1 XTAL2