Shop OBEX P1 Docs P2 Docs Learn Events
TripMate GPS — Parallax Forums

TripMate GPS

ArchiverArchiver Posts: 46,084
edited 2001-05-30 07:35 in General Discussion
Hi All,

I was trying to find drawings and source code to connect a TripMate
GPS to bs2. I searched and found some source code, but no drawings.

If you have any info can you please help.

Thanks,

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-05-29 21:11
    Hi All,

    I was trying to find drawings and source code to connect a TripMate
    GPS to bs2. I searched and found some source code, but no drawings.

    If you have any info can you please help.

    Thanks,
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-30 03:44
    [font=arial,helvetica]Here is a pbasic code for a GPS to a BS2.
    Chuck

    'Setup for TRIPMATE GPS system
    'DB-9 pins on TRIPMATE, pin 5 to ground, pin 4 to 5v, pins 2 and 3 to Stamp
    pin 15
    'Scott Edwards LCDs on Stamp pins 0 and 12
    'reads 16 bytes of data each time via the $GPRMC mode
    bytearray var byte(16)
    x var byte
    x1 var byte
    x2 var byte
    x3 var byte
    x4 var byte
    x5 var byte
    t var byte
    t1 var byte
    t2 var byte
    t3 var byte

    serout 0,$4054,[noparse][[/noparse]12]
    serout 0,$4054,[noparse][[/noparse]" RESETTING"]
    pause 5000
    start:
    serin 15,188+$4000,60000,nodata,[noparse][[/noparse]wait("$GPRMC"), STR bytearray\16]
    x=bytearray(10)
    x1=bytearray(11)
    x2=bytearray(12)
    x3=bytearray(13)
    t=bytearray(1)
    t1=bytearray(2)
    t2=bytearray(3)
    t3=bytearray(4)
    x4=bytearray(5)
    x5=bytearray(6)
    serout 0,$4054,[noparse][[/noparse]16,65,"Time ",str t\1,str t1\1,":",str t2\1,str t3\1,":",str
    x4\1,str x5\1]
    serout 12,$4054,[noparse][[/noparse]"Time",STR bytearray\16]
    serout 16,$4054,[noparse][[/noparse]"Time ",str t\1,str t1\1,":",str t2\1,str t3\1,":",str
    x4\1,str x5\1,cr]
    serin 15,188+$4000,60000,nodata,[noparse][[/noparse]wait("$GPRMC"), STR bytearray\16,STR
    bytearray\16]
    x4= bytearray(4)
    serout 0,$4054,[noparse][[/noparse]16,85,"Latitude ",str x4\1,str x\1,str x1\1,223,str x2\1,str
    x3\1,39]
    serout 16,$4054,[noparse][[/noparse]"Latitude ",str x4\1,str x\1,str x1\1,223,str x2\1,str
    x3\1,39,cr]
    x=bytearray(6)
    x1=bytearray(7)
    x2=bytearray(8)
    x3=bytearray(9)
    x4=bytearray(10)
    serin 15,188+$4000,60000,nodata,[noparse][[/noparse]wait("$GPRMC"), STR bytearray\16,STR
    bytearray\16,STR bytearray\16]
    x5=bytearray(1)
    serout 0,$4054,[noparse][[/noparse]16,105,"Longitude ",str x5\1,str x\1,str x1\1,str
    x2\1,223,str x3\1,str x4\1,39]
    serout 16,$4054,[noparse][[/noparse]"Longitude ",str x5\1,str x\1,str x1\1,str x2\1,223,str
    x3\1,str x4\1,39,cr]
    x=bytearray(12)
    x1=bytearray(13)
    x2=bytearray(14)
    x3=bytearray(15)
    serin 15,188+$4000,60000,nodata,[noparse][[/noparse]wait("$GPRMC"), STR bytearray\16,STR
    bytearray\16,STR bytearray\16,STR bytearray\16\"*"]
    if x="," then cc
    if x1="," then aa
    x=x3
    x1=bytearray(0)
    t=bytearray(1)
    t1=bytearray(2)
    t2=bytearray(3)
    t3=bytearray(4)
    goto bb
    aa:
    x=x2
    x1=x3
    t=bytearray(0)
    t1=bytearray(1)
    t2=bytearray(2)
    t3=bytearray(3)
    goto bb
    cc:
    x=x1
    x1=x2
    t=x3
    t1=bytearray(0)
    t2=bytearray(1)
    t3=bytearray(2)
    bytearray(13)=x
    bytearray(14)=x1
    bytearray(15)=t
    bb:
    serout 0,$4054,[noparse][[/noparse]16,125,"Date ",str t\1,str t1\1,"/",str x\1,str x1\1,"/",str
    t2\1,str t3\1]
    serout 12,$4054,[noparse][[/noparse]"Date",STR bytearray\16]
    serout 16,$4054,[noparse][[/noparse]"Date ",str t\1,str t1\1,"/",str x\1,str x1\1,"/",str
    t2\1,str t3\1,cr]
    goto start
    nodata:
    debug "bad connection?",cr
    goto start
    [/font]
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-30 03:53
    www.stoneflyers.com head to my GPS guided R/C truck
    page on there. Has info on GPS code and wiring.

    Matt Klarich

    __________________________________________________
    Do You Yahoo!?
    Get personalized email addresses from Yahoo! Mail - only $35
    a year! http://personal.mail.yahoo.com/
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-30 07:35
    Thanks for the link. I wanted somthing more specific relating to
    the Tripmate GPS. For example, DB-9 pin 4 on the GPS side need to
    pulled high to turn the GPS on. How did they know that. Is there you
    some documentation on the GPS specification? Below are some comments
    from a code I found. How did they know to short pin 2 & 3 to
    initailize the GPS?

    Thanks for all your help.


    'You have to connect the following pins from the GPS to the Stamp.
    'DB-9 Pin 5 to ground on the Stamp
    'DB-9 Pin 4 needs to be pulled high to turn the GPS on - I used
    'Pin 8 on the
    ' Stamp so I could turn it on/off
    'DB-9 Pins 2 and 3 (xmit and rec) need to be shorted together -
    'this causes
    ' the TripMate to self initialize - if you don't do this it will
    ' send
    ' out the string "ASTRAL" forever
    'DB-9 Pins 2 and 3 go to pin 0 on the Stamp to receive data




    --- In basicstamps@y..., Matthew K <m_klarich@y...> wrote:
    > www.stoneflyers.com head to my GPS guided R/C truck
    > page on there. Has info on GPS code and wiring.
    >
    > Matt Klarich
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Get personalized email addresses from Yahoo! Mail - only $35
    > a year! http://personal.mail.yahoo.com/
Sign In or Register to comment.