modify the Parallax GPS code?
CCraig
Posts: 163
I think somebody needs to talk me down. I'm fairly new to the SX, but here it goes.
Anyone modify the Parallax GPS code? Any warnings/hints?
·
I want it to just send: Valid signal code, Latitude and Longitude (from the GPRMC string). I don’t even need E/W, N/S as the app. is land based on this continent.· I wanted Date and Time also (for logging), but I’m worried about data lengths and date/time stamp would be candy.
·
Am I wasting my time because the data comes around fast enough as it is?· AND the data is only coming out of the GPS side once a second. I saw someone’s name in there. Any thoughts? (besides: “You should get back to your project and stop messing with the stuff that already works”[noparse];)[/noparse]
·
I'm guessing I can’t up the baud rate due to the oscillator?
·
My idea is this: My app can start listening, sync on the Valid Code (“A”=valid or “V”=invalid)*, get the numbers and get back to work. I think I’m going to put the date/time stamp on the end of the output string for future use.
·
The GPS unit would continuously send my output string, updated or not. If a program poles for data too fast, there will be a lot of old data duped as new data from the GPS radio side has not been received yet. I will add code if the radio fails/times out, it will catch it.
Anyone solder pins to the GPS unit to attach the Key?
·
Every time I start to do this, I hear a tiny voice in my head say:
·
“STOP…, put the soldering iron DOWN…, raise your hands and back slowly away from the bench.”
·
TIA, Chris
·
* V=invalid, aren’t we supposed to use correct mnemonics? or is this GPS thing a Gov’t project?
Anyone modify the Parallax GPS code? Any warnings/hints?
·
I want it to just send: Valid signal code, Latitude and Longitude (from the GPRMC string). I don’t even need E/W, N/S as the app. is land based on this continent.· I wanted Date and Time also (for logging), but I’m worried about data lengths and date/time stamp would be candy.
·
Am I wasting my time because the data comes around fast enough as it is?· AND the data is only coming out of the GPS side once a second. I saw someone’s name in there. Any thoughts? (besides: “You should get back to your project and stop messing with the stuff that already works”[noparse];)[/noparse]
·
I'm guessing I can’t up the baud rate due to the oscillator?
·
My idea is this: My app can start listening, sync on the Valid Code (“A”=valid or “V”=invalid)*, get the numbers and get back to work. I think I’m going to put the date/time stamp on the end of the output string for future use.
·
The GPS unit would continuously send my output string, updated or not. If a program poles for data too fast, there will be a lot of old data duped as new data from the GPS radio side has not been received yet. I will add code if the radio fails/times out, it will catch it.
Anyone solder pins to the GPS unit to attach the Key?
·
Every time I start to do this, I hear a tiny voice in my head say:
·
“STOP…, put the soldering iron DOWN…, raise your hands and back slowly away from the bench.”
·
TIA, Chris
·
* V=invalid, aren’t we supposed to use correct mnemonics? or is this GPS thing a Gov’t project?
Comments
http://www.parallax.com/dl/docs/cols/nv/vol7/col/NV139.pdf
I've attached the latest version of my code for you to explore; it's setup to make things easy to modify (strip out what you don't want, add new things that you do).
I did solder a flat, 4-pin header to the module to make attaching the SX-Key easier.
Post Edited (JonnyMac) : 1/25/2007 5:30:27 PM GMT
I have also modified the GPS code. I just soldered a 4 pin header onto the board to reprogram it.
You CAN increase the sending baud rate. The SX is running @ 20MHz so even 57.6KBaud is do-able.
If I understand correctly, you want the SX to just keep sending the same data over and over, until new data comes in from the GPS (once a second). Of course the data stream would have to have some kind of header so you would know where the start was. Also you will have to buffer the incoming and outgoing data unless you want one transmission to have some of the old data and some of the new data.
I think it's do-able. Go for it..
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
James Newton, Host of SXList.com
james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
SX FAQ / Code / Tutorials / Documentation:
http://www.sxlist.com Pick faster!
I can't believe that I missed that article. My copy even had one of those tear outs in the middle of the article trying open the magazine to the correct spot. I guess for the New Year, I’ll stop reading N&V in bed waiting for the sandman.
Jon, I really like the buffer. I’m going to use that great idea. I need to load the buffer more often. You’re only updating it on the “Valid” command. Your article opened my eyes and I’m re-thinking my needs/wants. I can’t tell you how much you’ve helped. We need to kick start a memo and get those links (code and N&V) posted on the GPS product page.
I’ve already added the posts for the Key.
Thanks again, Chris
The output from the GPS is serial data at TTL level, 5 volt. This will require a level shifter like the MAX232 chip to get to the 'real' rs323 levels. (see the article). Sometimes, going straight in to a desktop works, sometimes not. None of mine do.
The GPS unit, in one mode, can put out all the data strings or can be put in the 'command' mode. I think the command mode would suit you. Please be aware that the BS2 is going to be fairly busy running the servos, etc. and might 'hickup' while waiting for the serial data to return.
If you know programing semi-well and can solder semi-well, this sounds like an ideal hack for the GPS unit. Using Jon's article, you could piggy back the transmiter to the GPS unit using the un-used 'X' ports in the article. This could give you a self contained unit that upon power up would start transmitting it's lat and long. There would be no need for the BS2 to do anything. But, I would think that you would want to receive instructions back from the desk top, which means a little more work.
HTH, Chris
Thanks for the help. One last question....if I want to work in RAW mode, do I·HAVE to do my programming on the SX chip, or can I use the basic stamp to run the GPS reciever?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
Note that these strings are output once per second at 4800 baud.
I am developing an application for the Parallax GPS module, which I just ordered. I was pleased to find it has an SX on board, since that's the same µC I'm using for my data collection, it's like getting an extra data processor in my system for free!.
Looking through the code for the GPS module that's posted on the Parallax website (and in the Nuts & Volts column), the routines that give the user's µC the requested data appear to respond only once per second. (Since each request waits for the "!GP..." to come in!) I know GPS only updates once per second, but if I want of the 5 data fields, do I have to wait 5 seconds? This doesn't seem very useful for my app, or any app at all, I would be much more intereted in software that is more responsive.
I'd like something that caches the incoming data, then repeats back peices when asked (and not in ascii!). I have begun writing such code myself, but I figured I'd ask if anyone else already wrote it, since it would save me development time and the hasstle of figuring out how to use Virtual Peripherals. If no one has come up with such a thing yet, I'll do it myself.
It's very easy to do. A big thanks to Grand and Parallax for making it so.
Chris
-Ben
Newbie Alert: this one was one of the very first I had done on the SX.
This program has seen: edge detect, WDT, you name it, it's been a real learning test bed.
Sorry about all the power fail detect IF..Then statements. I'll get those back out of there (one of these days).
Hope you can make sense of it.
Chris
-Ben