Count the convenient value ...
Hi, Miniboost
Real world rpm happen in a ... minute !!! ( Mr de la Pallice )
if you want to count in a 1/10 of a second you count ... 15 counts for 9000 rpm ( let's be VERY optimistic !!! ) as tey are INTEGER counts ... you do with 14,15 or 16 .... never 15.238656
Ok ... let's try other methods ...
measure the period ... ahhh, better !!!
with a 4 Mhz clock, using the CAPTURE module of a pic ( 16F628 or 876 i.e ) ... you can have a 1µS resolution ... say 65535 µS period to the max.
Boooo ... can't measure less than 915 rpm !!!
sooo ... let's look at TMR1 prescaler values ... 2 will fit ( 457 rpm ... ok ) also have 4 ...
max rpm resolution ???
9000 rpm is 6.7 ms period ... 3350 TMR1 counts ( W/ prescaler of 2 ) ... say better accuracy than 0.1 %
Now, let's read something clear !!! ... you'll have to use a mean value over a reading period of .5 to 1 sec ... if you do not want the display to flicker too much !!!
but you can also add a fast + mean bargraph ....
Will be another story !!!
Alain
PS: no hardware capture function in PbP ... have to write it yourself ...
Last edited by Acetronics2; - 4th April 2007 at 14:52.
************************************************** ***********************
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