Delay is not working after burning the code on at mega i tried most of stuff i found online but nothing worked any help is highly appreciated thanks in advance.
while (1)
{
PORTC.0 == 1 ;
delay_ms(2000);
PORTC.0 == 0 ;
delay_ms(2000);
}
}```
I believe you want just
delay()
Also, you don't want to use the comparison operator
==
. You want to use the assignment operator=
. I am assuming that you are trying to blink an LED on and OFFhttps://www.arduino.cc/reference/en/language/functions/time/delay/