Mosaic
Well-Known Member
After much trial,( about 4 hours) I have discovered that the config statement in the MPLAB 16f690 template file is DIFFERENT to that in the samples given in the Pic Kit 16f690 lessons.
This difference is enough to cause the Switch on RA3 to STOP any functioning prg on the PIC if grounded (pressed). Needless to say the debounce tut was a tough one for me since I started with the MPLAB 16f690 template.
Another Microchip Gotcha for any noobs.
BTW, if you wanna watch variables, forget the CBlock definition and use the below statement right after the config statement.
VARIABLES UDATA_SHR
Delay1 RES 1 ; a 1 byte variable called Delay1
Delay2 RES 1
MirrorC RES 2 ; a 2 byte variable called MirrorC
Switch RES 1
This difference is enough to cause the Switch on RA3 to STOP any functioning prg on the PIC if grounded (pressed). Needless to say the debounce tut was a tough one for me since I started with the MPLAB 16f690 template.
Another Microchip Gotcha for any noobs.
BTW, if you wanna watch variables, forget the CBlock definition and use the below statement right after the config statement.
VARIABLES UDATA_SHR
Delay1 RES 1 ; a 1 byte variable called Delay1
Delay2 RES 1
MirrorC RES 2 ; a 2 byte variable called MirrorC
Switch RES 1