Shop OBEX P1 Docs P2 Docs Learn Events
Troubleshooting PBASIC Step at a time? — Parallax Forums

Troubleshooting PBASIC Step at a time?

ArchiverArchiver Posts: 46,084
edited 2004-05-07 00:36 in General Discussion
In a message dated 5/6/2004 7:34:04 PM Eastern Daylight Time,
troybakken@y... writes:


> Is there a way to step through Pbasic code a line at a time? Is
> there a way to do this such that you can look at the status of the
> pins on the stamp while you step? Alternately is there a debug
> that will allow you to halt the program to wait for a keyboard
> entry? I am looked in the book and haven't found it.
>

You can accomplish this by writing at any point in the program:

serout 16, baud, [noparse][[/noparse]"Press any key to continue", cr]
serin 16, baud , [noparse][[/noparse]com]

Once the program receives any byte it will continue on its way.

Sid Weaver
256K of plugin EEPROM................
http://www.visualmuses.com/chipcircuit/index.html





[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-05-07 00:33
    Is there a way to step through Pbasic code a line at a time? Is
    there a way to do this such that you can look at the status of the
    pins on the stamp while you step? Alternately is there a debug
    that will allow you to halt the program to wait for a keyboard
    entry? I am looked in the book and haven't found it.

    Thanks,

    Troy
  • ArchiverArchiver Posts: 46,084
    edited 2004-05-07 00:36
    Yes.
    MyVal VAR BYTE

    SERIN 16, 16384, [noparse][[/noparse]DEC MyVal]

    The BS2 will wait until you type a number
    into the 'terminal' window with this line.

    --- In basicstamps@yahoogroups.com, "Troy Bakken" <troybakken@y...>
    wrote:
    > Is there a way to step through Pbasic code a line at a time? Is
    > there a way to do this such that you can look at the status of the
    > pins on the stamp while you step? Alternately is there a debug
    > that will allow you to halt the program to wait for a keyboard
    > entry? I am looked in the book and haven't found it.
    >
    > Thanks,
    >
    > Troy
Sign In or Register to comment.