Shop OBEX P1 Docs P2 Docs Learn Events
GPS Too Hyper — Parallax Forums

GPS Too Hyper

HumanoidoHumanoido Posts: 5,770
edited 2009-04-18 15:04 in Accessories
The GPS outputs 4800 baud but my stamp only inputs 2400 baud.
How can 4800 be made to match 2400 (in a very simple way)?

Thanks sincerely,
humanoido

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-04-16 17:54
    You must be using a BS1. The BS2 should be able to handle 4800 baud with ease. Also, any Stamps in the BS2p series could slurp an entire line of NMEA at once. Without an external processor to act as a mediator to buffer the faster input for slower output, there's no simple way to do what you want. A less simple solution would be to modify the GPS's SX/B code for Smart Mode to communicate at the lower baud rate.

    -Phil
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-04-17 02:26
    Thanks Phil. Yes I'm using the Stamp 1. I know any "other" stamp in lineup will work. But I don't want to use any other stamp. Why does the gps product exclude a more simple baud rate for this very important stamp?

    So what you're saying is, if I want to use the gps with a BS1 at 2400 baud, I will need to intercept the 4800 serial transmission with a BS2 processor, then resend it at the slower rate to the Stamp 1, or reprogram the gps in SX/B code. SX/B is not a language I know and adding the BS2 as a coprocessor to the BS1 defeats the BS1 purpose (which is smaller footprint, lighter - has less inertial mass, available in a convenient developers tiny SMT package, less cost, ease of use, has all the power needed for my projects, etc.).

    It does appear that the original SX/B code should have programming to include 2400 baud, so the BS1 can be used with gps.

    humanoido
  • Rob7Rob7 Posts: 275
    edited 2009-04-17 14:32
    So, it looks likes this project will require some tweaks.
    Humanoido wrote: Yes I'm using the Stamp 1. I know any "other" stamp in lineup will work. But I don't want to use any other stamp.
    I only have a BS1 to use currently on this project and that is the stamp "I wish to use."
    Any suggestions on reconfiguring hardware or code snippet's for the BS1 for GPS would be great help.
    As of now I plan to use the:
    BS1
    GPS module
    LCD 2x16

    ·Rob7


    Post Edited (Rob7) : 4/17/2009 2:48:50 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-04-17 16:21
    It would be impractical for the GPS unit to support 2400 baud, since 4800 baud is the standard rate for NMEA sentences and the rate at which the data comes from the onboard Polstar GPS module. Retransmitting a continuous 4800-baud stream at 2400 baud would fail, since there's no way to keep up with the incoming data. At best, the retransmitted data would not be contemporaneous with one's position. The only way this could possibly work is in Smart Mode, where the number of bytes output is a small fraction of the number of bytes input.

    Regarding a potential BS1+GPS combo: at some point, one has to recognize when the tail is wagging the dog. smile.gif

    -Phil
  • Rob7Rob7 Posts: 275
    edited 2009-04-18 02:15
    It looks like the BS2 is the only way to go on this one.

    Rob7
  • DufferDuffer Posts: 374
    edited 2009-04-18 05:06
    From looking at the SX/B code (available on the product page for the GPS Module, see·"SX/B Control·Firmware"), it should be possible to let the SX communicate with the GPS unit at 4800 baud as it does now and change the baud rate·for the Sio pin to 2400 baud. It means that you could only use the Smart Mode. Just look for SERIN and SEROUT commands in the subroutines toward the bottom that uses Sio for the pin (RX_BYTE and TX_BYTE)·and change baud rate to "T2400" instead of using the constant "baud" that's defined as "T4800". The program communicates with the GPS unit itself on two other pins which can be left at the default 4800 baud and the Sio pin to receive commands and send resulting data in smart mode.

    This might all be moot, however, unless you can find a way to reload the SX chip with the modified code. I'm not sure how you would do that, but the SX chip is accessable on the bottom ot the module's PCB.

    Duffer
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-04-18 05:16
    There are four pads for programming the SX on the GPS module, to which a header could be soldered for connecting an SX-Key.

    -Phil
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-04-18 15:04
    Thank you Duffer and Phil.
    I'm looking forward to trying this.
    If anyone tries this first,
    post your results and process.
    It will be helpful.

    Use WordPad to view the SX/B code
    and did see the location for the
    receive and send baud rates.

    humanoido
Sign In or Register to comment.