piclist 2000\12\21\135338a >
Thread: Challenge! (Everyone loves a...)
www.piclist.com/techref/microchip/devices.htm?key=pic
flavicon
face BY : severson@jged.com



> I know I'm asking a lot.  I had thought of just counting the number of
> pulses in a given time frame (e.g., .25 seconds), then
> multiplying it out to
> a full minute, but the error would be more than a few hundred
> RPM, which
> produces unacceptable error at slower speeds.  I'd have to
> count pulses for
> at least a full second or two to get reasonable accuracy this
> way.  At 4MHz,
> this would be a 24-bit number, which isn't too bad.  I was
> just hoping there
> was an easier way.

Count pulses for a period. Based on the number of pulses in that period
(lots for high RPM, few for low RPM) decide on the size of your window. 1-2
seconds for low speed, .25 for high speed. Dynamic window size. Re-think the
window size at the end of the window (just loop). Perhaps have several
window sizes. May be easier than dealing with 24-bit numbers.

Just a thought...

-Rob

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamlistserv@spam@spam.....mitvma.mit.edu with SET PICList DIGEST in the body



seeking: ubicom lib math dsp
<000501c06b7f$420bc4a0$0200a8c0@usbgod> 7bit

In reply to: <F75L1SCeX8KShPdHfKs000052e8@hotmail.com>
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Challenge! (Everyone loves a...)

month overview.

new search...