Shop OBEX P1 Docs P2 Docs Learn Events
What triggers the debug terminal window? — Parallax Forums

What triggers the debug terminal window?

SamMSamM Posts: 24
edited 2007-08-27 05:12 in BASIC Stamp
What is the actual "trigger" that causes the PBasic DebugTerminal window to open?

Is it opened automatically any time source code contains a DEBUG statement?

Comments

  • ZootZoot Posts: 2,227
    edited 2007-08-27 03:21
    Yes. Technically what's happening when you use DEBUG is that the Stamp sends (formatted) data bytes in serial format out on pin 16 (for 16 pin Stamps). That "special" pin is tied to the serial connection through driver circuitry, but it's essentially SEROUT.

    You can use the serial/usb connection without DEBUG on Boe-board, etc. by SEROUTing to pin 16 (this is the SOUT pin of the Stamp). There is a discussion of this in the Stamp Pbasic Manual under SERIN and SEROUT. You can also SERIN pin 16, which is the SIN pin on the Stamp. This is how some of the data-capture software apps on the PC work, as well as a way to communicate with a programming environment on the PC (if the app has access to the serial/usb port).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • MightorMightor Posts: 338
    edited 2007-08-27 05:12
    SamM said...
    What is the actual "trigger" that causes the PBasic DebugTerminal window to open?

    Is it opened automatically any time source code contains a DEBUG statement?
    When you press the "Run" (Ctrl-R) button, the IDE will compile your code current window, upload it to the stamp and then start the Debug window. You can also open it by pressing the "New Debug" (Ctrl-D) button. It is not started by merely running a program on stamp and having a DEBUG statement in it. You yourself need to open the window, if that is not already the case. There is no listening process on your computer that checks for DEBUG output on the USB's com port and fires up the debug window should it detect anything.

    Is this what you needed to know?

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | To know recursion, you must first know recursion.
Sign In or Register to comment.