void measure(void) //frequenzmessung { unsigned long low_byte=0; unsigned long high_byte=0; TR0=0; //timer 0 stopp TF0=0; //owerflow flag löschen TL0=0; //start wert TH0=0; ET0=1; //enable interrupt timer t1 TMOD &= 0xF0; // TMOD Timer 0: 16 bit counter: 11.0592 MHz: TMOD |= 0x05; //timer1 is incrementet by 1 to 0 input T1 pin14 TR0=1; //timer1 start DelayT0(5000); //1s warten TR0=0; //timer stop ET0=0; //disable interrupt timer1 low_byte=TL0; high_byte=TH0; CountBuf=(high_byte*0x80+low_byte)*2; if(owerflow ==1){ CountBuf+=0x10000; owerflow=0; } }