Hallo zusammen,

Ich hab da ein Problem mit meinem Timer2, ich habe Ihn ähnlich wie den Timer0 initialisiert. Der Interrupt von Timer0 wird auch richtig ausgelöst, nur in die Interruptroutine vom Timer2 kommt er nicht.
Ich hoffe mir kann jemand helfen.
Hier ein Ausschnitt aus meinem Code:
Code:
#ifndef F_CPU
#define F_CPU 1000000UL     /* Quarz mit 1.0 Mhz  */

#include <avr/interrupt.h> 
#include <avr/io.h>
#include <util/delay.h>
#include <stdio.h>

#define FORWARD		1
#define BACKWARD	-1
#define BREAK		0

#endif

void init_timer2(void){
	TCCR2 = (1 << WGM21) | (1 << CS22) | (1 << CS21) | (1 << CS20);	//ctc mode
	OCR2 = 0x64;				//Compare Match
	TIMSK |= (1 << OCIE2);	//interrupt enabled
	TCNT2 = 0;				//start position
	
	lcd_gotoxy(0,2);
	lcd_puts("init timer");
}

void init_Hbridge(void){
	DDRA = (1 << PA4) | (1 << PA5) | (1 << PA6) | (1 << PA7);
	PORTA |= (1 << PA4) | (1 << PA5) | (1 << PA6) | (1 << PA7);
	init_timer2();
}

ISR(TIMER2_COMP_vect){
	lcd_gotoxy(0,3);
	lcd_puts("Interrupt!");
}


int main(void){
	
	//Outputs:
	DDRD = (1 << DDD6) | (1 << DDD3) | (1 << DDD7);	//PD3,PD6,PD7=LED
	PORTD |= (1<<PD6) | (1 << PD7) | (1 << PD3);
	
	//Inputs:
	DDRD  &= ~((1 << DDD0) | (1 << DDD1) | (1 << DDD2)); 
	PORTD |= (1<<PD0);    // internen Pull-Up aktivieren 
	PORTD |= (1<<PD1); 
	PORTD |= (1<<PD2); 

lcd_init(LCD_DISP_ON);							//LCD initialisieren
init_Hbridge();
lcd_home();
lcd_puts("- LCD	BEREIT");

        return 0;
}
Auf dem Display wird "- LCD BEREIT" und "init timer" ausgegeben aber kein "Interrupt!".

Danke für eure Hilfe.