English
Language : 

PIC18F23K22 Datasheet, PDF (36/492 Pages) Microchip Technology – 28/40/44-Pin, Low-Power, High-Performance Microcontrollers with nanoWatt XLP Technology
PIC18(L)F2X/4XK22
2.4.4 EXTERNAL RC MODES
The external Resistor-Capacitor (RC) modes support
the use of an external RC circuit. This allows the
designer maximum flexibility in frequency choice while
keeping costs to a minimum when clock accuracy is not
required. There are two modes: RC and RCIO.
2.4.4.1 RC Mode
In RC mode, the RC circuit connects to OSC1. OSC2/
CLKOUT outputs the RC oscillator frequency divided
by 4. This signal may be used to provide a clock for
external circuitry, synchronization, calibration, test or
other application requirements. Figure 2-8 shows the
external RC mode connections.
FIGURE 2-8:
EXTERNAL RC MODES
VDD
REXT
CEXT
VSS
FOSC/4 or
I/O(2)
PIC® MCU
OSC1/CLKIN
Internal
Clock
OSC2/CLKOUT(1)
Recommended values: 10 k  REXT  100 k
CEXT > 20 pF
Note 1:
2:
Alternate pin functions are listed in
Section 1.0 “Device Overview”.
Output depends upon RC or RCIO clock mode.
2.4.4.2 RCIO Mode
In RCIO mode, the RC circuit is connected to OSC1.
OSC2 becomes a general purpose I/O pin.
The RC oscillator frequency is a function of the supply
voltage, the resistor (REXT) and capacitor (CEXT) values
and the operating temperature. Other factors affecting
the oscillator frequency are:
• input threshold voltage variation
• component tolerances
• packaging variations in capacitance
The user also needs to take into account variation due
to tolerance of external RC components used.
2.5 Internal Clock Modes
The oscillator module has three independent, internal
oscillators that can be configured or selected as the
system clock source.
1. The HFINTOSC (High-Frequency Internal
Oscillator) is factory calibrated and operates at
16 MHz. The frequency of the HFINTOSC can
be user-adjusted via software using the
OSCTUNE register (Register 2-3).
2. The MFINTOSC (Medium-Frequency Internal
Oscillator) is factory calibrated and operates
at 500 kHz. The frequency of the MFINTOSC
can be user-adjusted via software using the
OSCTUNE register (Register 2-3).
3. The LFINTOSC (Low-Frequency Internal
Oscillator) is factory calibrated and operates at
31.25 kHz. The LFINTOSC cannot be user-
adjusted, but is designed to be stable over
temperature and voltage.
The system clock speed can be selected via software
using the Internal Oscillator Frequency select bits
IRCF<2:0> of the OSCCON register.
The system clock can be selected between external or
internal clock sources via the System Clock Selection
(SCS<1:0>) bits of the OSCCON register. See
Section 2.9 “Clock Switching” for more information.
2.5.1 INTOSC WITH I/O OR CLOCKOUT
Two of the clock modes selectable with the FOSC<3:0>
bits of the CONFIG1H Configuration register configure
the internal oscillator block as the primary oscillator.
Mode selection determines whether OSC2/CLKOUT/
RA7 will be configured as general purpose I/O (RA7) or
FOSC/4 (CLKOUT). In both modes, OSC1/CLKIN/RA7
is configured as general purpose I/O. See
Section 24.0 “Special Features of the CPU” for more
information.
The CLKOUT signal may be used to provide a clock for
external circuitry, synchronization, calibration, test or
other application requirements.
DS41412B-page 36
Preliminary
 2010 Microchip Technology Inc.