Microchip Technology MCP1631RD-MCC2 Data Sheet

Page of 338
 2006-2012 Microchip Technology Inc.
DS41291G-page 69
PIC16F882/883/884/886/887
4.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.
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. 
 shows the
external RC mode connections.
FIGURE 4-5:
EXTERNAL RC MODES 
In RCIO mode, the RC circuit is connected to OSC1.
OSC2 becomes an additional general purpose I/O pin.
The RC oscillator frequency is a function of the supply
voltage, the resistor (R
EXT
) and capacitor (C
EXT
) values
and the operating temperature. Other factors affecting
the oscillator frequency are:
• 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.
4.5
Internal Clock Modes
The oscillator module has two 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
8 MHz. The frequency of the HFINTOSC can be
user-adjusted via software using the OSCTUNE
register (
2.
The  LFINTOSC (Low-Frequency Internal
Oscillator) is uncalibrated and operates at
31 kHz.
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) bit of the OSCCON register. Se
 for more information.
4.5.1
INTOSC AND INTOSCIO MODES
The INTOSC and INTOSCIO modes configure the
internal oscillators as the system clock source when
the device is programmed using the oscillator selection
or the FOSC<2:0> bits in the Configuration Word
Register 1 (CONFIG1).
In INTOSC mode, OSC1/CLKIN is available for general
purpose I/O. OSC2/CLKOUT outputs the selected
internal oscillator frequency divided by 4. The CLKOUT
signal may be used to provide a clock for external
circuitry, synchronization, calibration, test or other
application requirements.
In INTOSCIO mode, OSC1/CLKIN and OSC2/CLKOUT
are available for general purpose I/O.
4.5.2
HFINTOSC
The High-Frequency Internal Oscillator (HFINTOSC) is
a factory calibrated 8 MHz internal clock source. The
frequency of the HFINTOSC can be altered via
software using the OSCTUNE register (
The output of the HFINTOSC connects to a postscaler
and multiplexer (see 
). One of seven
frequencies can be selected via software using the
IRCF<2:0> bits of the OSCCON register. See
more information.
The HFINTOSC is enabled by selecting any frequency
between 8 MHz and 125 kHz by setting the IRCF<2:0>
bits of the OSCCON register
 000. Then, set the
System Clock Source (SCS) bit of the OSCCON
register to ‘1’ or enable Two-Speed Start-up by setting
the IESO bit in the Configuration Word Register 1
(CONFIG1) to ‘1’.
The HF Internal Oscillator (HTS) bit of the OSCCON
register indicates whether the HFINTOSC is stable or not.
OSC2/CLKOUT
(1)
C
EXT
R
EXT
PIC
®
 MCU
OSC1/CLKIN
F
OSC
/4 or
Internal
Clock
V
DD
V
SS
Recommended values: 10 k
  R
EXT
 
 100 k, <3V
3 k
  R
EXT
 
 100 k, 3-5V
C
EXT
 > 20 pF, 2-5V
Note 1:
Alternate pin functions are listed in the 
2:
Output depends upon RC or RCIO Clock 
mode.
I/O
(2)