beautypg.com

System clock, 1 crystal oscillator, 2 external clock source – Rainbow Electronics AT89LP216 User Manual

Page 11: 3 internal rc oscillator, 4 system clock out

background image

11

3621A–MICRO–6/06

AT89LP216 [Preliminary]

9.

System Clock

The system clock is generated directly from one of three selectable clock sources. The three
sources are the on-chip crystal oscillator, external clock source, and internal RC oscillator. The
clock source is selected by the Clock Source User Fuses as shown in

Table 9-1

. No internal

clock division is used to generate the CPU clock from the system clock. See

“User Configuration

Fuses” on page 71

.

9.1

Crystal Oscillator

When enabled, the internal inverting oscillator amplifier is connected between XTAL1 and
XTAL2 for connection to an external quartz crystal or ceramic resonator. When using the crystal
oscillator, P3.2 and P3.3 will have their inputs and outputs disabled. When using the crystal
oscillator, XTAL2 should not be used to drive a board-level clock without a buffer.

9.2

External Clock Source

The external clock option disables the oscillator amplifier and allows XTAL1 to be driven directly
by the clock source. XTAL2 may be left unconnected, used as P3.3 I/O, or configured to output
a divided version of the system clock.

9.3

Internal RC Oscillator

The AT89LP216 has an internal RC oscillator tuned to 8.0 MHz ±2.5%. When enabled
as the clock source, XTAL1 and XTAL2 may be used as P3.2 and P3.3 respectively. XTAL2
may also be configured to output a divided version of the system clock. The frequency of the
oscillator may be adjusted by changing the RC Adjust Fuses. (

See “User Configuration Fuses”

on page 71.

).

9.4

System Clock Out

When the AT89LP216 is configured to use either an external clock or the internal RC oscillator,
a divided version of the system clock may be output on XTAL2 (P3.3). The clock out feature is
enabled by setting the COE bit in CLKREG. The two CDV bits determine the clock divide ratio.
For example, setting COE = “1” and CDIV = “00” when using the internal oscillator will result in a
3.950 MHz (±5%) clock output on P3.3. P3.3 must be configured as an output in order to use the
clock out feature.

Table 9-1.

Clock Source Settings

Clock Source

Fuse 1

Clock Source

Fuse 0

Selected Clock Source

0

0

Crystal Oscillator

0

1

Reserved

1

0

External Clock on XTAL1

1

1

Internal 8 MHz RC Oscillator