Shop OBEX P1 Docs P2 Docs Learn Events
Sample code for serial monitor? — Parallax Forums

Sample code for serial monitor?

jcpolejcpole Posts: 92
edited 2006-02-13 21:14 in BASIC Stamp
Hi all...

I'm looking for some code that will read a serial line and output anything that comes across to the debug window.· Nothing fancy.

I have a serial-based module that is definitely sending data (I can see the pulses in the oscilloscope), but the program that parses the output doesn't seem to see anything.· I've checked the comm settings in the program, and they don't seem to be the problem.

Thanks...

Jamie


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--
Jamie C. Pole
Principal Consultant
J.C. Pole & Associates, Inc.
http://www.jcpa.com/

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-02-13 19:58
    In the Stamp programming environment, open a new debug window, set speed, baud, com port number as required and you should see the data. Alternatively, run Hyperterminal with the proper settings.

    If this doesn't help, perhaps give us some more info on the device you're trying to listen to.

    Regards,

    Tom
  • jcpolejcpole Posts: 92
    edited 2006-02-13 20:52
    When I connect the module to HyperTerminal, it displays the output correctly.· I am using 813 as the baud rate value for 4800 baud on my BS2px.· Using the Debug window in the BS2 IDE does not work.

    The module is an Axiom Sandpiper gps engine, and I am running the demo program that Mike Cook posted here a while ago.

    The BS2px isn't seeing any output, even though I can see the data on the ocilloscope.· Seems kinda funky to me...

    Jamie

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --
    Jamie C. Pole
    Principal Consultant
    J.C. Pole & Associates, Inc.
    http://www.jcpa.com/
  • Mike CookMike Cook Posts: 829
    edited 2006-02-13 21:06
    Jamie,

    The baud rate value for the BS2Px is different than what it is for the BS2p. If your using the program that I posted in that thread "AXIOM_SIMPLE GPS.BSP" then,

    In the line:

    N4800·········· CON···· 16884·················· ' baud rate for GPS

    Change it to:

    N4800·········· CON···· 17197

    I don't have a BS2Px so someone will have to verify this value,·but I think this is correct.

    Mike





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "OEM NMEA GPS Module" Now available on ebay for only $17.49

    Product web site: http://www.allsurplus.net/Axiom/
  • jcpolejcpole Posts: 92
    edited 2006-02-13 21:14
    Hi Mike...

    That change worked.· I was sure that I had the right value - I knew that the baudrate for a BS2px would be different from that of a BS2p.

    Thanks!

    Jamie

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --
    Jamie C. Pole
    Principal Consultant
    J.C. Pole & Associates, Inc.
    http://www.jcpa.com/
Sign In or Register to comment.