External Clock Oscillator Mode

The External Clock Oscillator mode allows the PIC® MCU to be run from an externally generated logic level signal and that signal used as the system clock source. When this mode is selected, the signal is fed into the OSC1 pin. The OSC2 pin is then available to clock out that same clock signal or to be used as a general purpose I/O pin. The system clock is always designated as Fosc in PIC® MCU data sheets. The instruction clock is derived from the Fosc through a divider to deliver an instruction clock of Fosc/4.

The instruction clock can be exported through the OSC2 pin if the CLKOUTEN bit is set in a configuration word (shown in section below).

ecmode.png

The EC mode has three power modes to select from. The EC mode is selected in a configuration register. The three modes include:

  • ECH - High-power mode, 4Mhz - 32Mhz
  • ECM - Medium-power mode, 0.5 Mhz - 4 Mhz
  • ECL - Low-power mode, under 0.5 Mhz

Oscillator Start-Up

The Oscillator Start-up Timer (OST) is a delay built into the PIC® MCU device to allow the oscillator to stabilize. The OST senses or counts 1024 oscillations from the crystal or resonator into the OSC1 pin.

The OST is disabled when EC mode is selected. Therefore, there is no delay in operation after a Power-on Reset (POR) or wake-up from Sleep. Because the PIC® MCU design is fully static, stopping the external clock input, while maintaining power, will have the effect of halting the device while leaving all data intact. Upon restarting the external clock, the device will resume operation as if no time had elapsed.

Configuration Settings

The External RC Oscillator is selected with the Fosc bits in a configuration register.

foscbits.png
ecbits.png

The CLKOUTEN bit is also in a configuration register and typically in the same register as the Fosc bits.

clkout.png
clkoutbits.png

Note: On older devices the clock out option may not be available for the external clock and the OSC2 pin will default to a general purpose I/O pin.


For more information on 8-Bit oscillator options visit the 8-Bit Oscillator Options wiki page.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
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.