Hi,

The dawback of the "event counter" method is a very, very, very bad resolution ...

Sooo, the best would be to measure the period, and then convert it to speed.


Depends on your skills ... but a 16 Bits timer looks compulsory. The TMR1 of a 16F628a gives a 524288 µs period ( 1.907 Hz) with 1:8 prescaler enabled.

may be a bit "short" for what you intend to do; you should then have to increment a counter for each overflow ( interrupt ) ... and truncate some bits of TMR1 result, just to keep a 16bits word for your calculations.

a more precise explanation of what you're looking for will surely help ( Freq. range and precision required ... at least )

Alain