Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PIC16F628A Blink on xc8
/******************************************************************************/
/* Files to Include */
/******************************************************************************/
//by: BernardoGO
#if defined(__XC)
#include <xc.h> /* XC8 General Include File */
#elif defined(HI_TECH_C)
#include <htc.h> /* HiTech General Include File */
#endif
__CONFIG(FOSC_INTOSCIO & WDTE_OFF & PWRTE_OFF & MCLRE_OFF & BOREN_ON & LVP_OFF & CPD_OFF & CP_OFF);
#define _XTAL_FREQ 4000000
int main() {
TRISB0 = 0;
while(1) {
RB0 = 1;
__delay_ms(1000);
RB0 = 0;
__delay_ms(1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.