Advertisement
DrAungWinHtut

config.c

Jul 13th, 2023
820
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.35 KB | None | 0 0
  1. #pragma config FEXTOSC = OFF    // External Oscillator mode selection bits (Oscillator not enabled)
  2. #pragma config RSTOSC = HFINT1  // Power-up default value for COSC bits (HFINTOSC (1MHz))
  3. #pragma config CLKOUTEN = OFF   // Clock Out Enable bit (CLKOUT function is disabled; i/o or oscillator function on OSC2)
  4. #pragma config CSWEN = ON       // Clock Switch Enable bit (Writing to NOSC and NDIV is allowed)
  5. #pragma config FCMEN = ON       // Fail-Safe Clock Monitor Enable bit (FSCM timer enabled)
  6.  
  7. // CONFIG2
  8. #pragma config MCLRE = ON       // Master Clear Enable bit (MCLR pin is Master Clear function)
  9. #pragma config PWRTE = OFF      // Power-up Timer Enable bit (PWRT disabled)
  10. #pragma config LPBOREN = OFF    // Low-Power BOR enable bit (ULPBOR disabled)
  11. #pragma config BOREN = ON       // Brown-out reset enable bits (Brown-out Reset Enabled, SBOREN bit is ignored)
  12. #pragma config BORV = LO        // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (VBOR) set to 1.9V on LF, and 2.45V on F Devices)
  13. #pragma config ZCD = OFF        // Zero-cross detect disable (Zero-cross detect circuit is disabled at POR.)
  14. #pragma config PPS1WAY = ON     // Peripheral Pin Select one-way control (The PPSLOCK bit can be cleared and set only once in software)
  15. #pragma config STVREN = ON      // Stack Overflow/Underflow Reset Enable bit (Stack Overflow or Underflow will cause a reset)
  16.  
  17. // CONFIG3
  18. #pragma config WDTCPS = WDTCPS_31// WDT Period Select bits (Divider ratio 1:65536; software control of WDTPS)
  19. #pragma config WDTE = OFF       // WDT operating mode (WDT Disabled, SWDTEN is ignored)
  20. #pragma config WDTCWS = WDTCWS_7// WDT Window Select bits (window always open (100%); software control; keyed access not required)
  21. #pragma config WDTCCS = SC      // WDT input clock selector (Software Control)
  22.  
  23. // CONFIG4
  24. #pragma config WRT = OFF        // UserNVM self-write protection bits (Write protection off)
  25. #pragma config SCANE = available// Scanner Enable bit (Scanner module is available for use)
  26. #pragma config LVP = ON         // Low Voltage Programming Enable bit (Low Voltage programming enabled. MCLR/Vpp pin function is MCLR.)
  27.  
  28. // CONFIG5
  29. #pragma config CP = OFF         // UserNVM Program memory code protection bit (Program Memory code protection disabled)
  30. #pragma config CPD = OFF        // DataNVM code protection bit (Data EEPROM code protection disabled)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement