Shop OBEX P1 Docs P2 Docs Learn Events
Running speed comparison , BS2x , and SX/B — Parallax Forums

Running speed comparison , BS2x , and SX/B

dufflingduffling Posts: 73
edited 2005-03-22 19:34 in General Discussion
What kind of speed increase should i get when designing my project on the SX/B , ( i will slowly add assembly as i learn it)

my main reason for choosing the sx is the cost for small scale runs of my intended project
which is a MIDI controller for live performances and the extra speed i may gain.

i have made this project already using a BS2p and it works great but i would like to take it the next level
with improvments in speed , and also adding a MIDI INPUT port which i understand the BS series doesnt quite have the juice for in the serial department

can anyone give me a rough idea of what the SX/B can do compared to the BS2SX

thankyou.

·

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-03-21 04:29
    http://forums.parallax.com/forums/default.aspx?f=7&m=66535 its a question regarding program size but some things about the speed comparision are discussed.

    Like I said in that post, its an apples to oranges comparision, it all depends on the exact command your refering to. But in essence your looking at many hundreds of times faster to thousands of times faster.
  • dufflingduffling Posts: 73
    edited 2005-03-21 05:14
    yes ,

    understood , i was just after a rough approx , which is what you just gave me [noparse]:)[/noparse]



    thanks for the help!
  • BeanBean Posts: 8,129
    edited 2005-03-21 12:02
    The speed increase you will see depends on many factors. If your design uses MIDI, then if you send and/or receive the MIDI in an interrupt routine you will see a great improvement. If you send and receive using SERIN,SEROUT the improvement will not be nearly as great.

    I think Jon Williams is working on a MIDI project with SX/B.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out· the "SX-Video Display Module"

    www.sxvm.com

    "A problem well defined, is a problem·half solved."
    ·
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-22 19:34
    The BS2 runs at about 100 uS per instruction. The SX runs at about 20 nS per instruction. This is 5,000 times faster.

    Now, having said that, I need to add that the BS2 is running 'Basic' tokens, so each one does quite a lot. The SX is running assembly instructions, each of which is quite simple. When you add SX/B to the mix, each Basic instruction gets converted into a few to many assembly instructions -- that will reduce that 5,000 times down to maybe 1,000 times faster.

    And as Bean has pointed out, many applications are "I/O Bound", meaning sending and recieving data, and waiting for data, take up most of the execution time. If you are I/O Bound, a BS2 will spend 1 mS figuring out what to send next. An SX28 will spend 1 uS figuring it out, then both will take 1 mSec per character to send the result at 9600 baud.
Sign In or Register to comment.