Sample code for serial monitor?
jcpole
Posts: 92
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/
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
If this doesn't help, perhaps give us some more info on the device you're trying to listen to.
Regards,
Tom
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/
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/
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/