BS2px and GPS Module
SPoly
Posts: 20
Hi guys,
Basically i need a list of the baud rate settings to use when i am using a BS2px and a Parallax GPS Receiver Module. Basically I have problem running the problem as i cannot match the baud rate.
So far i managed to get this for the stamp
T9600······ CON···· 396
T19K2······ CON···· 188
But how do i adjust the GPS baud rate to have the same values?
Baud CON 396 ' Serial Baud Rate 9600 bps (BS2)
GPSBaud CON 17197 ' 4800 Baud
Basically i need a list of the baud rate settings to use when i am using a BS2px and a Parallax GPS Receiver Module. Basically I have problem running the problem as i cannot match the baud rate.
So far i managed to get this for the stamp
T9600······ CON···· 396
T19K2······ CON···· 188
But how do i adjust the GPS baud rate to have the same values?
Baud CON 396 ' Serial Baud Rate 9600 bps (BS2)
GPSBaud CON 17197 ' 4800 Baud
Comments
I have change it accordingly, but it seems that the GPS would not work.But if i were to change to a BS2p it would work fine.
I have a high suspicion it has to do with incorrect baud rate. Any help?
If you need more help than the above, you'll need to draw up a schematic of your setup and attach both the schematic and your source program to a reply explaining what you mean by "would not work". The sample GPS programs should work with a BS2px by just changing the Baud constant. If it doesn't work for you, then there must be something else going on with your situation.
In the PBasic Editor Help file, if you go to the "PBasic Language Reference" section, you will find a list of PBasic commands, click on SEROUT and it will take you to lots of info about that command.
There is a section where it explains how to calculate that number to use for CON for every possible Baud mode for any type of Stamp. This is good to know because none of the tables that are shown go higher than 9600 Baud.
Baud CON 396 ' Serial Baud Rate 9600 bps (BS2px)
GPSBaud CON 33164 ' 9600 Baud (Open Mode)
Also if i were to put the BAUD CON to 4800 baud rate, the program will just keep on looping at the initialization part.
Then your SEROUT commands to the GPS should look something like this:
Don't confuse the Baud rate of the DEBUG terminal with the GPS, they are two different things.
If this doesn't work, you need to tell us exactly which GPS you're using and post the code also.
You need to have a solid LED on the GPS, (not blinking), indicating that you have satellite lock. Normally you can not get a good lock indoors.
Jim
To get the GPS_Datalogger.bs2 code to work for the BS2px I think you just need to change:
To this:
Baud is what's used for Stamp to Datalogger communication, GPSBaud is for Stamp to GPS communication.
Remember, the GPS usually won't work indoors unless it's near a window. If the red LED is blinking it means it hasn't got enough satellites locked to work correctly.
If the LED on the GPS doesn't light up at all then you have some problem other than changing from a BS2 to a BS2px. The GPS will function without any Stamp at all, as long as it has power and ground connected. I would double check all wiring and then try to get the GPS working with just the GPS demo code.