#include <avr/io.h>
#include <avr/interrupt.h>

int main(){          // Hauptprogramm
  PORTB = 0xff;
  DDRB = 0xff;
  TCCR1B = 2;        // Systemtakt durch 8
  TIMSK |= 1<<TOIE1; // TimerOverflowInterruptEnable0
  sei();             // globale Interruptfreigabe
  while(1);          // Endlosschleife
  return 0;
}

ISR(TIMER1_OVF_vect){ // Interrupt Service Routine
  TCNT1 = 3036;       // wieder vorstellen
  PORTB ^= 1;         // Ausgang PB0 invertieren
}