Guest User

Untitled

a guest
May 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. // DSPIC33FJ256MC710A Configuration Bit Settings
  2. // 'C' source line config statements
  3. // FBS
  4. #pragma config BWRP = WRPROTECT_OFF // Boot Segment Write Protect (Boot segment is write-protected)
  5. #pragma config BSS = SMALL_FLASH_STD // Boot Segment Program Flash Code Protection (Standard Security, Small-sized Boot Flash)
  6. #pragma config RBS = NO_RAM // Boot Segment RAM Protection (No Boot RAM)
  7.  
  8. // FSS
  9. #pragma config SWRP = WRPROTECT_OFF // Secure Segment Program Write Protect (Secure Segment may be written)
  10. #pragma config SSS = NO_FLASH // Secure Segment Program Flash Code Protection (No Secure Segment)
  11. #pragma config RSS = NO_RAM // Secure Segment Data RAM Protection (No Secure RAM)
  12.  
  13. // FGS
  14. #pragma config GWRP = OFF // General Code Segment Write Protect (User program memory is not write-protected)
  15. #pragma config GSS = OFF // General Segment Code Protection (User program memory is not code-protected)
  16.  
  17. // FOSCSEL
  18. #pragma config FNOSC = LPRCDIVN // Oscillator Mode (Internal Fast RC (FRC) with divide by N)
  19. #pragma config IESO = ON // Two-speed Oscillator Start-Up Enable (Start up with FRC, then switch)
  20.  
  21. // FOSC
  22. #pragma config POSCMD = NONE // Primary Oscillator Source (Primary Oscillator Disabled)
  23. #pragma config OSCIOFNC = OFF // OSC2 Pin Function (OSC2 pin has clock out function)
  24. #pragma config FCKSM = CSDCMD // Clock Switching and Monitor (Both Clock Switching and Fail-Safe Clock Monitor are disabled)
  25.  
  26. // FWDT
  27. #pragma config WDTPOST = PS32768 // Watchdog Timer Postscaler (1:32,768)
  28. #pragma config WDTPRE = PR128 // WDT Prescaler (1:128)
  29. #pragma config PLLKEN = ON // PLL Lock Enable bit (Clock switch to PLL source will wait until the PLL lock signal is valid.)
  30. #pragma config WINDIS = OFF // Watchdog Timer Window (Watchdog Timer in Non-Window mode)
  31. #pragma config FWDTEN = ON // Watchdog Timer Enable (Watchdog timer always enabled)
  32.  
  33. // FPOR
  34. #pragma config FPWRT = PWR128 // POR Timer Value (128ms)
  35. #pragma config LPOL = ON // Low-side PWM Output Polarity (Active High)
  36. #pragma config HPOL = ON // Motor Control PWM High Side Polarity bit (PWM module high side output pins have active-high output polarity)
  37. #pragma config PWMPIN = ON // Motor Control PWM Module Pin Mode bit (PWM module pins controlled by PORT register at device Reset)
  38.  
  39. // FICD
  40. #pragma config ICS = PGD1 // Comm Channel Select (Communicate on PGC1/EMUC1 and PGD1/EMUD1)
  41. #pragma config JTAGEN = OFF // JTAG Port Enable (JTAG is Disabled)
  42.  
  43. // #pragma config statements should precede project file includes.
  44. // Use project enums instead of #define for ON and OFF.
  45.  
  46. #include <xc.h>
Add Comment
Please, Sign In to add comment