Hi, SKFYP is my first project of using PIC and I am using "SK40C 16F877A Sample Program - led blinking" to blink the two LEDs on SK40C. I would like to try the feature of single stepping the program and found out that:
Problem: In debug mode, LED is always light up regardless of whether step over "off LED" or "toggle LED"
Description: As you can see that, LED1 and LED2 are connected to RB6 and RB7 respectively. When stepping over below code, LEDs do not turn off.
LED1=0; //OFF LED1
LED2=0; //OFF LED2
LEDs do not toggle when stepping over below code:
LED1^ = 1; //toggle LED1
delay(delay_time);
LED2^ = 1; //toggle LED2
delay(delay_time);
When I WATCH RB6 and RB7, it is always 0x00 (as you can see from the attachment) but the LEDs are light up.
Can anyone please tell me what is the problem or if the debug mode is working?