Datasheet
PIC18F2220/2320/4220/4320
DS39599G-page 22 © 2007 Microchip Technology Inc.
2.6 Internal Oscillator Block
The PIC18F2X20/4X20 devices include an internal
oscillator block that generates two independent clock
signals. Either can be used as the system’s clock
source. This can eliminate the need for external
oscillator circuits on the OSC1 or OSC2 pins.
The main output (INTOSC) is an 8-MHz clock source
that can be used to directly drive the system clock. It
also drives a post-scaler that can provide a range of
clock frequencies from 125 kHz to 4 MHz. The
INTOSC output is enabled when the system clock
frequency is set from 125 kHz to 8 MHz.
The other clock source is the internal RC oscillator
(INTRC) that provides a 31-kHz output. The INTRC
oscillator is enabled by selecting the internal oscillator
block as the system clock source or by enabling any of
the following:
• Power-up Timer
• Fail-Safe Clock Monitor
• Watchdog Timer
• Two-Speed Start-up
These features are discussed in greater detail in
Section 23.0 “Special Features of the CPU”.
The clock source frequency (INTOSC direct, INTRC
direct or INTOSC post-scaler) is selected by configur-
ing the IRCF bits of the OSCCON register
(Register 2-2).
2.6.1 INTIO MODES
Using the internal oscillator as the clock source can
eliminate the need for up to two external oscillator pins.
This frees the pins to be used for digital I/O.
Two configurations are available:
• INTIO1 mode – The OSC2 pin outputs FOSC/4
while OSC1 functions as RA7 for digital input and
output.
• INTIO2 mode – OSC1 functions as RA7 and
OSC2 functions as RA6, both for digital input and
output.