View Full Version : bs2 count program delay

01-23-2007, 02: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?

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

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


Bruce Bates

<!--StartFragment -->

01-24-2007, 07: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.


Tom Walker
01-24-2007, 08: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...

01-24-2007, 08:59 PM

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.