Shop OBEX P1 Docs P2 Docs Learn Events
Instruction times...? BS2 Timekeeping in general... — Parallax Forums

Instruction times...? BS2 Timekeeping in general...

ericpineericpine Posts: 31
edited 2007-02-06 00:19 in General Discussion
I have a time sensitive app that I have been working on for a while now.. I wonder if anyone has a reference table of --time in milliseconds or better-- for common commands in a BS2 scenario. My goal is to detect some sensors and record that data in less than a minute, in (as) accurate milliseconds (as I can). I have a bit of an issue with time consumed by my loops to detect my I/O pins. I understand that my issue is code dependent, but what I'm dealing with is simple stuff...

IF 15=HI THEN GOTO X
IF 15=LOW THEN YADDA=YADDA+1
PAUSE 1
RETURN

I saw a nice bit on "Pause 0" lasting 230 microseconds or so... ANY! information like this would be invaluable in my project success.

I have briefly looked at some timers/clocks/calanders!?#$% but haven't found anything that covers my needs. Any help would be greatly appreciated!

ElSeminewbionicavantgarde

-ep

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-01-31 11:19
    I don't know enough about the BS2 to answer your question directly, but I'm sure somebody will. What I wanted to mention is that if your application is super time-critical, you might want to look into the SX chip.

    In turbo mode, the sx has a 1:1 instruction per clock cycle ratio; in normal mode the ratio is 1:4. The speed is determined by the oscillator you use, with clock speeds up to 75MHz. Additionally, if needed, you also have internal & external interrupts to work with.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-01-31 11:34
    Eric -

    This should give you almost everything you need:
    http://www.emesystems.com/BS2speed.htm

    Thanks go to Dr. Tracy Allen.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • ericpineericpine Posts: 31
    edited 2007-02-01 03:39
    Thanks so much Bruce, you did the trick. A hundred thanks!

    -Eric
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-02-01 06:28
    Erice -

    Make sure you visit all of the Stamp areas on that web site. There is a wealth of practical information that you may not find anywhere else:
    http://www.emesystems.com (bottom of the page)

    Regards.

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • ericpineericpine Posts: 31
    edited 2007-02-02 06:32
    Yes, I browsed the site Bruce, and "Eureka!" is the only word that comes to mind. Thanks so much. Parallax should support this!
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-02-02 08:04
    Eric -

    Let me assure you they do. If I hadn't mentioned it, I'm sure one of the Parallax folks would have done so.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-02-06 00:19
    Bruce Bates said...
    Eric -

    Let me assure you they do. If I hadn't mentioned it, I'm sure one of the Parallax folks would have done so.

    Regards,

    Bruce Bates

    This is true, I was going to post the info but noticed Bruce already had. Tracy Allen (author of the emesystems site) is a good friend of Parallax and makes frequent visits to our office, and·I will be making good use of his environmental chamber when it comes time to test the Propeller's performance at temperature extremes.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.