Shop OBEX P1 Docs P2 Docs Learn Events
Mimicking BS2 DEBUG with Propeller — Parallax Forums

Mimicking BS2 DEBUG with Propeller

AwesomeCronkAwesomeCronk Posts: 1,055
edited 2018-08-15 18:34 in General Discussion
Hello, I am looking to debug to MakerPlot with the Propeller(p1, that is). MakerPlot communicates with a BS2 via DEBUG, just like the PBASIC Editor's DEBUG window. How can this be mimicked using the Propeller?

Comments

  • The BS2's DEBUG statement is just a SEROUT statement that accesses a "virtual" I/O pin #16 and has a fixed Baud ... 9600 I believe for the BS2, 19200 for the BS2px. Look at the Basic Stamp Syntax and Reference Manual chapter on the DEBUG statement.

    You can use any of the Propeller serial I/O drivers to mimic this. Keep in mind that the Propeller's I/O pins are 3.3V logic levels while the Stamp I/O pins are 5V logic levels. MakerPlot runs on a PC and would need a USB to serial adapter for Stamp use. You'd just use a 3.3V USB to serial adapter for the Propeller ... like the ones built into most Propeller boards.
  • Thank you, Mike. What I gather is that I can just use a driver for the Parallax Serial LCDs and set it to use p30 or p31 as Tx(cannot remember which). Correct?
  • Hold up, how will the FTDI driver chip on the PropBOE affect this?
  • It won't. Connect your serial object (usually FullDuplexSerial) to pins 31 (RX) and 30 (TX) and the desired baud rate. You can't send compound output in a single line, but you'll be able to do anything you need to do.
  • AwesomeCronkAwesomeCronk Posts: 1,055
    edited 2018-08-15 20:59
    Thank you JonnyMac! I will begin putting together a .spin object to test a MakerPlot connection soon!
    Any idea on how to mimic "DEBUG CR"? This piece is critical to separate data entries.
  • pst.newline
  • DEBUG CR just sends a single carriage return character as if you had written SEROUT pin,...,[CR] with "..." being the appropriate stuff for SEROUT.

    Use ser.tx(ser#CR) in Spin assuming you declare your FullDuplexSerial object as ser. Notice that FullDuplexSerial has constants for all of the special characters normally used with SEROUT or DEBUG.

Sign In or Register to comment.