beautypg.com

Flash clock – clkflash, Clock sources, Crystal oscillator – Rainbow Electronics ATmega8515L User Manual

Page 32: Atmega8515(l)

background image

32

ATmega8515(L)

2512A–AVR–04/02

Flash Clock – clk

FLASH

The Flash clock controls operation of the Flash interface. The Flash clock is usually
active simultaneously with the CPU clock.

Clock Sources

The device has the following clock source options, selectable by Flash Fuse bits as
shown below. The clock from the selected source is input to the AVR clock generator,
and routed to the appropriate modules.

Note:

1. For all fuses “1” means unprogrammed while “0” means programmed.

The various choices for each clocking option is given in the following sections. When the
CPU wakes up from Power-down or Power-save, the selected clock source is used to
time the start-up, ensuring stable Oscillator operation before instruction execution starts.
When the CPU starts from Reset, there is as an additional delay allowing the power to
reach a stable level before commencing normal operation. The Watchdog Oscillator is
used for timing this real-time part of the start-up time. The number of WDT Oscillator
cycles used for each time-out is shown in Table 6. The frequency of the Watchdog Oscil-
lator is voltage dependent as shown in “ATmega8515 Typical Characteristics –
Preliminary Data” on page 204.
The device is shipped with CKSEL = “0001” and
SUT = “10” (1 MHz Internal RC Oscillator, slowly rising power).

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 18. Either a quartz
crystal or a ceramic resonator may be used. The CKOPT Fuse selects between two dif-
ferent oscillator amplifier modes. When CKOPT is programmed, the Oscillator output
will oscillate will a full rail-to-rail swing on the output. This mode is suitable when operat-
ing 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 can not be used to drive other clock
buffers.

For resonators, the maximum frequency is 8 MHz with CKOPT unprogrammed and
16 MHz 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 environ-
ment. Some initial guidelines for choosing capacitors for use with crystals are given in
Table 7. For ceramic resonators, the capacitor values given by the manufacturer should
be used.

Table 5. Device Clocking Options Select

(1)

Device Clocking Option

CKSEL3..0

External Crystal/Ceramic Resonator

1111 - 1010

External Low-frequency Crystal

1001

External RC Oscillator

1000 - 0101

Calibrated Internal RC Oscillator

0100 - 0001

External Clock

0000

Table 6. Number of Watchdog Oscillator Cycles

Typ Time-out (V

CC

= 5.0V)

Typ Time-out (V

CC

= 3.0V)

Number of Cycles

4.1 ms

4.3 ms

4K (4,096)

65 ms

69 ms

64K 65,536)