PDA

View Full Version : bs2 count program delay



Blake67
01-23-2007, 03:26 PM
· Im using count to measure rpm but the whole program pauses as it is counting, Is there any way to use count without slowing the execution of the program?
Thanks

Bruce Bates
01-23-2007, 03:34 PM
Blake -

Only if the detector and counter were off-board, meaning separate components.

Regards,

Bruce Bates

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->

Blake67
01-24-2007, 08:54 AM
·what do you use as the detector and counter? my sensor is variable reluctance converted to square wave through a zero cross detector.

Thanks

Tom Walker
01-24-2007, 09:47 PM
Remember that the Stamp is a single-tasking machine. While it is executing the COUNT statement, it is doing nothing else. There are ways to "simulate" a multi-tasking operation, but without further details of your project, suggestions would be shooting in the dark.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...

allanlane5
01-24-2007, 09:59 PM
http://www.rhombus-tek.com/co-processors.html

This guy sells a $12, simple 8-pin chip, which gives you a square wave you can use to synchronize your program. This may be exactly what you need. Read up on the "Simple Multi-Tasking" approach.

It also gives you one channel of buffered serial recieve -- but·the 'definite timed' multi-tasking is really useful.