Thanks, Dave! That was a lot of extra effort to answer the question, but I appreciate it. I'm sure others will, too!
Scott--what do you think?
Thanks, Dave! That was a lot of extra effort to answer the question, but I appreciate it. I'm sure others will, too!
Scott--what do you think?
Last edited by RussMartin; - 5th September 2007 at 23:31.
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
No problem, PBP did all of the work.![]()
Dave
Always wear safety glasses while programming.
Russ...The 60000 math thing worked great. The digits changing on the LCD actually looks quite natural and "smooth". It doesn't look jerky. It is faster that you can read.
I applied all of this to another project where I am driving a stepper motor as a position indicator, ie. a needle on a scale. I am quite satisfied with it.
The only issue I see with my current calculations is that a change in a millisecond at the high end of the scale represents a larger change in RPM than a millisecond does at the lower speeds. This makes the needle seem a bit twitchy at the higher speeds. I plan to see what I can do to improve that somewhat.
I initially attempted this project using COUNT . It worked, but moving the needle was painfully slow.
Thanks for all the input
Scott
Last edited by chips123; - 6th September 2007 at 02:54.
Scott--Can you give us a better idea of the position indicator circuit and approach? Maybe we can come up with a way to damp the flutter.
Last edited by RussMartin; - 6th September 2007 at 05:56.
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
Hi,
What frequency do you run the PIC on? The faster you run it the more resolution you will get. My experience with Pulsin has been between great and failure and in the end I usually end up having to write my own code using a Timer. Timers are not that difficult to use and if you have a built in HPWM with capture and compare function it is not that bad at all :-)
If you don't have that Darryl's instant interupts can be used for this as well. Especially together with external interupt sources. or a simple if-then loop or wend or whatever loop is also ok.....
With a high ocs frequency and a timer you can get even parts of ms. 40 MHz would give you 0.1 ms in resolution. It would of course overflow the timer on low rpm's but then we just check for that and if it happens change the prescaler and try again... or we first do a Pulsin (same as now) to get the basic settings and then we do a new measurement right after using the best possible prescaler and a 16-bit timer to get a great value.
You said you wanted the FQ right? Do the measurement with a timer over a longer time (i.e 16 periods (the ccp can be set up to capture several periods by itself)). Then you will get an even better resolution, the more periods you measure over the better it will be. I guess the stuff you are measuring dont change rpms that crazy fast either. What is spinning?
/me
Last edited by Jumper; - 6th September 2007 at 12:13.
Bookmarks