Shop OBEX P1 Docs P2 Docs Learn Events
Serial comm differences between the basic stamp and BasicAtom Pro (for getting — Parallax Forums

Serial comm differences between the basic stamp and BasicAtom Pro (for getting

hiskeydhiskeyd Posts: 3
edited 2012-01-23 12:44 in BASIC Stamp
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

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-16 15:55
    It looks like you're not following the recommendations you got on the BasicAtom forum. Since you're trying to send "!GPS" to the GPS module, you must be trying to use Smart Mode. As suggested on the BasicAtom forum, this requires the use of a pullup resistor (10K will work, connected between the data line and +5V) and open mode, in whatever way BasicAtom Pro specifies that. The suggestion on the forum was NO4800. You might try that. In any event, look in your BasicAtom manual for how to specify non-inverted or normal mode + open mode.
  • Tom CTom C Posts: 461
    edited 2008-11-16 16:19
    hiskeyd\Mike,

    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.sad.gif
    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
  • GreenliteGreenlite Posts: 1
    edited 2012-01-23 11:29
    I just got a BAP28 and it wont read my Garmin GPS like the bs2p did.
    Does the bs2p read rs-232 levels and the BAP wont?
  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-23 12:44
    Can't help you with the BAP details. You'll have to talk to them about that. The BS2p (and all BS2 models) uses standard 5V logic levels for its serial I/O on I/O pins 0-15. The programming port (pins SIN / SOUT / ATN) which is referenced as I/O pin #16 in the SERIN and SEROUT statements (as a special case) uses a kind of pseudo-RS232 setup. Look at the BS2 module schematic for details of how it works, but it essentially translates RS-232 signal levels to the 5V logic levels required by the microcontroller chip itself. Normally you wouldn't use the programming port to connect to a GPS module.

    If your BAP28 doesn't work with the Garmin GPS, it's probably something else.
Sign In or Register to comment.