Programming |  PIC's |  16F690 |  Clock Options

Clock operation is set with the FOSC bits of the CONFIG register:
111RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
110RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN
101INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
100INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN
011EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN
010HS oscillator: High-speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
001XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN
000LP oscillator: Low-power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN

Clock Modes

  1. EC - External clock with I/O on OSC2 / CLKOUT.
  2. LP - 32 kHz Low-power Crystal Mode.
  3. XT - Medium Gain Crystal or Ceramic Reonator mode.
  4. HS - High Gain Crystal or Ceramic Resonator mode.
  5. RC - External Resistor-Capacitor (RC) with Fosc/4 output on OSC2/CLKOUT.
  6. RCIO - External Resistor-Capacitor (RC) with I/O on OSC2/CLKOUT.
  7. INTOSC - Internal oscillator with Fosc/4 output on OSC2 and I/O on OSC1/CLKIN.
  8. INTOSCIO - Internal oscillator with I/O on OSC1/CLKIN and OSC2/CLKOUT.

OSCCON: Oscillator Control Register

76543210
U-0R/W-1R/W-1R/W-0R-1R-0R-0R/W-0
IRCF2IRCF1IRCF0OSTS(1)HTSLTSSCS


Bit Kind Name Description
bit 7U-0-na-Unimplemented: Read as '0'
bit 6-4R/W-1IRCF<2:0>Internal Oscillator Frequency Select bits
111 = 8MHz
110 = 4 MHz (default)
101 = 2MHz
100 = 1MHz
011 = 500 kHz
010 = 250 kHz
001 = 125 kHz
000 = 31 kHz (LFINTOSC)
bit 3R-1OSTSOscillator Start-up Time-out Status bit(1)
1 = Device is running from the clock defined by FOSC<2:0> of the CONFIG register
0 = Device is running from the internal oscillator (HFINTOSC or LFINTOSC)
bit 2R-0HTSHFINTOSC Status bit (High Frequency – 8 MHz to 125 kHz)
1 = HFINTOSC is stable
0 = HFINTOSC is not stable
bit 1R-0LTSLFINTOSC Stable bit (Low Frequency – 31 kHz)
1 = LFINTOSC is stable
0 = LFINTOSC is not stable
bit 0R/W-0SCSSystem Clock Select bit
1 = Internal oscillator is used for system clock
0 = Clock source defined by FOSC<2:0> of the CONFIG register

Legend: R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’ -n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: Bit resets to ‘0’ with Two-Speed Start-up and LP, XT or HS selected as the Oscillator mode or Fail-Safe mode is enabled.

EC Mode


LP, XT, and HS Modes


RC and RCIO Modes


INTOSC Mode


INTOSCIO Mode


OSCTUNE: Oscillator Tuning Register

76543210
U-0U-0U-0R/W-0R/W-0R/W-0R/W-0R/W-0
   TUN4TUN3TUN2TUN1TUN0