View Full Version : PIC 16F1613 progam not working
MikeYeu
- 10th February 2025, 17:54
I am new to PICS. I am using MPLAB with a PICKT 3 programmer. I have wrote a simple program to blink a LED, it complies OK and appears to successfully load to my PIC. The LED comes on but does to blink. It appears to me that the program is not stepping through. I would appreciate some help please. This is my code while(1)
LATAbits.LATA4=1;
_delay(1000000);
LATAbits.LATA4=0;
_delay(1000000);
Acetronics2
- 10th February 2025, 21:12
Did you see here it is PicBasic pro forum ??? :rolleyes:
I bet you didn't ...
Looks to be written with XC8, the C compiler from Microchip ... :D
Am I right ?
One sure thing: LOTS are missing ...
Alain
richard
- 10th February 2025, 22:20
maybe you mean
while(1){
LATAbits.LATA4=1;
_delay(1000000);
LATAbits.LATA4=0;
_delay(1000000);
}
while(1)
LATAbits.LATA4=1;
_delay(1000000);
LATAbits.LATA4=0;
_delay(1000000);
would not compile
and
while(1);
LATAbits.LATA4=1;
_delay(1000000);
LATAbits.LATA4=0;
_delay(1000000);
would stop pgm in its tracks at the while
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.