Shop OBEX P1 Docs P2 Docs Learn Events
28146 GPS in RAW mode — Parallax Forums

28146 GPS in RAW mode

DraetoxtheloonDraetoxtheloon Posts: 33
edited 2011-09-24 21:07 in General Discussion
I need help with my GPS, I was in another forum trying to get the Parallax 28146 to work in Smart mode, although due to communication errors between the MCU and the GPS I don't think it will work, at least not in the time I need it to. So I have connected the GPS in RAW mode and I'm sending what the GPS outputs to Tera Term, the problem I'm having is that I'm getting strings such as:
$PG,9060055.05N13869,,,71013.,,1.,,00*8                                                             GGAA31,80,20,00,,,1710143
$PG,9070055.05N13869,,,71013.,,1.,,00*9GGAA31,80,20,00,,,1710143
$PG,9080055.05N13869,,,71013.,,1.,,00*6GGAA31,80,20,00,,,1710143
$PG,9090055.05N13869,,,71013.,,1.,,00*7GGAA31,80,20,00,,,1710143
$PS,,,11,533,40,3,1,4212*8,20,4,77     GGAA31,80,20,00,,,1710143
                          GRC134.0,,0490,,15.85W00,2.5201,,*F
                                                             $PG,9000055.05N13869,,,71013.,,1.,,00*F
$PG,9010055.05N13869,,,61013.,,1.,,00*F                                                             GGAA31,80,20,00,,,1710143
$PG,9020055.05N13869,,,61013.,,1.,,00*CGGAA32,91,22,4,,,2110183
$PG,9030055.05N13869,,,61013.,,1.,,00*DGGAA32,91,22,4,,,2110183
$PM
According to the Parallax 28146 GPS datasheet I should be getting the data:
  • $GPGGA: Global Positioning System Fix Data
  • $GPGSV: GPS satellites in view
  • $GPGSA: GPS DOP and active satellites
  • $GPRMC: Recommended minimum specific GPS/Transit data
When the GPS is connected to RAW mode, I can only see the $GPGGA code, I think, the reason I'm thinking that is because of this line:
GGAA31,80,20,00,,,1710143
Although that code makes no sense, as there is no Time or latitude/longitude....

I'm wondering if anyone can help me understand what I'm getting on the output especially the line:
$PG,9030055.05N13869,,,61013.,,1.,,00*DGGAA32,91,22,4,,,2110183
Can someone HELP ME PLEASE!!!!

Comments

  • PublisonPublison Posts: 12,366
    edited 2011-09-24 13:05
    Do you have Tera Terminal set up for:
    All communication is at 4800 bps, 8 data bits, no parity, 1 stop bit, non-inverted.

    Looks like it might be a timing problem. All the information is not passing.ie, dropping bits.
    Mine works fine through Hyperterminal and Parallax Serial Terminal.
  • DraetoxtheloonDraetoxtheloon Posts: 33
    edited 2011-09-24 13:33
    Yes I'm at:
    Baud Rate --> 4800
    Data --> 8 bit
    Parity --> None
    Stop --> 1 bit
    Then I have something called flow control which is --> None, although it has the options: Xon/Xoff, hardware, none..... I don't have any setting for inverted/non-inverted

    Also I have a setting for the Transmit delay with two boxes --> "blank" msec/char and "blank" msec/line <-- the "blank" spaces are where you would put the amount, currently I have both set for 0

    I don't have Hyperterminal, although I could look for Parallax Serial Terminal, did you get Parallax Terminal from this site??
  • DraetoxtheloonDraetoxtheloon Posts: 33
    edited 2011-09-24 13:47
    Cool, actually I just downloaded the Parallax Serial Terminal although I get the same output as I do with my Tera Term..... I need the GPRMC string, or atleast make my output legable, if it is a timing issue does anyone know how to fix that, kind of like delay the time it takes to read bytes from the gps before displaying the to the terminal, as far as I can tell this is what is needed, correct?
  • PublisonPublison Posts: 12,366
    edited 2011-09-24 13:51
    Cool, actually I just downloaded the Parallax Serial Terminal although I get the same output as I do with my Tera Term..... I need the GPRMC string, or atleast make my output legable, if it is a timing issue does anyone know how to fix that, kind of like delay the time it takes to read bytes from the gps before displaying the to the terminal, as far as I can tell this is what is needed, correct?

    Could you describe or post a picture of your hardware setup?
  • DraetoxtheloonDraetoxtheloon Posts: 33
    edited 2011-09-24 13:59
    yeah I'll try to post a picture or two, just give me a sec...
  • DraetoxtheloonDraetoxtheloon Posts: 33
    edited 2011-09-24 14:13
    PIC18F26K22 connected to MAX232.jpg
    GPS connected to PIC18F26K22.jpg


    So the first picture is my microcontroller a PIC18F26K22 which is connected to an olimex development board which has a MAX232 IC chip on it, this is then connected to my PC in order to transmit the serial data to a terminal, currently tried Tera Term and Parallax Serial Terminal with the same output.

    The second image is the GPS connected in RAW mode to the PIC MCU, the whole circuit is being powered by a MPLAB ICD2 (in-circuit debugger), currently I'm using software UART which is similar to PBasic SEROUT and SERIN
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-09-24 15:57
    It's not the baud rate or other mis-setting in the communications because the data you are getting looks valid. You're just missing some bytes out of it.

    You mention 4800 baud from the GPS, but don't mention the speed from your PIC to the terminal. It needs to be at least 4800 baud, if not 2-4 times faster.

    Your use of software UART (I assume on the receive end from the GPS) isn't helping matters. Use the hardware UART so that your chip doesn't drop any characters. The hardware UART has a buffer in it, so incoming bytes are not lost while the chip is doing something else.

    As far as delaying bytes from the GPS, that's not an option you want or need to have. The 4800 baud speed is plenty slow already for most any real-time processing you need to do.

    -- Gordon
  • DraetoxtheloonDraetoxtheloon Posts: 33
    edited 2011-09-24 16:26
    Okay, my PIC is at 4800 baud as well, I have tested this in a simulator, the problem I have with Hardware UART is that when I say data = ReadUSART() I don't actually receive anything from the GPS, but when I'm in software UART I can use data = ReadUART() and that works........literally the two look the same but one works and the other doesn't. Would you maybe know why this is the case, both Software/Hardware UART/USART have Read and Write functions, for some reason the hardware USART doesn't receive though.
  • PublisonPublison Posts: 12,366
    edited 2011-09-24 16:32
    Okay, my PIC is at 4800 baud as well, I have tested this in a simulator, the problem I have with Hardware UART is that when I say data = ReadUSART() I don't actually receive anything from the GPS, but when I'm in software UART I can use data = ReadUART() and that works........literally the two look the same but one works and the other doesn't. Would you maybe know why this is the case, both Software/Hardware UART/USART have Read and Write functions, for some reason the hardware USART doesn't receive though.

    Thanks for the info. Unfortunately I am only familiar with the Basic Stamp and Propeller software.

    Sorry I can't be of any help.
  • DraetoxtheloonDraetoxtheloon Posts: 33
    edited 2011-09-24 16:41
    Cool no problem, I have spoken with Gordon before in another forum and he is of Great Help, Thanks again Gordon, and of course you as well Publison
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-09-24 21:07
    I don't know this PIC, and I think at this point you're really best off in a forum dedicated to the chip you're using. The GPS is putting out standard NMEA strings in serial, and there's nothing special about it. In fact, in RAW mode you're just getting the strings passed through from the GPS module. They aren't even being processed by the controller on the 28146.

    Your problem could be from many, many things, some of which *could* be:

    * Hardware UARTs are usually tied to a specific pin. Make sure you're using the right pin for Rx.

    * Use non-inverted input. The default for hardware UART may be inverted serial. Change as needed.

    * If this chip is also programmed through the same UART you may need to disconnect the programming lines before you can receive from a different device.

    These are the first three that came to my mind, but really, the list goes on.

    -- Gordon
Sign In or Register to comment.