Serial comm differences between the basic stamp and BasicAtom Pro (for getting
hiskeyd
Posts: 3
Hi,
I can't seem to get Parallax's GPS unit to work with my BasicAtom Pro.· I've been posting over on the Basic Atom Pro forums and it looks like the main problem is the differences in serial communication between the basic stamp and the basic atom pro.
Does anyone know specifically the differences between the serial communication between the two and how i might get the GPS unit working on the atom pro?··My atom code is below and is apparently working and complies on the surface to parallax's data sheet on·using the·GPS unit, but currently just spits out a bunch of zeros and according to here: http://forums.basicmicro.net/ShowPost.aspx?PostID=18598· the problem has to do with the difference between the communications:
GetSats CON $02
sats VAR Byte ' number of satellites used in positioning calculations
Initialize:
PAUSE 250 ' let DEBUG open
SEROUT s_out, I4800, [noparse][[/noparse]0] ' clear the screen
SEROUT s_out, I4800, [noparse][[/noparse]"Parallax GPS Receiver Module Test Application", 10, 13]
SEROUT s_out, I4800, [noparse][[/noparse]"
", 10, 13]
Main:
GOSUB Get_Sats
GOTO Main
Get_Sats:
SEROUT 9, N4800, [noparse][[/noparse]"!GPS", GetSats]
SERIN 9, N4800, 3000, No_Response, [noparse][[/noparse]sats]
SEROUT s_out, I4800, [noparse][[/noparse]DEC sats, 13]
RETURN
No_Response:
SEROUT s_out, I4800, [noparse][[/noparse]13, "Error: No response from GPS Receiver Module"]
PAUSE 5000
GOTO Initialize
I can't seem to get Parallax's GPS unit to work with my BasicAtom Pro.· I've been posting over on the Basic Atom Pro forums and it looks like the main problem is the differences in serial communication between the basic stamp and the basic atom pro.
Does anyone know specifically the differences between the serial communication between the two and how i might get the GPS unit working on the atom pro?··My atom code is below and is apparently working and complies on the surface to parallax's data sheet on·using the·GPS unit, but currently just spits out a bunch of zeros and according to here: http://forums.basicmicro.net/ShowPost.aspx?PostID=18598· the problem has to do with the difference between the communications:
GetSats CON $02
sats VAR Byte ' number of satellites used in positioning calculations
Initialize:
PAUSE 250 ' let DEBUG open
SEROUT s_out, I4800, [noparse][[/noparse]0] ' clear the screen
SEROUT s_out, I4800, [noparse][[/noparse]"Parallax GPS Receiver Module Test Application", 10, 13]
SEROUT s_out, I4800, [noparse][[/noparse]"
", 10, 13]
Main:
GOSUB Get_Sats
GOTO Main
Get_Sats:
SEROUT 9, N4800, [noparse][[/noparse]"!GPS", GetSats]
SERIN 9, N4800, 3000, No_Response, [noparse][[/noparse]sats]
SEROUT s_out, I4800, [noparse][[/noparse]DEC sats, 13]
RETURN
No_Response:
SEROUT s_out, I4800, [noparse][[/noparse]13, "Error: No response from GPS Receiver Module"]
PAUSE 5000
GOTO Initialize
Comments
A good portion of the programming information in the BasicAtom manual is not accurate and Steve Norris has noted that in his Romey robot project.
I tried, but to no avail, to get a Basic Atom Pro 28·to talk serially to a BS2p. The Basic Atom forum was of little help and I was basically on my own.
Since hiskeyd is using a Basic Atom Pro (28?), I suggest that he might use the Pro hardware serial port and a good example of how to use it is here in Steve Norris's code:
http://www.norrislabs.com/Projects/RomeyPart2/index.html
Take a look at the remote.bas code in the RomeyPart2 folder. It is a good example of how to use the hardware serial port including initialization.
Just a thought.
Regards,
TCIII
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!
Post Edited (Tom C) : 11/16/2008 4:27:14 PM GMT
Does the bs2p read rs-232 levels and the BAP wont?
If your BAP28 doesn't work with the Garmin GPS, it's probably something else.