GPS Help
Hubert
Posts: 22
I am trying to transfer a serial stream of binary ASCII data from my GPS receiver to a basic stamp at 4800 baud.· I originally had the BS2 and found that every other character was being lost in transmission.· I upgraded to the 2px of its hardware input buffer.· However,·I am having trouble finding the corrct baudmode.··The baudmode corresponding to 4800 baud does not seem to be working. All I get when I debug is a bunch of non-acsii characters.
Can anyone help?
Hubert
Can anyone help?
Hubert
Comments
#SELECT $STAMP
· #CASE BS2, BS2E, BS2PE
··· T1200······ CON···· 813
··· T2400······ CON···· 396
··· T4800······ CON···· 188
··· T9600······ CON···· 84
··· T19K2······ CON···· 32
··· TMidi······ CON···· 12
··· T38K4······ CON···· 6
· #CASE BS2SX, BS2P
··· T1200······ CON···· 2063
··· T2400······ CON···· 1021
··· T4800······ CON···· 500
··· T9600······ CON···· 240
··· T19K2······ CON···· 110
··· TMidi······ CON···· 60
··· T38K4······ CON···· 45
· #CASE BS2PX
··· T1200······ CON···· 3313
··· T2400······ CON···· 1646
··· T4800······ CON···· 813
··· T9600······ CON···· 396
··· T19K2······ CON···· 188
··· TMidi······ CON···· 108
··· T38K4······ CON···· 84
#ENDSELECT
SevenBit······· CON···· $2000
Inverted······· CON···· $4000
Open··········· CON···· $8000
Baud··········· CON···· T9600
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Maybe some of my programming from a similar [noparse][[/noparse]?]·project may be of use?
http://forums.parallax.com/showthread.php?p=550377
That does help. A lot!
Thanks,
Hubert
-- PJ --
' {$STAMP BS2}
BtnWrk VAR Byte
DEG_N VAR Byte(4)
MIN_N VAR Byte(4)
N VAR Byte(1)
DEG_W VAR Byte(5)
MIN_W VAR Byte(4)
W VAR Byte(1)
UTC VAR Byte(6)
Get_DATA:
SERIN 15,188,[noparse][[/noparse]WAIT("GGA,"),SKIP 11,STR DEG_N\4, SKIP 1, STR MIN_N\4, SKIP 1, STR W\1,
SKIP 1, STR DEG_W\(5), SKIP 1, STR MIN_W\4, SKIP 1, STR W\1]
DEBUG DEG_N, MIN_N, N, DEG_W, MIN_W, W
GOTO Get_DATA
END
What am I doing wrong?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I changed the code to include the STR modifier but now all I get is a blank DEBUG screen. Here is the code:
' {$STAMP BS2}
BtnWrk VAR Byte
DEG_N VAR Byte(4)
MIN_N VAR Byte(4)
N VAR Byte(1)
DEG_W VAR Byte(5)
MIN_W VAR Byte(4)
W VAR Byte(1)
UTC VAR Byte(6)
Get_DATA:
SERIN 15,188,[noparse][[/noparse]WAIT("GLL,"),STR DEG_N\4, SKIP 1, STR MIN_N\4, SKIP 1, STR W\1,
SKIP 1, STR DEG_W\5, SKIP 1, STR MIN_W\4, SKIP 1, STR W\1]
DEBUG STR DEG_N, STR MIN_N, STR N, STR DEG_W, STR MIN_W, STR W
GOTO Get_DATA
END
Though the Stamp DEBUG window adds a linefeed to CR, so you just need to insert that between readings.· The online help file (hint, hint) has a lot of details on DEBUG.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax