Subversion Repositories HomeAutomation

Rev

Rev 149 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 149 Rev 150
Line 49... Line 49...
49
    TIFR  |= (1<<TOV0);  // clear overflow int.
49
    TIFR  |= (1<<TOV0);  // clear overflow int.
50
    TIMSK |= (1<<TOIE0); // enable overflow-interrupt
50
    TIMSK |= (1<<TOIE0); // enable overflow-interrupt
51
    #endif
51
    #endif
52
   
52
   
53
    #if defined(__AVR_ATmega88__)
53
    #if defined(__AVR_ATmega88__)
54
    TCCR0A = (1<<CS01) | (1<<CS00); // prescaler: 64
54
    TCCR0B = (1<<CS01) | (1<<CS00); // prescaler: 64
55
    TCNT0 = TIMEBASE_RELOAD; // set initial reload-value
55
    TCNT0 = TIMEBASE_RELOAD; // set initial reload-value
56
    TIFR0  |= (1<<TOV0);  // clear overflow int.
56
    TIFR0  |= (1<<TOV0);  // clear overflow int.
57
    TIMSK0 |= (1<<TOIE0); // enable overflow-interrupt
57
    TIMSK0 |= (1<<TOIE0); // enable overflow-interrupt
58
    #endif
58
    #endif
59
}
59
}