Created
February 26, 2015 01:50
-
-
Save BernardoGO/430742263e3fc828f461 to your computer and use it in GitHub Desktop.
PIC16F628A Blink on xc8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************/ | |
/* 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