Shop OBEX P1 Docs P2 Docs Learn Events
Timing BS2 main loop — Parallax Forums

Timing BS2 main loop

mountaineermountaineer Posts: 27
edited 2006-03-26 05:24 in BASIC Stamp
I have several BS2s on my robot, each doing a different task, so I would like to figure out which one is going the fastest and which is going the slowest so I can equally distribute the tasks. How can I time a BS2's main loop?

Thanks in Advance, botguy

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-26 05:24
    The best thing to do is use a spare pin and a scope; on entry to a section to be timed you make the spare pin high, and on exit make it low. You use the scope to measure the period that the spare output is high. I've actually done this several times, once for a commercial product that needed constant timing through several paths.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.