The code below works perfectly for at90S2313 but the program counter doesn't go in ISR when compiled for atmega16.
This code changes the status of led upon encountering TIMER1 Overflow.
Any ideas??
/* // I/O register definitions #include#include #define fmove 2 #define xtal 4000000 unsigned char led_status=0xfe; void initialize(void); int main(void) { initialize(); while (1)PORTB=led_status; return (0); } ISR(TIMER1_OVF_vect) { TCNT1=0x10000-(xtal/1024/fmove); led_status=0x00; } void initialize(void) { DDRB=0xff; PORTB=led_status; DDRD=0xff; PORTD=0; TCCR1A=0; TCCR1B=5; TCNT1=0x10000-(xtal/1024/fmove); TIFR=0; TIMSK=0x80; GIMSK=0; sei(); }