Shop OBEX P1 Docs P2 Docs Learn Events
Newbee Editor Question: How do you get a program to run? — Parallax Forums

Newbee Editor Question: How do you get a program to run?

1234ekna1234ekna Posts: 9
edited 2013-02-18 06:35 in BASIC Stamp
I loaded a program that I got from the web into the editor, and I can not get it to run. After connecting the board (a Super Carrier using a BS2sx) to the USB port and hitting "Run", a window pops showing up showing the connection and letting me know that the source code was successfully tokenized, but nothing happens.
This is the first time I am using the Editor, and my question is: how do you get a program to run and what should I expect to see when it does so? I looked in the manual, but could not find any instructions in this regard.
Also, where can I find the info on how to use the Editor and Debugger?

Comments

  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-02-16 15:42
    Post your code so we can see what it is you are trying to do.
  • ercoerco Posts: 20,257
    edited 2013-02-16 19:59
    Clicking the run icon should upload the program (bargraph filling up) and then it should run immediately. Is your Stamp battery good? Latest version of the editor? Has it ever worked previously using your particular computer/cable/usb adapter?

    A DEBUG screen should open automatically if you have DEBUG statements in your program. Of course you can manually click on the top menu icons to manually open a (or expand a minimized) DEBUG window.
  • 1234ekna1234ekna Posts: 9
    edited 2013-02-17 08:03
    Thanks fellows. NWCCTV - Instead of posting the code, here is the address for the article that lists it:

    http://www.parallax.com/Portals/0/Downloads/docs/prod/appmod/29121-LcdAppMod-v1.2.pdf

    It contains a program that uses the Parallax LCD Terminal AppMod (Obsolete Part) with a BASIC STAMP Super Carrier equiped with a BS2sx.


    erco - The Editing program was downloaded a few days ago, the Carrier is powered by a 9V DC supply. I am using the Parallax USB to 232 adapter, and since the Editor indicated that it found a connection on my serial port and downloaded the program, I assume that the cord is OK. All the parts are brand new, and have never been used before.

    I have to try to see if DEBUG works and insert some DEBUG (print) statements.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-02-17 18:01
    Did you just copy and paste the program? If so, I think you need a "CASE" statement in the begining as this is for a BS2 and not a BS2SX, if there are Time sensitive statements in the program. Look up "Adapt BS2 code" in the Stamp Editor Help section to get an idea on how to do this.
    ' Tenth Second 4.5 kHz Tone Select [COLOR=#000000][B][COLOR=#000000][B][COLOR=#000000][B]Case[/B][/COLOR][/B][/COLOR][/B][/COLOR].bs2
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    #SELECT $STAMP
    #[COLOR=#000000][B][COLOR=#000000][B][COLOR=#000000][B]CASE[/B][/COLOR][/B][/COLOR][/B][/COLOR] BS2
    FREQOUT 6, 100, 4500
    #[COLOR=#000000][B][COLOR=#000000][B]CASE[/B][/COLOR][/B][/COLOR] BS2sx
    FREQOUT 6, 250, 1800
    #ENDSELECT
    
    END
    
    ' Tenth Second 4.5 kHz Tone Select [COLOR=#000000][B][COLOR=#000000][B][COLOR=#000000][B]Case[/B][/COLOR][/B][/COLOR][/B][/COLOR] With Constants.bs2
    ' {$STAMP BS2sx}
    ' {$PBASIC 2.5}
    
    #SELECT $STAMP
    #[COLOR=#000000][B][COLOR=#000000][B][COLOR=#000000][B]CASE[/B][/COLOR][/B][/COLOR][/B][/COLOR] BS2
    DurFactr CON 256
    FreqFactr CON 256
    #[COLOR=#000000][B][COLOR=#000000][B]CASE[/B][/COLOR][/B][/COLOR] BS2sx
    DurFactr CON 640
    FreqFactr CON 102
    #ENDSELECT
    
    FREQOUT 6, 100*/DurFactr, 4500*/FreqFactr
    
    END
  • 1234ekna1234ekna Posts: 9
    edited 2013-02-18 06:35
    NWCCTV wrote: »
    Did you just copy and paste the program?
    END
    Thanks NWCCTV. Yes I did. That explains why it did nothing. I was under the impression that the program was written with the idea that it could be used with any of the listed STAMP modules without modifiying the listing. I must have been wrong about that.
    BTW The reason that I suspected that the program was not running was that it never asked me what kind of processor I was using as was supposed to if the program was running as intended. I never suspected that I could not use the program as is.

    UPDATE - Since I do not intend to use any other STAMP type than the BS2sx, I modified the program by taking out the CASE Statements and the DATA statements pertaining to other STAMP types, but left the references to the BS2sx chip where ever they appeared. The program runs now as intended.
    Thanks fellows!
Sign In or Register to comment.