/** Timers.c** Created: 17.4.2013 19:04:37* Author: Zbynek*/#include <avr/io.h>void Timer1_init(void){TCCR1B |= 1<<WGM12; // T1 in CTC modeTCCR1B |= 1<<CS12; // f_osc/1024TCCR1B |= 1<<CS10; // f_osc/1024OCR1AH = 0xF4; // Start value in counter ~4sOCR1AL = 0x24;TCNT1H = 0; // Start value in counterTCNT1L = 0;TIMSK1 |= 1<<OCIE1A; // enable interrupt from T1 when compare match}