SIGNAL(TIMER1_COMPA_vect)
This has not been changed to timer 5.
#define SET(x,y) (x |=(1<<y)) //-Bit set/clear macros
SET(TIMSK5,OCF5B);
I see that syntax in the original code, but it does not look correct. The code is using the compare A interrupt. The Compare Interrupt need to be enabled. The value of OCF5B is no where determined, and it's not clear that it's value is setting the correct bit in TIMSK5. I would use
TIMSK5 |= 1<< OCIE5A;
//compare A interrupt enable
No solution did work. Then I read the following "
Note that timer1 can be used on a Mega but does not support all three output pins OCR1A, OCR1B & OCR1C. Only A & B are supported. OCR1A is connected to pin 11 of the Mega and OCR1B to pin 12. Using one of the three calls that specify a pin, 1 will map to pin 11 on the Mega and 2 will map to pin 12. Timer3 has only been tested on the Mega"But as well Timer3 (A) on Pin11 or (B) Pin12 did not work :-(.
This makes no sense to me. The code uses the timer in input capture mode which does not have an input pin broken out on the Mega. Your first post correctly identified this problem. I see nowhere in the code which is using the timer out put pins A or B. The OCR5A value is used internally, so that when the count of externally applied pulses is 1000, it executes the ISR.