ich hab das Problem gelöst, auch wenn ich nicht weiß wieso. Wo liegt der Unterschied zwischen folgenden beiden Codes (außer dass ich in der ISR einen anderen Pin manipuliere)

Dieser Code geht....
Code:
#include <../include/avr/io.h>
#include <../include/avr/interrupt.h>
#include <../include/stdlib.h>

volatile uint16_t Zeittick ;

// Eine nichtunterbrechbare Interrupt-Service-Routine
SIGNAL (TIM1_COMPA_vect)
{
	 PORTB &= ~(1 << PB1);   // loescht Bit 1 an PortB
}

SIGNAL (TIM1_OVF_vect)
{
	 PORTB |= (1 << PB1);    // setzt Bit 1 an PortB auf 1
	 Zeittick=Zeittick +1;
}

int main (void) {
// allgemein
		GTCCR 	= 0b11100001; 	// Timer anhalten
		SREG 	 |= (1 << 7);
		GIMSK   = 0b00100000;
		PCMSK   = 0b00000100;
// Timer 1
		TCCR1   = 0b01001100;
		OCR1A 	= 123;    //LED2
		OCR1B 	= 200;  //LED4
		OCR1C 	= 0b11111111;
		TIMSK   = 0b01000100;

		DDRB    = 0b11111111;   // PortB auf Ausgabe stellen
		GTCCR 	= GTCCR & 0b11111110 ;// Timer starten
while(1) {
	 if (Zeittick==5)
	 {
      PORTB ^= (1<<PB3);
			Zeittick = 0;
	 }
}
   return 0;
}
und dieser geht nicht...
Code:
#include <../include/avr/io.h>
#include <../include/avr/interrupt.h>
#include <../include/stdlib.h>

volatile uint16_t Zeittick ;

// Eine nichtunterbrechbare Interrupt-Service-Routine
SIGNAL (TIM1_COMPA_vect)
{
	 PORTB &= ~(1 << PB2);   // loescht Bit 2 an PortB
}

SIGNAL (TIM1_OVF_vect)
{
	 PORTB |= (1 << PB2);    // setzt Bit 2 an PortB auf 1
	 Zeittick=Zeittick +1;
}

int main (void) {
// allgemein
		GTCCR 	= 0b11100001; 	// Timer anhalten
		SREG 	 |= (1 << 7);
		GIMSK   = 0b00100000;
		PCMSK   = 0b00000100;
// Timer 1
		TCCR1   = 0b01001100;
		OCR1A 	= 123;    //LED2
		OCR1B 	= 200;  //LED4
		OCR1C 	= 0b11111111;
		TIMSK   = 0b01000100;

		DDRB    = 0b11111111;   // PortB auf Ausgabe stellen
		GTCCR 	= GTCCR & 0b11111110 ;// Timer starten
while(1) {
	 if (Zeittick==5)
	 {
      PORTB ^= (1<<PB3);
			Zeittick = 0;
	 }
}
   return 0;
}
Auch wenn ich nicht verstehe, warum. Aber immerhin kann ich jetzt weiterprogrammieren. Wenn es mir jemand erklären kann wäre ich etwas schlauer.

Internette Grüße
Stefan