Shop OBEX P1 Docs P2 Docs Learn Events
GPS VPN1513 (#28508) (any code?) — Parallax Forums

GPS VPN1513 (#28508) (any code?)

fronafetsfronafets Posts: 5
edited 2014-10-28 16:45 in BASIC Stamp
Hi !. I'm trying to connect the GPS module VPN1513 (# 28508) with the basic stamp 2, but not how to read the data because the examples there are for the old version (# 28506). SOME EXAMPLE in (# 28508)?
thanks for the help!

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-09-24 09:51
    Hello,

    All the code we have for this GPS Module can be found here: http://www.parallax.com/search?search_api_views_fulltext=28508

    That said, the BS2 doesn't have the resources to handle the RAW data from the VPN1513 GPS Module. If you were to use a BS2p you could do it and there are examples for that model of BASIC Stamp 2.
  • fronafetsfronafets Posts: 5
    edited 2014-09-30 10:02
    thanks you!..

    Hello, I wonder why? it makes an "OR" between these two variables: (Open | T9600) represented in these lines:


    T9600 Con 84
    Open Con $8000
    Baud Con Open | T9600 'Open mode to allow daisy chaining.



    I have made my code, but it seems that does not work and I think it is because these 2 lines. would expect that they could help me. Thank you!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-09-30 12:00
    Setting bit 15 in the baud rate value sets 'open' mode. The statement sets bit 15 without affecting the baud rate value.
  • fronafetsfronafets Posts: 5
    edited 2014-10-04 11:42
    Hello. Please I need the command list for the gps VPN1315 (28508). datasheet not found brings. I would like to help me with that, because my code gives me giving results that do not understand (using the above previous model (28506))
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-10-06 08:40
    Hello,

    Did you see the link I posted above? The datasheet is available at that link.
  • fronafetsfronafets Posts: 5
    edited 2014-10-06 22:19
    hello, yeah, I saw.
    Thank you for your help Chris Savage.


    In the datasheet of the previous model has a set of default commands. In the datasheet you posted these commands do not appear by default.


    In the example to the GPS BS2 these commands are used by default.


    Assuming it's the same, I have this code, modified example (Code attached). running the code, I get this result. I wonder if these data are valid or not. And what could be wrong.
    Note:Since this GPS has 2 input and output pins (RX and TX), modified the code variable "Sio" for TX and RX.

    Appreciate your help. Thank you.


    VPN1513 GPS Receiver Module Test Application




    Hardware Version: 2.4
    Firmware Version: 4.7
    Signal Valid: No
    Acquired Satellites: 66 (changing to 49, 55,53 66, etc.)


    Error: No response from GPS Receiver Module




    code:

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}


    '
    [ I/O Definitions ]




    RX PIN 15 ' connects to GPS Module RX pin
    TX PIN 14 ' connects to GPS Module TX pin


    '
    [ Constants ]


    T9600 CON 84
    Open CON $8000


    Baud CON Open | T9600




    ' GPS Module Commands
    GetInfo CON $00
    GetValid CON $01
    GetSats CON $02


    '
    [ Variables ]


    MoveTo CON 2 ' DEBUG positioning command
    ClrRt CON 11 ' clear line right of cursor
    FieldLen CON 22 ' length of debug text








    char VAR Byte
    workVal VAR Word ' for numeric conversions
    eeAddr VAR workVal ' pointer to EE data


    ver_hw VAR Byte
    ver_fw VAR Byte


    valid VAR Byte ' signal valid? 0 = not valid, 1 = valid
    sats VAR Byte ' number of satellites used in positioning calculations








    '
    [ EEPROM Data ]


    NotValid DATA "No", 0
    IsValid DATA "Yes", 0
    DaysInMon DATA 31,28,31,30,31,30,31,31,30,31,30,31
    MonNames DATA "JAN",0,"FEB",0,"MAR",0,"APR",0,"MAY",0,"JUN",0
    DATA "JUL",0,"AUG",0,"SEP",0,"OCT",0,"NOV",0,"DEC",0




    '
    [ Initialization ]


    Initialize:
    PAUSE 250 ' let DEBUG open
    DEBUG CLS ' clear the screen
    DEBUG "VPN1513 GPS Receiver Module Test Application", CR,
    "
    "


    Draw_Data_Labels:
    DEBUG CRSRXY, 0, 3, " Hardware Version: "
    DEBUG CRSRXY, 0, 4, " Firmware Version: "
    DEBUG CRSRXY, 0, 5, " Signal Valid: "
    DEBUG CRSRXY, 0, 6, " Acquired Satellites: "
    '
    [ Program Code ]


    Main:




    GOSUB Get_Info
    GOSUB Get_Valid
    GOSUB Get_Sats
    GOTO Main


    '
    [ Subroutines ]




    Get_Info:
    SEROUT RX, Baud, ["!GPS", GetInfo]
    SERIN TX, Baud, 3000, No_Response, [ver_hw,ver_fw]
    DEBUG CRSRXY, FieldLen, 3, HEX ver_hw.HIGHNIB, ".", HEX ver_hw.LOWNIB
    DEBUG CRSRXY, FieldLen, 4, HEX ver_fw.HIGHNIB, ".", HEX ver_fw.LOWNIB
    RETURN


    '


    Get_Valid:
    SEROUT RX, Baud, ["!GPS", GetValid]
    SERIN TX, Baud, 3000, No_Response, [valid]


    DEBUG CRSRXY, FieldLen, 5 ' was the signal valid?
    LOOKUP valid, [NotValid, IsValid], eeAddr ' get answer from EE
    GOSUB Print_Z_String ' print it
    'DEBUG ClrRt ' clear end of line
    IF (valid = 0) THEN Signal_Not_Valid
    RETURN


    '


    Get_Sats:
    SEROUT RX, Baud, ["!GPS", GetSats]
    SERIN TX, Baud, 3000, No_Response, [sats]
    DEBUG MoveTo, FieldLen, 6, DEC sats


    '




    No_Response:
    DEBUG MoveTo, 0, 18, "Error: No response from GPS Receiver Module"
    ' DEBUG BIN8 sats


    FREQOUT 0,5000,8000
    PAUSE 3000
    GOTO Initialize


    '


    Print_Z_String:
    READ eeAddr, char ' get char from EE
    IF (char = 0) THEN Print_Z_String_Done ' if zero, we're done
    DEBUG char ' print the char
    eeAddr = eeAddr + 1 ' point to the next one
    GOTO Print_Z_String


    '
    Print_Z_String_Done:
    RETURN




    '
    Signal_Not_Valid:
    DEBUG MoveTo, FieldLen, 7, "?", ClrRt ' clear all fields
    DEBUG MoveTo, FieldLen, 9, "?", ClrRt
    DEBUG MoveTo, FieldLen, 10, "?", ClrRt
    DEBUG MoveTo, FieldLen, 12, "?", ClrRt
    DEBUG MoveTo, FieldLen, 13, "?", ClrRt
    DEBUG MoveTo, FieldLen, 14, "?", ClrRt
    DEBUG MoveTo, FieldLen, 15, "?", ClrRt
    DEBUG MoveTo, FieldLen, 16, "?", ClrRt
    GOTO Main
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-10-07 10:23
    Okay, that was the missing information. This version is not compatible with that code. That version was made to be more BASIC Stamp friendly. It had a 'smart mode' where you could request various data. However the current version deals only with RAW NMEA data and sends it out continuously.
  • fronafetsfronafets Posts: 5
    edited 2014-10-28 16:45
    Hello !. thanks for all the above. I decided to use an Arduino to use the GPS. I have read the NMEA data. need to have a posion in X and Y with respect to an initial position. I need a relative position to having my GPS. Here are my questions.
    1. Is it possible to use use the NMEA input commands, especially this: Navigation lnitialization ID: 101 Parameters required for start. for this problem? in this case, I can not understand how to use it.
    2. The GPS has an accuracy of 10 meters (according to the datasheet). Is it possible to obtain a relative position, ie if I have 10mts error in position A, and I move to a position 30 cm, should give me the coordinates of 30 cm from A to B? or remains an error of 10 m ?.
    3. I have a problem. Sometimes I run the program and have all the wires connected properly, but the LED does not blink (I guess there is receiving data). Is there any reason that could be happening ?.
    to leave it still for some time, working for no apparent reason.


    really thanks!


    stefan
Sign In or Register to comment.