dsPIC33FJ32MC102 configuration bits The configuration words set the oscillator and PLL, the watchdog, the debugger pins, brown-out reset and code protection: they are the last words of flash (from 0x0057FC), programmed with the code. Pick a setting and the word below updates; the starting values are the defaults in Microchip's device file, and an erased bit reads 1. In XC16 each setting is a #pragma config FNOSC = FRC line.
CONFIG2 · 0x57FC 0xFFFF default 0xFFFF IESO Internal External Switch Over Mode Start-up device with user-selected oscillator source Start-up device with FRC, then automatically switch to user-selected oscillator source when ready PWMLOCK PWM Lock Enable PWM registers may be written without key sequence Certain PWM registers may only be written after key sequence PWMPIN Motor Control PWM Module Pin Mode bit PWM module pins controlled by PWM module at device Reset PWM module pins controlled by PORT register at device Reset WDTWIN Watchdog Window Select Watchdog Window is 75% of WDT period Watchdog Window is 50% of WDT period Watchdog Window is 37.5% of WDT period Watchdog Window is 25% of WDT period FNOSC Oscillator Mode Internal Fast RC (FRC) Internal Fast RC (FRC) w/ PLL Primary Oscillator (MS, HS, EC) Primary Oscillator (MS, HS, EC) w/ PLL Secondary Oscillator (SOSC) Low Power RC Oscillator (LPRC) Internal Fast RC (FRC) with divide by N FCKSM Clock Switching and Monitor Clock switching is enabled, Fail-Safe Clock Monitor is enabled Clock switching is enabled, Fail-Safe Clock Monitor is disabled Clock switching and Fail-Safe Clock Monitor are disabled 3 (not named) OSCIOFNC Primary Oscillator Output Function OSC2 pin has digital I/O function OSC2 pin has clock out function IOL1WAY IOLOCK Protection Allow Multiple Re-configurations Allow Only One Re-configuration LPOL Motor Control PWM Low Side Polarity bit PWM module low side output pins have active-low output polarity PWM module low side output pins have active-high output polarity ALTI2C Alternate I2C pins I2C mapped to ASDA1/ASCL1 I2C mapped to SDA1/SCL1 POSCMOD Primary Oscillator Select EC Oscillator mode selected MS Oscillator mode selected HS Oscillator mode selected Primary oscillator disabled CONFIG1 · 0x57FE 0x7FFF default 0x7FFF GCP General Segment Code Protection Standard Security Code protection Enabled General Segment Code protect is disabled GWRP General Code Segment Write Protect Writes to program memory are disabled Writes to program memory are allowed HPOL Motor Control PWM High Side Polarity bit PWM module high side output pins have active-low output polarity PWM module high side output pins have active-high output polarity ICS Comm Channel Select Communicate on PGEC3/PGED3 Communicate on PGEC2/PGED2 Communicate on PGEC1/PGED1 FWDTEN Watchdog Timer Enable Watchdog timer enabled/disabled by user software Watchdog timer always enabled WINDIS Watchdog Timer Window Watchdog Timer in Window mode Watchdog Timer in Non-Window mode PLLKEN PLL Lock Enable Clock switch will not wait for the PLL lock signal. Clock switch to PLL source will wait until the PLL lock signal is valid. WDTPRE WDT Prescaler Prescaler ratio of 1:32 Prescaler ratio of 1:128 WDTPOST Watchdog Timer Postscaler 1:1 1:2 1:4 1:8 1:16 1:32 1:64 1:128 1:256 1:512 1:1,024 1:2,048 1:4,096 1:8,192 1:16,384 1:32,768