I am not able to understand why on the AVR3.55 simulator below mentioned code gives app. 50sec ticks instead of 1sec
#define CLK 4000000
outp(5,TCCR1B);//prescale CK to CK/1024 outw(63000,TCNT1);//I want 1 sec interval
signal(SIG_OVERFLOW1){ outw(61635,TCNT1); //0xFFFF - CLK/1024 to get 1sec ticks if(bit_is_set(1,PORTB)) cbi(1,PORTB); else sbi(1,PORTB); //toggle output pin }