Asynchronous timer clock – clkasy, Adc clock – clkadc, Clock sources – Rainbow Electronics ATmega128L User Manual
Page 34: Crystal oscillator, Atmega128(l)

34
ATmega128(L)
2467B–09/01
Asynchronous Timer Clock –
clk
ASY
The Asynchronous Timer clock allows the Asynchronous Timer/Counter to be clocked
directly from an external 32 kHz clock crystal. The dedicated clock domain allows using
this Timer/Counter as a real-time counter even when the device is in sleep mode.
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 accu-
rate ADC conversion results.
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 7. The frequency of the watchdog oscil-
lator is voltage dependent as shown in the
“ATmega128 Typical Characteristics –
Preliminary Data” on page 322. The device is shipped with CKSEL = “0001” and SUT =
“10” (1 MHz Internal RC Oscillator, slowly rising power).
Note:
1. Values are guidelines only. Actual values are TBD.
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 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 can not be used to drive other clock
buffers.
Table 6. Device Clocking Options Select
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 7. Number of Watchdog Oscillator Cycles
Time-out (V
CC
= 5.0V)
Time-Out (V
CC
= 3.0V)
Number of Cycles
4 ms
4 ms
4K
64 ms
64 ms
64K