Subversion Repositories Projects

Rev

Rev 112 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 112 Rev 114
Line 30... Line 30...
30
}
30
}
Line 31... Line 31...
31
 
31
 
32
void timer_init (void)
32
void timer_init (void)
33
{
33
{
34
        TCCR0 = (1<<CS02)|(1<<CS00)|(1<<WGM01); // Prescaler 1024
34
        TCCR0 = (1<<CS02)|(1<<CS00)|(1<<WGM01); // Prescaler 1024
-
 
35
//      OCR0 = 72;                                                                      // Interrupt 100Hz für 7,372800 MHz-Quarz
-
 
36
 
-
 
37
//      OCR0 = (F_CPU / ( 100 * 2 * 1024)) -1 ;
-
 
38
        OCR0 = (F_CPU / ( 100L * 1024L)) ;
35
        OCR0 = 72;                                                                      // Interrupt 100Hz für 7,372800 MHz-Quarz
39
 
36
        TIMSK |= (1<<OCIE0);                                            // Interrupt freigeben für OCR
40
        TIMSK |= (1<<OCIE0);                                            // Interrupt freigeben für OCR