I looked over the code just briefly. It has been a really really long time since I used a basic stamp. In my opinion, I would consider using the more powerful PIC16f628a without the basic stamp like commands. I do something a little different with a gps application, but most people use a command like:
Code:
gpsdata VAR BYTE[70] 'define a 70 character string gpsdata
HSerin 200, Main, [WAIT("$GPRMC"),STR gpsdata\MAXDATA\13] 'wait 200ms for GPRMC
Then you can look at each character of the string as gpsdata[x], gpsdata[0] will be the comma directly after GPRMC Saving it as a string is the way to go, the uart makes this pretty easy.
here is an example of pulling the latitude high numbers out of the sentence
Code:
IF gpsdata[13] = "A" Then 'tells you if valid data A= valid V=invalid
lathome_hi = ((gpsdata[15] - 48) *10)+((gpsdata[16] - 48)) 'first two digits
more code here.....
ENDIF
You will notice that I am subtracting 48, this is because I am changing an asci number to a decimal number for some math functions. You wouldnt need to do that if you are just printing to an lcd. But if you wanted to use the data for a project, you would need to convert to decimal. I don't know if you have already purchased it or not, but sparkfun.com has some too.
http://www.sparkfun.com/commerce/pro...oducts_id=8975 but with this one you have to worry about 3.3 volt to 5 volt conversion.
Bookmarks