dsPIC33A Oscillator Module Deep Dive
The Oscillator Module is the heartbeat of the dsPIC33A, supplying clocks to the CPU and all peripherals.
The module is based on a number of Clock Generators (CLKGENs) and PLL Generators (PLLGENs). The CLKGENs are preassigned to the CPU and peripherals. Each clock generator selects a clock source from the available oscillators or Phase-Locked Loops (PLLs) and passes it to a selectable divider circuit. Each CLKGEN output is preassigned to the CPU or peripherals, and some are shared across multiple consumers.

The oscillator module has the following main functions/features:
- Multiple Oscillator Sources
- Internal Fast RC (FRC): 8 MHz nominal
- Internal Backup Fast RC (BFRC): 8 MHz nominal
- Internal Low-Power RC (LPRC): 32.786 kHz (implemented as BFRC/244)
- Primary Oscillator (POSC): 3.5 MHz to 32 MHz (requires external crystal or resonator)
- External clock sources (REF1, REF2)
- Multiple 1.6 GHz PLLs, each with:
- Selectable clock source
- A backup clock source
- Primary and secondary outputs
- Multiple Clock Generators, each with:
- Selectable clock source
- A backup clock source
- Fail-safe clock monitors
- Clock Monitor Module, providing
- Clock failure detection
- Clock frequency drift detection
- Fault Injection capability
- Frequency, pulse width and duty cycle measurements
The dsPIC33A Oscillator Module delivers a highly robust and flexible clocking architecture designed for high-performance embedded systems.
Integrated features such as Clock Monitoring, Fail-Safe Clock Monitoring (FSCM) protection, Integrity Checking, Backup clock switching, and fault diagnostics help improve functional safety, system reliability, and fault resilience.
The combination of advanced monitoring, fast hardware-level protection, and validation support enables:
- Early fault detection
- Predictive maintenance capability
- Flexible multi-clock management
- System verification and fault-injection testing
Together, these capabilities provide a best-in-class clocking solution for safety-critical and high-reliability embedded applications.
Training Goal
The goal of this training is to provide the foundational knowledge and practical skills necessary to confidently integrate and utilize the Oscillator Module in your upcoming dsPIC33A development projects.
There are nine basic elements within the Oscillator Module and we will examine them in this training module:
- Clocking System
- Clock Monitor
- Reference Clocks
- Oscillators
- Fail Safe Clock Monitor (FSCM)
- Oscillator Module Interrupts
- Power-Saving Modes
Hands-On Exercise
To run the Clock Monitor Example Project in this training, you will need to set up the following hardware and software tools:
Hardware Tools
Curiosity Platform Development Board (EV74H48A)

dsPIC33AK512MPS512 General Purpose DIM (Dual In-Line Module) (EV80L65A)

USB-C Cable (not included)

Insert the DIM card into the Curiosity Board using the orientation shown here, and connect the USB cable to an available USB port on your PC.

Software Tools
| MPLAB® for VS Code® Extensions | ![]() |
| MPLAB XC-DSC C Compiler, v4.00.00 | ![]() |
In addition, you will need to set up a VS Code development environment for the dsPIC33A. Please visit the "Lab 0. Setup" training page to install/configure your software development environment.

