Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <xc.h>
- #define _XTAL_FREQ 20000000
- #pragma config WDTE=OFF , BOREN=OFF , PWRTE=ON , MCLRE=OFF , FOSC=INTRCIO
- void main(){
- TRISIO = 0;
- GPIO = 0;
- while(1){
- __delay_ms(1000);
- GP0 = 1;
- __delay_ms(1000);
- GP0 = 0;
- }
- }
- #include <xc.h>
- //#define _XTAL_FREQ 20000000
- #pragma config WDTE=OFF , BOREN=OFF , PWRTE=ON , MCLRE=OFF , FOSC=INTRCIO
- void main(){
- //init GPIO pins
- TRISIO = 0;
- GPIO = 0;
- while(1){
- // __delay_ms(1000);
- GP0 = 1;
- //__delay_ms(1000);
- //GP0 = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement