K33rg4t3
Full Member level 3
- Joined
- Aug 2, 2015
- Messages
- 165
- Helped
- 7
- Reputation
- 14
- Reaction score
- 7
- Trophy points
- 1,298
- Activity points
- 2,607
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?