Shop OBEX P1 Docs P2 Docs Learn Events
Help with calculating code overhead — Parallax Forums

Help with calculating code overhead

BuxtonBuxton Posts: 1
edited 2011-01-23 11:53 in Learn with BlocklyProp
I'm working on Robotics with Boe-Bot and I'm at the point of ControlServoRunTime.bs2 on page 83.
The equation for figuring out how many pulses I will need gives a figure of 1.6ms as code overhead.
How is that number obtained? While writing the program I put in 2 DEBUG ? counter lines so I could see it counting and the servos ran twice as long as they were suppose to. It took a little time for me to figure out why they were running longer and when I removed the line they ran correctly.

How would I calculate the figure for something like that?

Thanks for any help

Buxton

Comments

  • ZootZoot Posts: 2,227
    edited 2011-01-23 11:53
    This page -- emesystems.com/BS2speed.htm -- has timing characteristics of most Stamp commands. You can use this for calculating approximate code time overhead.

    That said, when playing with inserted pauses in routines that generate servo pulses, trial and error and a little experimenting can be just as quick :)
Sign In or Register to comment.