K33rg4t3
Full Member level 3
Hey
What is exacly wrong with this code snipper?
you know, I can do this other way and it works, but Idk why the LED is not blinking if I use the "!" operator?
What is exacly wrong with this code snipper?
Code:
void main() {
ADCON1 |= 0x0F; // Configure all ports with analog function as digital
CMCON |= 7; // Disable comparators
TRISB = 0;
PORTB = 0;
TRISA = 0;
PORTA = 0;
while(1)
{
Delay_ms(1000);
LATB = !LATB;
LATA = !LATA;
}
}
you know, I can do this other way and it works, but Idk why the LED is not blinking if I use the "!" operator?