#include //Library for all registernames of the ATMega //example: PORTA, PB3, DDRB usw. #include //Library for the variabletyps like: //uint8_t, int8_t, uint32_t, int32_t. #include //Library for Interrupt functions. #include "Frequency.h" #include "Timer2Isr.h" /* ** local variable */ static volatile uint16_t int0Flag=0; static volatile uint16_t int1Flag=0; static volatile uint32_t actDivisor=0; static uint16_t actInt1Flag=0; /* ** local functions */ /************************************************************************* Occurs each 0.1275ms *************************************************************************/ ISR (TIMER0_OVF_vect) { int0Flag++; //counts the timeroverflows of timer0 int1Flag++; sei(); } /************************************************************************* Externel pin for the rev meter signal (PD2) --> signal is high activ *************************************************************************/ ISR (INT0_vect) { uint8_t tempTCNT0=TCNT0; uint32_t tempInt0Flag=int0Flag; static uint8_t oldTempTCNT0=0; if(TIFR & (1<