Using Hall Sensor(TLE-4905) with Arduino Mega

Really appreciated your comments and help again CD. They were really useful and helpful comments.

At the moment, I'm just using 1 channel of a 2-channel incremental encoder. And was just thinking about whether I could use the rising edges of both channels to trigger the counter --- to provide more resolution for a case when a small DC motor is starting up. But you're right about the roll-over. I made use of Nick Gammon's code (which you linked me too before) to handle roll-overs.

My encoder is a 1024 count per rev device. I might not need both channels. I was only contemplating it - for cases where I might need fine enough time resolution to do simple approximated integration (approximated integrating function) of motor speed when the motor begins at some constant velocity, and then steps up to a different velocity. Last year, when I was using regular software loop and doing pulse counting with interrupts, it just seems that the interrupt method isn't going to do well. And I think that I might fair a bit better with the external timer count method of motor speed measurement.

After thinking about it some more, combining rising edges of two channels (eg. A and B) is not going to work - because just focusing on the rising edges of both waveforms (and combining them) won't provide a regular distribution of rising edges (even if I were to apply monostables to each edge before combining). I would actually have to apply monostables to both the rising and falling edges of both waveforms A and B in order to get a regular distribution in waveform pattern after combining them all.

So it looks like the only option I have for now is to just use my 1024 count encoder and use the 1 channel to trigger the timer5 counter. And then I just have to choose an appropriate count duration like 1 millisecond, or 2 millisecond etc.

Thanks again CD!