int main(void)
{
    //set direction of PB5 as output
    DDRB |= 1 << DDRB5;

    /* Timer clock = I/O clock / 1024 */
    TCCR2B = (1 << CS22) | (1 << CS20) | (1 << CS21);

    /* Clear overflow flag */
    TIFR2 = 1 << TOV2;

    /* Enable Overflow Interrupt */
    TIMSK2 = 1 << TOIE2;

    // enable global interrupts
    sei();

    while (1)
    {
        // Main loop
    }
}