Shop OBEX P1 Docs P2 Docs Learn Events
GPS input? — Parallax Forums

GPS input?

Mike15Mike15 Posts: 109
edited 2006-09-13 20:22 in BASIC Stamp
I have a GPS unit from Deluo it has TTL GPS data out. Do·I need a TTL/serial converter or can I connect it like the eTrex?

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-09-01 20:47
    You should be able to connect it directly to an ordinary stamp pin. ( for extra safety, go through a 220 ohm resitor to limit any current into the pin).Just set your serin command to the right baud rate; usually the WAIT modifier works best to watch for the first characters of the gps string.

    Cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Mike15Mike15 Posts: 109
    edited 2006-09-01 21:00
    which pin of the serial port cable do I need to connect the GPS data out cable to be able to use hyper terminal to see the GPS output?
  • FranklinFranklin Posts: 4,747
    edited 2006-09-01 21:39
    If you plan to hook this to your computer you will need to have a level converter like a max232. tTo connect to the stamp you can use any pin as long as you tell serin what it is.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Mike15Mike15 Posts: 109
    edited 2006-09-02 02:52
    So I only need a level converter when connecting to hyperterminal, but not when using the stamp

    How can I test the input of the GPS (anybody have an examole code that will display the input?)

    Post Edited (Mike15) : 9/2/2006 2:57:20 AM GMT
  • FranklinFranklin Posts: 4,747
    edited 2006-09-02 03:31
    To display the input (from the GPS) tie the output pin from the serial output to a pin (and a ground to ground) use serin to get data from the GPS and (for simplicity) debug to display it in the pbasic debug window.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Mike15Mike15 Posts: 109
    edited 2006-09-02 16:24
    It seems when I do this all I get is gibberish? Any suggestions
  • TobrewTobrew Posts: 8
    edited 2006-09-03 01:16
    Double check that you have not only the baud rate correct, but the polarity and the parity. I would recommend checking out the SERIN help file in the Basic Stamp Editor, it has lots of good details. I've attached some code that Jon Williams wrote that really helped me out.

    Rick
  • steve_bsteve_b Posts: 1,563
    edited 2006-09-03 01:32
    Hopefully not confusing the issue....but I've had experience where a PC will understand TTL rs232 (so long as it is still inverted).

    The computer is just looking for thresholds being crossed. In the case of a logic 1, RS232 convention is for a -12Volts....but with TTL RS232 it will be a 0. Logic 0 is normally +12V in normal RS232, where it is +5Volts in TTL RS232.

    I don't know the type of machien I was using (motherboard type) but it has worked for me on a laptop and a PC. So you may be able to get away from needing a 'level converter' when connecting to a PC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • FranklinFranklin Posts: 4,747
    edited 2006-09-03 02:46
    What kind of gibberish? Do you know what GPS output looks like?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • spainespaine Posts: 51
    edited 2006-09-04 16:04
    You may want to check with the Deluo manufacturer also, to ensure that your unit is outputting NMEA (what most expect to use in these projects). I’m using a SiRF GPS from US Global SAT, and although NMEA is its default, I see that at times it jumps to their proprietary output (which is gibberish, non-human readable).
  • Mike15Mike15 Posts: 109
    edited 2006-09-04 21:39
    I put a post on the company's forum.
    Also I am working on trying to get mine running. I ran out of battery power. So please check this thread again.

    here is a link to the GPS unit.
    http://www.deluogps.com/prods_universal.html

    This link also says the serial port is TTL/RS-232 so would I still need a converter to connect to hyper terminal?

    Post Edited (Mike15) : 9/4/2006 9:52:23 PM GMT
  • Robert@HCCRobert@HCC Posts: 80
    edited 2006-09-04 23:04
    Mike15 said...
    I put a post on the company's forum.
    Also I am working on trying to get mine running. I ran out of battery power. So please check this thread again.


    here is a link to the GPS unit.

    http://www.deluogps.com/prods_universal.html



    This link also says the serial port is TTL/RS-232 so would I still need a converter to connect to hyper terminal?

    If I understand the site correctly, you can use either TTL or RS232.

    Is the GPS unit you have like the one on the site? Did it come with something to connect to a laptop/desktop as described on the website? If so, is their software to test or display data on your computer?

    Or is it a bare OEM unit....

    I have a OEM trimble LassenIQ that I connect to either my computer or a small LCD via my stamp using TTL. It also came with a small eval board that allows connecting directly to propeitary software on my comp to display data. Displaying GPS data is fairly simple with a stamp and TTL, there is quite a bit of code and examples throughout this froum and on the net. The Lassesn is also very easy to use, and very small.
    Here is a snippet that shows the WAIT command mentioned earlier :


    GetLatLong:                                                                                                   ' Read the GGA sentence from LassenIQ GPS -
                                                                                                                            ' $GPGGA,hhmmss.ss,llll.lll,a,nnnnn.nnn,b,t,uu,
    SERIN  14, Baud48,  [noparse][[/noparse]WAIT("GPGGA,"),SKIP 9,DEC WordData1,                            ' v.v,w.w,M,x.x,M,y.y,zzzz*hh <CR><LF>
      SKIP 6, ByteData1, DEC WordData2,SKIP 6, ByteData2,                                      ' - store Lat as WordData1, NS Coor as 
      SKIP 2,DEC NibData]                                                                                        'ByteData1, store LON as WordData2,and EW Coor as
    RETURN                                                                                                              '  ByteData2. Store the satellites in use as NibData
                                                                                        
                                                                                                                             
    
    




    Alohas,
    Robert

    Post Edited (Robert@HCC) : 9/4/2006 11:11:10 PM GMT
  • Mike15Mike15 Posts: 109
    edited 2006-09-04 23:14
    I have that GPS unit, but it has been modified to work with a HAM radio pocket tracker so it has a modified connector.

    So all I have is the GPS no software.
  • Mike15Mike15 Posts: 109
    edited 2006-09-11 03:26
    I ran the easy GPS program and when the GPS was connected nothing displayed in the debug terminal and when the GPS wasn't connected then I received the no GPS.

    The GPS has 2 data out lines one for TTL and another for serial. Which one should be connected to the Stamp
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-11 14:15
    Well, TTL is the level the BASIC Stamp will require if you're using one of the main I/O pins...RS-232 Serial if you're using the programming port for communication.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Mike15Mike15 Posts: 109
    edited 2006-09-12 01:13
    And this is where I think the problem is. I have been trying to use the serial data out.
  • Mike15Mike15 Posts: 109
    edited 2006-09-12 03:05
    I have changed the code a little bit I'm trying to display the vel and altitude.

    Here is what I changed in the code

    Setup:
    · DEBUG CLS


    '
    [noparse][[/noparse] Program Code ]

    Main:
    · SERIN Rx, Baud, TimeOut, No_GPS,
    ······· [noparse][[/noparse]WAIT("@"), SKIP 6, DEC2 hr, DEC2 mn, DEC2 sc,
    ········ latHemi, DEC2 latD, DEC2 latM, DEC2 latF, SKIP 1,
    ········ lonHemi, DEC3 lonD, DEC2 lonM, DEC2 lonF, SKIP 1,
    ········ SKIP 4, altSign, DEC5 alt,
    ········ ewDir, DEC4 ewVel, nsDir, DEC4 nsVel]

    ' The PAUSE instruction below shows how much time is
    ' available for processing captured GPS data

    Test:
    · PAUSE 750


    · DEBUG altSign, DEC5 alt,":",ewDir, DEC4 ewVel,":", nsDir, DEC4 nsVel, CR


    · GOTO Main
    · END


    '
    [noparse][[/noparse] Subroutines ]

    No_GPS:
    · DEBUG CLS, "No GPS..."
    · PAUSE 2000
    · GOTO Setup

    ·And here is the output I get
  • TobrewTobrew Posts: 8
    edited 2006-09-12 04:30
    Mike,

    I noticed on the datasheet that the unit is 4800 baud. Be sure to change the code to something like this..

    Baud CON T4800 + Inverted
    or
    Baud CON T4800


    Tobrew
  • Mike15Mike15 Posts: 109
    edited 2006-09-13 01:29
    When I do this I get no responce in the debug window?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-13 20:22
    Note that to use T4800 and Inverted they must be defined in your constants section with the appropriate values.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.