Shop OBEX P1 Docs P2 Docs Learn Events
bs2 count program delay — Parallax Forums

bs2 count program delay

Blake67Blake67 Posts: 3
edited 2007-01-24 13:59 in BASIC Stamp
· 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

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-01-23 07:34
    Blake -

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

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Blake67Blake67 Posts: 3
    edited 2007-01-24 00:54
    ·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 WalkerTom Walker Posts: 509
    edited 2007-01-24 13:47
    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...
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-01-24 13:59
    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.
Sign In or Register to comment.