Shop OBEX P1 Docs P2 Docs Learn Events
Stupid question (baud rates) — Parallax Forums

Stupid question (baud rates)

skatjskatj Posts: 88
edited 2008-02-03 04:12 in BASIC Stamp
I am writing a program that uses both the PSC and the Parallax GPS receiver, however both of them use a constant called 'Baud' that is different for both of them. I'm not exactly sure what it is for, but I read some other source code and they renamed the GPS baud to "Baudg". I ran the GPS demo code and used find..replace to replace every instance of Baud with Baudg to see if it would work, but the debug showed that there was no response from the GPS when I ran it. The GPS demo worked fine when it was just 'Baud'.

Any suggestions?

Comments

  • DgswanerDgswaner Posts: 795
    edited 2008-02-03 03:16
    bottom line you need to set the baud rate of your stamp to the baud rate of your computer... (set them to the same setting) if your using a basic stamp 1 or 2, I'd stick with 2400 baud as it's not fast enough to handle higher rate, It doesn't matter what that baud constant name is.... baud, baudg, comspeed, what ever you want to call it, it's the value that matters. there is a chart in the stamp manual that lists what value you need for each baud rate and mode. I believe it's on page 401. different stamps can have different values for the serout command to achieve the same baud rate. it all has to do with the speed of the stamp, to put it simply. look at the chart and find the values you need for the stamp and do the same thing for the PCS and you should be good to go.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-02-03 03:54
    Hello,

    You’ll need to create another constant such as PSCBaud and alter the SEROUT commands for the PSC to use that constant instead. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • skatjskatj Posts: 88
    edited 2008-02-03 04:12
    Thanks Chris that works, since the PSC commands are a little less complicated than the GPS.
Sign In or Register to comment.