void setup() {
// put your setup code here, to run once:
DDRD |= (1 << PD7);
cli();
TCCR2A = 0;
TCCR2B = 0;
TCCR2B |= (1 << CS22) + (1 << CS21) + (1 << CS20);
TIMSK2 |= (1 << TOIE1);
sei();
}
/*ISR(TIMER2_OVF_vect) {
PORTD ^= (1<<PD7);
}*/
//f=flck/(N*TCNT) = 16000000/(1024*254)
ISR(TIMER2_OVF_vect){
static int stevec = 0;
stevec++;
if (stevec >= 60){
stevec = 0;
PORTD ^= (1<<PD7);
}
}
void loop() {
// put your main code here, to run repeatedly:
}