diff --git a/MsTimer2.cpp b/MsTimer2.cpp index 0ab0c04..c6dbbf6 100644 --- a/MsTimer2.cpp +++ b/MsTimer2.cpp @@ -46,8 +46,8 @@ static IntervalTimer itimer; #endif void MsTimer2::set(unsigned long ms, void (*f)()) { - float prescaler = 0.0; - +// float prescaler = 0.0; + int prescaler=0; if (ms == 0) msecs = 1; else @@ -65,15 +65,18 @@ void MsTimer2::set(unsigned long ms, void (*f)()) { if ((F_CPU >= 1000000UL) && (F_CPU <= 16000000UL)) { // prescaler set to 64 TCCR2B |= (1< 16Mhz, prescaler set to 128 TCCR2B |= ((1<= 1000000UL) && (F_CPU <= 16000000UL)) { // prescaler set to 64 TCCR2 |= (1< 16Mhz, prescaler set to 128 TCCR2 |= ((1<= 1000000UL) && (F_CPU <= 16000000UL)) { // prescaler set to 64 TCCR2 |= ((1< 16Mhz, prescaler set to 256 TCCR2 |= (1<= 16000000L) { TCCR4B = (1<= 8000000L) { TCCR4B = (1<= 4000000L) { TCCR4B = (1<= 2000000L) { TCCR4B = (1<= 1000000L) { TCCR4B = (1<= 500000L) { TCCR4B = (1<