Clock source modes are configured by the FOSC<2:0> bits in the Configuration Word register (see Section 16.0 “Special Features of the CPU”). The internal clock can be generated by two oscillators in the process of Extract Microcontroller PIC16C62B Code. The HFINTOSC is a high-frequency calibrated oscillator.
The LFINTOSC is a low-frequency uncalibrated oscillator. The value of the OSTS bit on device power-up is dependent on the value of the Configuration Word (CONFIG) of the device code. The value of the OSTS bit will be ‘0’ on a device Power-on Reset (POR) or any automatic clock switch of code extraction, which may occur from Two-Speed Start-up or Fail-Safe Clock Monitor, if the following conditions are true:
OSTS = 0 if:
FOSC<2:0> = 000 (LP) or 001 (XT) or 010 (HS) and IESO = 1 or FSCM = 1
(IESO will be enabled automatically if FSCM is enabled)
If any of the above conditions are not met, the value of the OSTS bit will be ‘1’ on a device POR. See Section 4.6 “Two-Speed Clock Start-up Mode” and Section 4.7 “Fail-Safe Clock Monitor” for more details.
Clock source modes can be classified as external or internal.
- External clock modes rely on external circuitry for the clock source. Examples are oscillator modules (EC mode), quartz crystal resonators or ceramic resonators (LP, XT and HS modes), and Resistor-Capacitor (RC mode) circuits of microcontroller code .
- Internal clock sources are contained internally within the PIC16C62B. The PIC16c62b has two internal oscillators: the 8 MHz High-Frequency Internal Oscillator (HFINTOSC) and 31 kHz Low-Frequency Internal Oscillator (LFINTOSC).
The system clock can be selected between external or internal clock sources via the System Clock Selection (SCS) bit (see Section 4.5 “Clock Switching”). If the PIC16c62b is configured for LP, XT or HS modes, the Oscillator Start-up Timer (OST) counts 1024 oscillations from the OSC1 pin before Extract Microcontroller PIC16C62B Code, following a Power-on Reset (POR), and the Power-up Timer (PWRT) has expired (if configured), or a wake-up from Sleep of code extraction.
During this time, the program counter does not increment and program execution is suspended. The OST ensures that the oscillator circuit, using a quartz crystal resonator or ceramic resonator, has started and is providing a stable system clock to the PIC16c62b. When switching between clock sources a delay is required to allow the new clock to stabilize.