I was using Atmega2560. but now am shifting to uno and working on tinkercad simulator.
i have tried to run the code like this. but it doesn’t run as it does on 2560… can anyone tell me why. and how could i use this syntax on tinkercad. my code is.
TCNT0 = 0x74; // load TCNT0
TCCR0A = 0x00; // Timer0, Normal Mode
TCCR0B = 0x02; // 1/8 prescaler
while((TIFR0 & (1<<TOV0)) == 0); // wait for TOV0 to roll over
TCCR0B = 0x00; // stop the clock source
TIFR0 = 0x1<<TOV0; // clear TOV0
int main (void)
DDRA = 0xFF; // OUTPUT
PORTA |= (1<<4);
PORTA &= ~(1<<4);