I have a problem :D!
I made a metronome. It should emit a beep but it doesn't. I used pwm in ctc mode. The frequency of the signal is about 1KHz. This is the code:
pwm_2: clr temp out tcnt2, temp ldi temp, 0b00001101 ;PWM in ctc mode & FCLK/1024 out tccr2, temp ldi temp,1 out ocr2, temp pwm_3: clr temp2 clr temp out tcnt0, temp ldi temp, 0b00000101 ;prescaler FCLK/1024 out TCCR0, temp aaz: in temp, tcnt0 ;wait 0,005s cpi temp, 20 brne stepkz clr temp ;stop timer counter out tcnt2, temp out tccr2, temp out tcnt0, temp rjmp contatore
And then it start count 1sec, 1/2 sec etc...
The output circuit is just a rc filter with r=4.7k and C=0.33 uf and then a jack