Two-Speed Clock Start-up

The Two-Speed Clock Start-up provides an automatic Clock Switch feature that will initially run the device from the INTOSC Internal Oscillator when the main system clock is set to the External Crystal Oscillator mode. This feature is available on most newer devices.

The advantage to this feature is a quicker start-up for the PIC® MCU device. This is because the external crystal oscillator drive circuitry requires 1024 oscillations to stabilize before it is ready for normal operation. The device will be held in reset during this stabilization period (if Two-Speed Start-up is not enabled). This can cause unwanted delays at start-up or after the device returns from sleep mode. The Two-Speed Clock Start-up, when enabled, will run the device from the INTOSC clock during the 1024 oscillation delay and therefore the device will start operating quicker.

The Two-Speed Start-up will activate after a device completes a Power On Reset or a wake from sleep mode.
Note: If the Power-up Timer is enabled, the Two-Speed Start-up will wait until this timer completes its delay.

The Oscillator Start-up Timer Status (OSTS) bit in the OSCCON register will be set to a one when the 1024 oscillations have been completed. The 1024 oscillation completion will also initiate the switch from the INTOSC to the Fosc selected clock source.

twosp.png

Two-Speed Clock Start-up Configuration

The Two-Speed Clock Start-up requires a few settings to enable the operation. These are set in a configuration register when the device is programmed with the application code.

twospconfig.png

IESO bit

The Internal External Switchover (IESO) bit needs to be set to one to enable the Two-Speed Clock Start-up.

iesobit.png

Fosc bits

The External Crystal Oscillator selection for LP, XT or HS must also be selected with the Fosc bits for the Two-Speed Clock Start-up to be enabled.

swfoscbits.png

SCS bits

The SCS bits of the OSCCON register need to be set to: 00 for the Two-Speed Clock Start-up to be enabled. These can be set in software but the default mode is: 00 after a reset. If these are changed for any reason in the application code, then they must be set back to: 00 prior to entering sleep mode for Two-Speed Start-up to be enabled.

oscconscs.png

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

© 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.