# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# PIC24FJ32MC10X -- Oscillator

- 1
- 2
- 3
- 4
- 5
- 6
…
- 33
- 34

PIC24F Family Reference Manual
DS39700C-page 6-4 © 2009 Microchip Technology Inc.
6.3 OSCILLATOR CONFIGURATION
The oscillator source (and operating mode) that is used at a device Power-on Reset (POR) event
is selected using Configuration bit settings. The oscillator Configuration bit settings are in the
Configuration registers located in the program memory (refer to the specific product data sheet for
further details). The Primary Oscillator Configuration bits, POSCMD<1:0> (Configuration
Word 2<1:0>), and oscillator Configuration bits, FNOSC<2:0> (Configuration Word 2<10:8>),
select the oscillator source that is used at a POR. The FRC Oscillator with Postscaler (FRCDIV) is
the default (unprogrammed) selection. The Secondary Oscillator, or one of the internal oscillators,
may be chosen by programming these bit locations.
The Configuration bits allow users to choose between 11 different clock modes, shown in
Table 6-1.
Table 6-1: Configuration Bit Values for Clock Selection
6.3.1 Clock Switching Mode Configuration Bits
The FCKSM Configuration bits (Configuration Word 2<7:6>) are used to jointly configure device
clock switching and the FSCM. Clock switching is enabled only when FCKSM1 is programmed
(‘0’). The FSCM is enabled only when FCKSM<1:0> are both programmed (‘00’).
6.3.2 OSC1 and OSC2 Pin Functions in Non-Crystal Modes
When the Primary Oscillator on OSC1 and OSC2 is not configured as the clock source
(POSCMD<1:0> = 11), the OSC1 pin is automatically reconfigured as a digital I/O. In this
configuration, as well as when the Primary Oscillator is configured for EC mode
(POSCMD<1:0> = 00), the OSC2 pin can also be configured as a digital I/O by programming the
OSCIOFCN Configuration bit (Configuration Word 2<5>).
When OSCIOFCN is unprogrammed (‘1’), a F
OSC/2 clock output is available on OSC2 for testing
or synchronization purposes. With OSCIOFCN programmed (‘0’), the OSC2 pin becomes a
general purpose I/O pin. In both of these configurations, the feedback device between OSC1 and
OSC2 is turned off to save current.
Oscillator Mode
Oscillator
Source
POSCMD<1:0> FNOSC<2:0> Note
Fast RC Oscillator with
Postscaler (FRCDIV)
Internal 11 111 1, 2
(Reserved) Internal xx 110 1
Low-Power RC Oscillator
(LPRC)
Internal 11 101 1
Secondary (Timer1) Oscillator
(SOSC)
Secondary 11 100 1
Primary Oscillator (HS) with
PLL Module (HSPLL)
Primary 10 011 —
Primary Oscillator (XT) with
PLL Module (XTPLL)
Primary 01 011 —
Primary Oscillator (EC) with
PLL Module (ECPLL)
Primary 00 011 —
Primary Oscillator (HS) Primary 10 010 —
Primary Oscillator (XT) Primary 01 010 —
Primary Oscillator (EC) Primary 00 010 —
Fast RC Oscillator with PLL
Module (FRCPLL)
Internal 11 001 1
Fast RC Oscillator (FRC) Internal 11 000 1
Note 1: OSC2 pin function is determined by the OSCIOFCN Configuration bit.
2: Default oscillator mode for an unprogrammed (erased) device.

- 1
- 2
- 3
- 4
- 5
- 6
…
- 33
- 34