PIC Programmer K150: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
 
Line 31: Line 31:
#include <pic16f630.h>
#include <pic16f630.h>
#define _XTAL_FREQ 4000000
#define _XTAL_FREQ 4000000
// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
// CONFIG
#pragma config FOSC = INTRCIO  // Oscillator Selection bits (INTOSC oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN)
#pragma config WDTE = ON        // Watchdog Timer Enable bit (WDT enabled)
#pragma config PWRTE = OFF      // Power-up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = OFF      // RA3/MCLR pin function select (RA3/MCLR pin function is digital I/O, MCLR internally tied to VDD)
#pragma config BOREN = ON      // Brown-out Detect Enable bit (BOD enabled)
#pragma config CP = OFF        // Code Protection bit (Program Memory code protection is disabled)
#pragma config CPD = OFF        // Data Code Protection bit (Data memory code protection is disabled)


// Send bit to RA0
// Send bit to RA0
Line 50: Line 62:
}
}
</syntaxhighlight>
</syntaxhighlight>
* Window -> PIC Memory views -> Configuration bits (this can generate pragma headers for your C file)
* Run -> Clean and build main project
* Run -> Clean and build main project




Navigation menu