Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 8: Other MCU's Circuits
An External oscillator is installed within the microcontroller and connected to the OSC1 and OSC2 pins. It is called
“external” because it relies on external circuitry for the clock signal and frequency stabilization, such as a stand-alone
oscillator, quarts crystal, ceramic resonator or resistor-capacitor circuit. The oscillator mode is selected by bits of bytes
sent during programming, so called Config Word.
Internal oscillator consists of two separate, internal oscillators:
The HFINTOSC is a high-frequency internal oscillator which operates at 8MHz. The microcontroller can use clock source
generated at that frequency or after being divided in prescaler; and
The LFINTOSC is a low-frequency internal oscillator which operates at 31 kHz. Its clock sources are used for watch-dog and
power-up timing but it can also be used as a clock source for the operation of the entire microcontroller.
The system clock can be selected between external or internal clock sources via the System Clock Select (SCS) bit of the
OSCCON register.
OSCCON Register
The OSCCON register controls the system clock and frequency selection options. It contains the following bits: frequency
selection bits (IRCF2, IRCF1, IRCF0), frequency status bits (HTS, LTS), system clock control bits (OSTA, SCS).
Fig. 8-2 OSCCON Register
IRCF2-0 - Internal Oscillator Frequency Select bits. Combination of these three bits determines the divider rate. The
clock frequency of internal oscillator is also determined in this way.
IRCF2 IRCF1 IRCF0 Frequency OSC.
1 1 1 8 MHz HFINTOSC
1 1 0 4 MHz HFINTOSC
1 0 1 2 MHz HFINTOSC
1 0 0 1 MHz HFINTOSC
0 1 1 500 kHz HFINTOSC
0 1 0 250 kHz HFINTOSC
0 0 1 125 kHz HFINTOSC
0 0 0 31 kHz LFINTOSC
Table 8-1 Internal Oscillator Frequency Select Bits
OSTS - Oscillator Start-up Time-out Status bit indicates which clock source is currently in use. This bit is readable only.
● 1 - External clock oscillator is in use; and
● 0 - One of internal clock oscillators is in use (HFINTOSC or LFINTOSC).
http://www.mikroe.com/en/books/picmcubook/ch8/ (2 of 15)5/3/2009 11:34:45 AM