Commonly used configuration bits for the Dwengo board

When programming the Dwengo board some of the configuration bits or fuses have to be set up correctly. An overview of the most common settings for some of the configuration bits with some explanation in the comments follows below. For more information we'd like to refer you to the PIC 18F4550 datasheet .

  1. // Fuses configuration
  2. #pragma config PLLDIV = 5 // Divide by 5 (20 MHz oscillator input)
  3. #pragma config FOSC = HSPLL_HS // HS oscillator, PLL enabled, HS used by USB
  4. #pragma config IESO = OFF // Oscillator Switchover mode disabled
  5. #pragma config PWRT = OFF // PWRT disabled
  6. #pragma config BOR = OFF // Brown-out Reset enabled in hardware only (SBOREN is disabled)
  7. #pragma config WDT = OFF // HW Disabled - SW Controlled
  8. #pragma config WDTPS = 32768 // 1:32768
  9. #pragma config MCLRE = ON // MCLR pin enabled; RE3 input pin disabled
  10. #pragma config LVP = OFF // Disable low-voltage programming
  11. #pragma config CCP2MX = ON // CCP2 is multiplexed to RC1 and not to RB3
  12. #pragma config PBADEN = OFF // PORB digital IO on powerup