Shop OBEX P1 Docs P2 Docs Learn Events
VB as a GUI — Parallax Forums

VB as a GUI

maadmaad Posts: 28
edited 2008-02-20 22:31 in BASIC Stamp
I haven't find a good tutorial for interfacing visual basic and my BS2p24 stamp, somebody please help!!!

Comments

  • maadmaad Posts: 28
    edited 2008-02-19 18:21
    I already try that with no success, I dont even know if I need a level shifter
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-02-19 18:26
    If you're using the BOE board, the DB-9 connector can be used from the BS2 side with:

    BaudMode CON xxx ' You'll have to look up what value xxxxs should have in the help file under SEROUT
    MyValue VAR WORD

    MAIN:
    SEROUT 16, BaudMode, [noparse][[/noparse]">", CR]
    SERIN 16, BaudMode, [noparse][[/noparse]DEC MyValue]
    SEROUT 16, BaudMode, [noparse][[/noparse]"Got: ", DEC MyValue, CR]
    PAUSE 500
    GOTO MAIN

    Now, from the PC side, you'll need to:
    1. Open the proper COM port
    2. Wait for the ">" prompt
    3. Send a number, encoded as a string, with a LineFeed ending the string.
    4. 'Toss' the BS2's 'echo' of your string.
    5. Get and display the BS2 response
    6. Go back to step 2.

    To use the 'programming port' you do NOT need a 'level shifter'.· You simply use the same straight-through cable you used to program the BS2.
  • tore eilertsentore eilertsen Posts: 15
    edited 2008-02-20 22:31
    Hi .
    I have just used the debug, and debugin commands, and that works fine ( as an alternative til serout and serin)
Sign In or Register to comment.