Microcontroller › PIC › How to read switch in XC8 compiler › u r reading “switch” but what
March 31, 2014 at 4:46 am
#11426
Participant
u r reading “switch” but what is switch?
u hv commented it out in your program. see ur code.
another thing
u r not polling pin status in continuous loop the actual loop should be
loop:while(switch==0);
for(i=0;i<=10;i++)
{
PORTA = 1;
__delay_ms(1000);
PORTA = 0;
__delay_ms(1000);
}
switch=0;
goto loop;