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 the figure below. Either a quartz crystal or a ceramic resonator may be used. The CKOPT Fuse selects between two different Oscillator amplifier modes. When CKOPT is programmed, the Oscillator output will oscillate a full rail-to-rail swing on the output. This mode is suitable when operating in a very noisy environment or when the output from XTAL2 drives a second clock buffer. This mode has a wide frequency range. When CKOPT is unprogrammed, the Oscillator has a smaller output swing. This reduces power consumption considerably. This mode has a limited frequency range and it cannot be used to drive other clock buffers.
For resonators, the maximum frequency is 8MHz with CKOPT unprogrammed and 16MHz with CKOPT programmed. 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 the next table. For ceramic resonators, the capacitor values given by the manufacturer should be used.
The Oscillator can operate in three different modes, each optimized for a specific frequency range. The operating mode is selected by the fuses CKSEL3:1 as shown in the following table.
CKOPT(1) | CKSEL3:1 | Frequency Range(MHz) | Recommended Range for Capacitors C1 and C2 for Use with Crystals (pF) |
---|---|---|---|
1 | 101(2) | 0.4 - 0.9 | – |
1 | 110 | 0.9 - 3.0 | 12 - 22 |
1 | 111 | 3.0 - 8.0 | 12 - 22 |
0 | 101, 110, 111 | 1.0 -16.0 | 12 - 22 |
The CKSEL0 Fuse together with the SUT1:0 Fuses select the start-up times as shown in the next table.
CKSEL0 | SUT1:0 | Start-up Time from Power-down and Power-save | Additional Delay from Reset (VCC = 5.0V) | Recommended Usage |
---|---|---|---|---|
0 | 00 | 258 CK(1) | 4.1ms | Ceramic resonator, fast rising power |
0 | 01 | 258 CK(1) | 65ms | Ceramic resonator, slowly rising power |
0 | 10 | 1K CK(2) | – | Ceramic resonator, BOD enabled |
0 | 11 | 1K CK(2) | 4.1ms | Ceramic resonator, fast rising power |
1 | 00 | 1K CK(2) | 65ms | Ceramic resonator, slowly rising power |
1 | 01 | 16K CK | – | Crystal Oscillator, BOD enabled |
1 | 10 | 16K CK | 4.1ms | Crystal Oscillator, fast rising power |
1 | 11 | 16K CK | 65ms | Crystal Oscillator, slowly rising power |