Tobias,

Not that I think there is anything wrong with the way you are doing things, but - I earlier posted a routine that can read virtually any number of tachometers to good accuracy, and to RPMs far past 15000 (if your tach output is the standard 2 pulse/rev) type. It averages over a period, so jitter
isn't a problem.

It is interrupt-driven, and runs totally in the background.