Hallo zusammen,

ich habe folgendes Problem:

Ich habe Timer2 asynchron mit einem Uhrenquarz laufen um ein 0,5s Signal zu erzeugen.
Soweit in Ordnung.
Jetzt möchte ich einen PWM an OC0 mit Timer0 zusätzlich erzeugen.
PWM läuft auch, nur bekomme ich jetzt kein ordentliches Signal mehr von Timer2.
Hier mein code (Mega16):

Code:
int main (void) {            
    
	DDRA  = 0xff;             
   	PORTA = 0xff;
	DDRB  |= (1<<PB3); //OC0 as output
	PORTB |= (1<<PB3);
	DDRC |= (1<<PC2) | (1<<PC3) | (1<<PC4) | (1<<PC5);
	//PORTC |= 0b00011100;
  


	TCCR0 |= (1<<WGM00) | (1<<COM01); //PWM mode1, clear up
	TCCR0 |= (1<<CS01) | (1<<CS00); //Prescale = 64
	TIMSK |= (1<<OCIE0); //Timer0 compare match interrupt enable
	
   	TCCR2 |= (1<<CS22); //prescaler auf 128 setzen
	ASSR |= (1<<AS2); //async Timer on
	TIMSK |= (1<<TOIE2); //Timer2 interrupt enable
  

	//usart_init();



sei(); //enable global interrupts
OCR0 = 150;





   while(1) 
   { 
	daytime();
   }                         
   return 0;                 
}
dazu noch die ISR des Timer2:

Code:
ISR(TIMER2_OVF_vect)
{
	if(own_flags.sectic_temp ==1)
	{
		own_flags.sectic_1 = 1;
		own_flags.sectic_2 = 1;
		own_flags.sectic_temp = 0;
		PORTA |= (1<<PA1);
	}
	else
	{
		own_flags.sectic_temp = 1;
		PORTA &= ~(1<<PA1);
	}
}
Kann mir jemand sagen woran das liegen könnte?

MfG, Marten83