ATtiny13 timer - CTC mode

Pre overenie funkcie časovača je zapojenie obvodu jednoduché: ATtiny13 timer
#include <avr/io.h>
#include <avr/sleep.h>

#define LED0 0

int main (void)
{
   DDRB |= (1 << LED0);

   TCCR0A = (0x01)<<6 | 0x02;  // Toggle OC0A | CTC MODE
   TCCR0B |= ((1 << CS02) | (1 << CS00));  // CLOCK/1024
   TCNT0 = 0x0;
   OCR0A = 0x7F;

   CLKPR = 1<<CLKPCE; //oznam cpu, ze ideme nastavovat CLKPR
   CLKPR = 0x6; //clkio = clkcpu/hodn

   while (1) {
     set_sleep_mode(SLEEP_MODE_IDLE);
     sleep_mode();
   }
}