celegorn
Newbie level 5
- Joined
- Jul 31, 2012
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,384
Hello,
I just got my PicKit 3 and i tried to load a simple program to see how the debugging process is supposed to go. This is my rather simple program:
I tried programming it and it was successful. I removed the PIC and placed it in an actual circuit on a protoboard and it worked (the LED blinked).
But, when i try to debug it, and i press Animate in MPLAB, the arrow pointer gets stuck on the #use delay (clock=8000000) line.
I suppose i am overlooking something basic, but i can't figure it out for the life of me.
Thanks
I just got my PicKit 3 and i tried to load a simple program to see how the debugging process is supposed to go. This is my rather simple program:
Code:
#include <16f887.h>
#use delay (clock=8000000)
unsigned int16 a;
#fuses HS,NOWDT,NOPROTECT,NOLVP
void main()
{
SET_TRIS_B(0);
a=10;
output_low(PIN_B0);
delay_us(20);
while (1)
{
a=20;
delay_ms(1000);
output_high(PIN_B0);
a=35;
delay_ms(1000);
output_low(PIN_B0);
}
}
I tried programming it and it was successful. I removed the PIC and placed it in an actual circuit on a protoboard and it worked (the LED blinked).
But, when i try to debug it, and i press Animate in MPLAB, the arrow pointer gets stuck on the #use delay (clock=8000000) line.
I suppose i am overlooking something basic, but i can't figure it out for the life of me.
Thanks