Shop OBEX P1 Docs P2 Docs Learn Events
SX and 16Byte (Word) Variables — Parallax Forums

SX and 16Byte (Word) Variables

Mike WMike W Posts: 105
edited 2005-12-15 02:19 in General Discussion
I have noticed that the BS series chips work very easly with (Word) Variables and numbers larger than 255.

However I am having problems trying to work with·the same·in SX/B. Does the·SX28 have support for 16 Byte variables·and where do I go to find out more about it.

Mike W

Comments

  • RsadeikaRsadeika Posts: 3,837
    edited 2005-12-14 22:46
    If you do a search, you will find a lot of discussion about just that. I initiated few threads
    about just that topic. There are ways of getting around that in SX/B. Look at SX/B IR remote control thread.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-12-15 00:10
    SX/B supports native variable types only: byte and bit. The BASIC Stamp synthesizes Word and Nib variables and this adds a lot of complexity internally -- but the BASIC Stamp programmer doesn't see this. The idea behind SX/B is to let you look "under the hood" to learn from the code -- adding 16-bit (again, not native to the SX) variables will add a bunch of complexity and make understanding the code more difficult. That said, we've talked about 16-bit vars and *may* add them at a later date. What you will note is that many SX/B functions that have 16-bit versions in PBASIC have a resolution parameter to allow the successful use of a byte variable.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • BeanBean Posts: 8,129
    edited 2005-12-15 02:19
    Mike,
    · Look at the 3rd post in this thread. I posted some SX/B code to handle 16 bit variables.
    http://forums.parallax.com/showthread.php?p=559038
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    Forget about the past, plan for the future, and live for today.
    ·
Sign In or Register to comment.