Created
October 5, 2023 23:26
-
-
Save Richardn2002/6bf7219673065921fb7f9e6466d075e1 to your computer and use it in GitHub Desktop.
Blinky on GP4 for PIC12F529T39A
This file contains hidden or 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
#pragma config OSC = INTRC | |
#pragma config WDT = OFF | |
#pragma config PARITY = SET | |
#pragma config MCLRE = ON | |
#pragma config IOSCFS = 8MHz | |
#pragma config CPDF = OFF | |
#pragma config CP = DISABLE | |
#include <xc.h> | |
#define _XTAL_FREQ 8000000 | |
void main(void) { | |
asm("MOVLW 0b11101111"); | |
asm("TRIS 6"); | |
while(1) { | |
PORTBbits.RB4 = 1; | |
__delay_ms(10); | |
PORTBbits.RB4 = 0; | |
__delay_ms(10); | |
} | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment