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
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks