![]() ![]() #pragma config BOR = OFF // Brown-out Reset Enable bits (Brown-out Reset enabled in hardware only (SBOREN is disabled)) #pragma config PWRT = OFF // Power-up Timer Enable bit (PWRT disabled) #pragma config IESO = OFF // Internal/External Oscillator Switchover bit (Oscillator Switchover mode disabled) #pragma config FCMEN = OFF // Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor disabled) #pragma config FOSC = INTOSC_XT // Oscillator Selection bits (Internal oscillator, XT used by USB (INTXT)) #pragma config USBDIV = 1 // USB Clock Selection bit (used in Full-Speed USB mode only UCFG:FSEN = 1) (USB clock source comes directly from the primary oscillator block with no postscale) #pragma config CPUDIV = OSC1_PLL2// System Clock Postscaler Selection bits () #pragma config PLLDIV = 1 // PLL Prescaler Selection bits (No prescale (4 MHz oscillator input drives PLL directly)) Use project enums instead of #define for ON and OFF. #pragma config statements should precede project file includes.
0 Comments
Leave a Reply. |