#include <avr/io.h>
#include <stdio.h>
int main(void)
{
DDRE |= (1<<DDE4);
TCCR1B = (1<<CS10) | (1<<CS12) | (1<<WGM12); // Prescaler 1024 and timer counter reset on compare value
TCNT1 = 0; // set initial counter value to 0
OCR1A = (16000000/(1024*1))-1; // set compare value to 15624
TIMSK1 |= (1<<OCIE1A);
sei();
while (1) {
}
}
ISR(TIMER1_COMPA_vect){
PORTE ^= (1<<PE4);
}