I plug the switch bord on portB.
I plug the led bord on portC.
I press switch B0 and I'm holding it down the entire time.
I download the following program in the µC.
trisb=0b11111111;
trisc=0b00000000;
portc=0b00000000;
delay_s(2);
while(portb&0b00000001); //waiting loop
portc=0b00000001;
while(1);
After 2 seconds the led C0 goes on. What is the reason for this?
I hoped that the led C0 would light up but only when I let the button B0 go.
Thanks in advance for your help
