kann mal bitte noch jemand über den Code schaune, es geht nicht 
Code:
/*-- Hauptprogramm ---------------------------------------------------------------------*/
int main(void)
{
char buffer[20] ;
count = 0 ;
overflow1 = 0 ; overflow0 = 0 ; // Variable für Overflow
lcd_init() ; // LCD aktivieren
//Timer0 auf Prescaler 8 stellen --> S.86
TCCR0 |= (1<<CS01) ;
// Overflow Interrupt Enable --> S.87
TIMSK |= (1<<TOIE0) ;
// Timer1 auf Externen Clock Source T1 mit Rising Edge setzen --> S.115
TCCR1B |= (1<<CS12) | (1<<CS11) | (1<<CS10) ;
// Overflow Interrupt Enable --> S.117
TIMSK |= (1<<TOIE1) ;
sei() ;
while(1)
{
utoa(overflow1,buffer,10) ;
set_cursor(0,1) ;
lcd_string(buffer) ;
set_cursor(0,2) ;
if(newflag > 0)
{
frequenz=(high*65536)+low;
lcd_data(frequenz) ;
newflag=0;
}
}
}
/*-- Timer0 Overflow Interrupt ---------------------------------------------------------*/
SIGNAL (SIG_OVERFLOW0)
{
overflow0 ++ ;
if(overflow0 > 3906)
{
low = TCNT0 ;
TCNT0 = 192 ;
high = overflow1 ;
overflow1 = 0 ;
newflag = 1 ;
}
}
/*-- Timer1 Overflow Interrupt ---------------------------------------------------------*/
SIGNAL (SIG_OVERFLOW1)
{
overflow1 ++ ;
}
Lesezeichen