Skip to content

Instantly share code, notes, and snippets.

@BernardoGO
Created February 26, 2015 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BernardoGO/430742263e3fc828f461 to your computer and use it in GitHub Desktop.
Save BernardoGO/430742263e3fc828f461 to your computer and use it in GitHub Desktop.
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