Datasheet
28
7728G–AVR–06/10
ATtiny87/ATtiny167
4.2.4 Crystal Oscillator
XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier which can be
configured for use as an On-chip Oscillator, as shown in Figure 4-2. Either a quartz crystal or
a ceramic resonator may be used.
C1 and C2 should always be equal for both crystals and resonators. The optimal value of the
capacitors depends on the crystal or resonator in use, the amount of stray capacitance, and
the electromagnetic noise of the environment. Some initial guidelines for choosing capacitors
for use with crystals are given in Table 4-6. For ceramic resonators, the capacitor values given
by the manufacturer should be used.
Figure 4-2. Crystal Oscillator Connections
The Oscillator can operate in three different modes, each optimized for a specific frequency
range. The operating mode is selected by CKSEL3..1 fuses or by CSEL3..1 field as shown in
Table 4-6.
Notes: 1. Flash Fuse bits.
2. CLKSELR register bits.
3. This option should not be used with crystals, only with ceramic resonators.
Table 4-6. Crystal Oscillator Operating Modes
CKSEL3..1
(1)
CSEL3..1
(2)
Frequency Range (MHz)
Recommended Range for Capacitors
C1 and C2 for Use with Crystals (pF)
100
(3)
0.4 - 0.9 –
101 0.9 - 3.0 12 - 22
110 3.0 - 8.0 12 - 22
111 8.0 - 16.0 12 - 22
XTAL2
XTAL1
GND
C2
C1