At the heart of the PIC® MCU is the oscillator module. The oscillator is the heartbeat or system clock source that makes the device run. The oscillator module has a wide variety of clock sources and selection features that allow it to be used in many applications while maximizing performance and minimizing power consumption.

Clock sources can be supplied from external oscillators, quartz crystal resonators, ceramic resonators and Resistor-Capacitor (RC) circuits. In addition, the system clock source can be supplied from one of two internal oscillators.

The oscillator module can be configured in one of the following clock modes:

Clock Source modes are selected by the FOSC<2:0> bits in a Configuration Word. The FOSC bits determine the type of oscillator that will be used when the device is first powered.

The ECH, ECM, and ECL clock modes rely on an external logic level signal as the device clock source.

The LP, XT, and HS clock modes require an external crystal or resonator to be connected to the device. Each mode is optimized for a different frequency range.

The EXTRC clock mode requires an external resistor and capacitor to set the oscillator frequency.

The INTOSC internal oscillator block produces low, medium, and high-frequency clock sources, designated LFINTOSC, MFINTOSC and HFINTOSC. A wide selection of device clock frequencies may be derived from these three clock sources.

A block diagram showing a typical Oscillator Module structure is below (captured from PIC16F1713):


Additional Enhancements to the Oscillator

The Oscillator Module has additional features that enhance the operation. These include:

PLL uses a Phase Locked Loop to boost the oscillator speed by 4x. PLL is enabled by the PLLEN bit in a configuration word.

Clock Switching allows software to change the clock source between internal and external sources.

Two Speed Start-up can eliminate the external oscillator start-up time and also reduce overall power consumption of the device. This is very handy in applications that use the sleep function. The application can perform a few instructions using the internal oscillator and then return to sleep without having to wait for the external oscillator to become stable.

Fail Safe Clock Monitor allows the device to keep operating if the external oscillator should fail.

Oscillator Start-up Timer ensures the external crystal is stable when instructions begin executing.

Instruction Clock vs Oscillator

The 8-bit PIC® MCU system clock is always designated as Fosc in data sheets. The instruction clock is derived from the Fosc through a divider to deliver an instruction clock of Fosc/4 (1/4 the oscillator speed). This is done to allow the fetch and execute pipeline in the architecture to execute one assembly instruction per instruction clock cycle (except for branches and goto's which execute in two).

If a higher speed than a divide by four instruction clock is needed, then many devices have a 4x PLL option to boost the Fosc up by four which is later divided back down by four for the instruction clock. This will yield an instruction clock equal to the Fosc speed.

© 2017 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.