Shop OBEX P1 Docs P2 Docs Learn Events
Serial output from BS2 to Windows Command Prompt? — Parallax Forums

Serial output from BS2 to Windows Command Prompt?

WarumaWaruma Posts: 21
edited 2010-07-10 00:39 in BASIC Stamp
Hello All,

Is it possible to output a serial string from a BS2 and receive it in the Windows Command Prompt? I'm familiar with the SEROUT command, but I don't know if it's possible to input into anything other than the debug terminal.

Thanks,

Waruma

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-06-19 02:48
    You can input into any program that understands serial input from the com ports. BASIC, c, c++, Pascal, Python and others do.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • WarumaWaruma Posts: 21
    edited 2010-06-19 03:06
    Thanks Stephen - does the windows command prompt not interpret serial commands sent through the serial port?
  • FranklinFranklin Posts: 4,747
    edited 2010-06-19 03:12
    Only if you write a script to do that. It usually takes its input from the keyboard. There used to be a command like " copy con: com1: " or something similar that would switch input to the com port. You might try Google for command line syntax.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • WarumaWaruma Posts: 21
    edited 2010-07-09 23:41
    Okay.· If I write a C++ code to interpret signals sent by the BS2, then I can input any serial string into my computer via the serial port.· In poking around online, I found something called a MAX232.· Will I need this to allow my BS2 to talk to my computer's serial port?
  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-09 23:48
    Yes, a MAX232 will translate the BS2's 5V logic levels to the RS232 voltage levels needed for the serial port.

    Download the datasheet from Maxim (do a web search for their website) for sample circuits. It's a commonly used device, so there are lots of examples on the web.
  • FranklinFranklin Posts: 4,747
    edited 2010-07-10 00:39
    If you have a working connection (the debug window) you don't need any other hardware to start. The com port you are programming the stamp with is communicating with the PC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.