Using Hall Sensor(TLE-4905) with Arduino Mega

cattledog:
I too, have my doubts that the OP will have success wandering off the standard path and into Timer/Counter country with register settings. The code I suggested can be pretty much directly converted from Timer1 to Timer5.

Approx 1 year late getting here hehehe. But --- cattledog, first --- thanks very much for posting your code, as I am just about to try your code and then study and understand it real carefully.

Last year, I was trying to use the arduino mega to read rpm of small dc motors up to around 4000 rpm (max) --- using interrupt counting of pulses. Wvmarle (member) correctly pointed out that there can be (or will be) over-head associated with interrupt counting. I'm using a 1024 p/r rotary encoder at the moment, so that could be an issue with the number of interrupts coming at the angular speeds being used here. I can later try lower pulse per rev rotary encoders too. I've been getting maybe +/- 5 percent variation (from averaged rpm value) with my interrupt counting code, while the hand-held laser tachometer gives quite nice and stable readings at the 'correct' (averaged) RPM value.

So I'm going to turn toward the method used in your code!

One small question is --- what did you mean by "have my doubts that the OP will have success wandering off the standard path and into Timer/Counter country with register settings" ?

What did you mean by wandering off the standard path, and into timer/counter country with register settings? Your method for RPM measurement is based on timer/counter country, right? Just trying to understand this - as I don't want to head down the wrong path myself. Thanks again!