Shop OBEX P1 Docs P2 Docs Learn Events
SX28 Programming with Basic Language — Parallax Forums

SX28 Programming with Basic Language

DigitalDjDigitalDj Posts: 207
edited 2006-04-03 11:17 in General Discussion
Hello All,

Yes i finally did it!

I purchased the SX Development Board and SX Key. Here is my problem, I am trying to learn SX basic programming from the Exploring the SX Microcontroller with Assembly and Basic Programming Book and find it somewhat confusing at times because references to the programming are usually made at the assembly instead of both.

What is best to learn with the SX, assembly or basic?
If basic is there any other books available?

Paul and I are working with a new pwm circuit and i believe the plan is to use basic for the SX. Correct me if I'm wrong on this Paul!

Thanks,
Kevin
·

Comments

  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-04-01 22:31
    There is very little on S/X BASIC. However, we have heard rummur from Parallax that new information will be available soon.

    S/X BASIC is far easier to learn but can be a bit slower running than S/X Assembly. Depending on the application, it may not be an issue with speed.

    Since I have some BASIC STAMP II variations·and SX-28s, I usually write programs for the BASIC STAMP II first and then convert that to S/X BASIC and if possible, sometimes convert some of the S/X BASIC into S/X Assembly. But I like many others shy away from S/X Assembly because it is alot harder to grasp and S/X BASIC is much easier and faster to learn.


    For S/X BASIC, use the HELP information in the S/X Key v3.1x editor and this forum has SEARCH features for specific commands.

    Thanks.

    Post Edited (Lead Test Engineer) : 4/1/2006 10:39:01 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-02 08:46
    Hey Kevin, SX/B (basic) should be sufficient for the project, Id concentrate on that and I can help if there needs to be some things written in assembly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    6+6=10 (Long live the duodecimal system)
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-04-02 11:00
    In SX/B [noparse][[/noparse]aka SX/Basic], your help screens are the primary source of the most up-to-date information.

    It seems that the pace at Parallax has quicken and waiting for a book might slow you down with outdated info.
    Take a look at the 'stickies' above for the latest version. Improvements are shown there immdiately as the come out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 4/3/2006 3:01:07 AM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-02 15:56
    SX/B is free, and fully documented in an online help file -- a file that includes demo code and example projects. We are adding some nice stuff to the next release, so to George's point writing a book would be fruitless until that version is out and stabilized (yes, it includes Word variables).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • DigitalDjDigitalDj Posts: 207
    edited 2006-04-02 17:12
    Ok i will use the help menu more! I have used it a couple of times to look at the syntax and it is great with examples! Basic for the SX doesn't seem to bad, it's just like other basic i've programmed in but now i'm down to microprcessor level which i will definately be asking questions about. Now the problem is getting time to do it all.

    this may be a stupid question but is the stickies in blue above the forum posts? What is the latest version? Is there a release date on the new version?

    Thanks for the response,

    Kevin
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-02 17:23
    The latest available version (1.42.01) is posted above.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • DigitalDjDigitalDj Posts: 207
    edited 2006-04-02 17:35
    Ok i'm a little confused, i am using the SX Key software which i assume(you know how that goes) that it has SX/B in it becuase i have assembled some code and played with the SX, but when i look at the version it is 3.0. Do i need to download anything else or does V3.0 of SX key have the SX/B up to date? I can't find the SX/B version number.

    Kevin
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-02 17:40
    Help> About, click on IDE ver 3.0 until you see the version of SX/B.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    6+6=10 (Long live the duodecimal system)
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-02 17:40
    There are two products involved: the SK-Key IDE (has a version 3.1 is the latest), and the SX/B compiler has a version (1.42.01) is the latest. SX/B is actually a command-line compiler is external of the IDE -- the IDE simply provides a nice interface to it. Click on Help -> About for the About dialog; you can cycle through the know elements of the SX system by clicking on the SX-Key IDE version number.

    Get the latest version of the SX-Key IDE from our web site, then update the SX/B compiler from the sticky post above.· SX/B has been pretty fluid, so we don't create a new SX-Key installer for every SX/B update.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • DigitalDjDigitalDj Posts: 207
    edited 2006-04-02 18:00
    I got the SX Key 3.1 which included SX/B 1.42. Will this be fine or do i need to download anything else?

    Since i now have·an older version what do i need to do to update? Do i need to uninstall old version or will it update upon install?

    Kevin
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-02 18:44
    Download SX/B 1.42.01 from the sticky above and copy it over the 1.42 version you have. You don't need to do anything with the IDE.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-04-02 18:45
    You need v1.42.01

    from here:

    http://forums.parallax.com/showthread.php?p=517621

    You don't need to uninstall the preloaded version 1.42.

    Thanks.
  • DigitalDjDigitalDj Posts: 207
    edited 2006-04-02 20:43
    I downloaded 1.42.01 and unzipped but when i run the .exe file it comes up in a DOS window! How do i install or is this the right file?

    Kevin
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-02 20:52
    You don't run the EXE -- this gets called from the SX-Key IDE (that's wher'e you'll do all you code editing and downloading).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • DigitalDjDigitalDj Posts: 207
    edited 2006-04-02 21:13
    AH! HA! DUH! I guess i should put it in the same folder as the SXKey. OK i got it now, it never crossed my mind that i needed to do that. I just figured it would be an installer and put it or replace it with the old SX/B version.

    Thanks,

    Kevin
  • John KauffmanJohn Kauffman Posts: 653
    edited 2006-04-03 02:31
    Kevin:

    I'll second the talk that Parallax has in the pipeline more materials on SX/B. At least one project for beginners is being written and tested as we speak. It will use the new version of the compiler that includes WORD vars.

    Another good source, in the interim, are the half dozen sample projects available for d'load from PArallax SX pages. These are particularly good if you have various components around (DS 1620 temp sensor, several 7 seg displays, serial LCD display) that are parts of the projects.

    Another good code sample to study is available with Terry Hitt's digital display module at
    product: http://www.hittconsulting.com/ scroll down and click on the digital display link.
    code: http://user.pa.net/~bean/hc4led/HC4LED.SXB
  • BeanBean Posts: 8,129
    edited 2006-04-03 11:17
    Thanks John, BTW you can get to the HC4LED website by simply www.hc4led.com

    Also the source-code for both video modules is freely available and is mostly SXB.

    I'd say this forum is the best place to get info. Usually in less than a hour.
    I know of two people working on beginner SXB books, so just hang in there.

    Like Jon stated, the next version of SXB has quite few new features, so there is no sense creating hard documentation for a language that is evolving as quickly as SXB.

    The best advise I can give is "Use the template that Jon provides in the help file".

    Bean.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012

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

    Available now! Cheap 4-digit LED display with driver IC·www.hc4led.com

    "I reject your reality, and substitute my own." Mythbusters


    Post Edited (Bean (Hitt Consulting)) : 4/3/2006 11:22:20 AM GMT
Sign In or Register to comment.