Serial.print messing with Timer Interrupts

This is another issue. Compare

tcnt2 = 256 - (int)((float)F_CPU * 0.001 / prescaler);

to

TCNT2 = MsTimer2::tcnt2;

C is case sensitive. The first line sets tcnt2 in the MsTimer2 namespace. The second line changes the timer register. So he does not rely on things happening just right. He just created a race condition. This happens even to the best :wink: The tricky part is to find and eliminate them.

Thanks for the compliments. I am proud of this analysis as well. Now the way is paved to the most resilent DIY DCF77 clock ever. The whole story will take probably 4 months of blogging :slight_smile: