You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#else
TIMSK2 = 0; // disable interrupts
TCCR2A = 0; // normal counting mode
TCCR2B = _BV(CS21); // set prescaler of 8
TCNT2 = 0; // clear the timer2 count
TIFR2 = _BV(TOV2); // clear pending interrupts;
TIMSK2 = _BV(TOIE2) ; // enable the overflow interrupt
#endif
`
This is a noob code :) It will need a proper coding
The text was updated successfully, but these errors were encountered:
Replace this
TIMSK2 = 0; // disable interrupts TCCR2A = 0; // normal counting mode TCCR2B = _BV(CS21); // set prescaler of 8 TCNT2 = 0; // clear the timer2 count TIFR2 = _BV(TOV2); // clear pending interrupts; TIMSK2 = _BV(TOIE2) ; // enable the overflow interrupt
With this
`#if defined (AVR_ATmega8) || defined (AVR_ATmega8A)
#else
TIMSK2 = 0; // disable interrupts
TCCR2A = 0; // normal counting mode
TCCR2B = _BV(CS21); // set prescaler of 8
TCNT2 = 0; // clear the timer2 count
TIFR2 = _BV(TOV2); // clear pending interrupts;
TIMSK2 = _BV(TOIE2) ; // enable the overflow interrupt
#endif
`
This is a noob code :) It will need a proper coding
The text was updated successfully, but these errors were encountered: