Rev 2116 Rev 2222
1 #include "timer.h" 1 #include "timer.h"
2   2  
3 #include <avr/io.h> 3 #include <avr/io.h>
4   4  
5 void Timer0_Init_Interrupt() { 5 void Timer0_Init_Interrupt() {
6 TIMSK |= 0b0000001; // Enable overflow interrupt tim0 6 TIMSK |= 0b0000001; // Enable overflow interrupt tim0
7 TCCR0=0b00000010; //8 prescale,start timer 7 TCCR0=0b00000010; //8 prescale,start timer
8 } 8 }
9   9  
10 void Timer1_Init_Interrupt() { 10 void Timer1_Init_Interrupt() {
11 TIMSK |= 0b00000100; // Enable overflow interrupt tim1 11 TIMSK |= 0b00000100; // Enable overflow interrupt tim1
12 TCCR1B=0b00000010; //8 prescale,start timer 12 TCCR1B=0b00000010; //8 prescale,start timer
13 } 13 }
14   14