Shop OBEX P1 Docs P2 Docs Learn Events
figuring out how long one loop takes — Parallax Forums

figuring out how long one loop takes

MatthewMatthew Posts: 200
edited 2005-03-19 18:19 in General Discussion
Hello, I'm trying to figure out how long one of loop takes. How would I go along doing this?

Thanks,
Matthew

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-03-19 18:10
    Matthew,

    · Try the link below...Forum Guru Tracy Allen has done some research on this very thing and has made his findings available to us on his website.

    http://www.emesystems.com/BS2speed.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-19 18:19
    If you've got a spare pin and a 'scope you can time your code empircally. Set the pin high before going into the loop and return it low when coming out. What the pin on a 'scope. Of course, for *accuracy* you'll need to subtract the timing for loading the HIGH and LOW instructions that manipulate your 'scope output pin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
Sign In or Register to comment.