Shop OBEX P1 Docs P2 Docs Learn Events
GPS RS232 and TTL — Parallax Forums

GPS RS232 and TTL

YoshtiYoshti Posts: 108
edited 2009-10-09 20:33 in BASIC Stamp
Hi all,
The two GPS sold by Parallax, in the documentation, it shows they can be connected via RS232 or TTL.

Can both be used at the same time?
For Ex: Through USB my BS2 talks to my pc, the GPS is connected to my BS2. Can my PC also connect directly to the RS232 on the GPS?

Cheers

Yosh

Comments

  • TumblerTumbler Posts: 323
    edited 2009-10-02 20:01
  • YoshtiYoshti Posts: 108
    edited 2009-10-04 02:34
    HI !
    LMAO ! tada.. just love it.. wink.gif I'm lost the data sheet show RS232 and also TTL... so it does not apply.. I can connect directly the RS-232...
    See this : http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/DM-PMB-248-648-060301.pdf

    So it seems I can plug it right in!

    If so, can I use the RS-232 and the TTL channel to talk to both at the same time?

    Cheers
    And thanks for the link!

    Yosh !
  • TumblerTumbler Posts: 323
    edited 2009-10-04 02:42
    I'm not sure if you can Yoshti, using both at the same time.

    Luc·
  • dev/nulldev/null Posts: 381
    edited 2009-10-04 19:59
    If you keep track of the timing so that only the PC or Stamp is communicating with the GPS at any one time, it should be ok. I didn't look at the schematics, but make sure there are resistors on the Rx- Tx lines (if not you could damage your equipment).

    RS-232 was made as a point-to-point protcol, but you can have multiple listeners. You could also make this work properly with auctioneering diodes, but you don't need to if you keep track of the timing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • YoshtiYoshti Posts: 108
    edited 2009-10-05 15:46
    Hi,
    Dev/null , see I assumed that in the diagram, showing RS-232 , would mean a COM port directly connected to it.
    For NOOB and inexperienced like me, things like that gets very frustrating, when it is not CLEAR. For expert like you guys, it's a walk in the park.

    So to plug it, directly in the COM port, what kind of resistor? (and why?)

    Cheers
    Yosh
  • dev/nulldev/null Posts: 381
    edited 2009-10-05 18:29
    The reason you need resistors is if two units are trying to send at the same time, you will have a short circuit. It is to protect the Stamp pins. To be safe, put an 1K resistor on the Rx/Tx pin going into the Stamp and into your PC. This will limit the current to the pin in case something wrong happens with your timing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • YoshtiYoshti Posts: 108
    edited 2009-10-05 19:15
    Hi Dev/Null,
    OKydoky,
    And If I just want to connect the GPS to my PC, there is no need.. right? straight in.. !

    Cheers
    Thanks for your patience with nooby like me... ! smile.gif

    Yoshi
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-10-05 21:10
    Um, dude, if you follow the schematic, it looks like there's a MAX232 chip between the GPS unit and the PC. That's quite different from "straight in".

    Also, it looks like only two wires are connected -- ground (pin 5 on the PC) and RX (pin 2 on the PC). I suspect if you connect TX (pin 3 on the PC) directly to the GPS, you'll do some damage.

    So let's be careful out there, okay?
  • YoshtiYoshti Posts: 108
    edited 2009-10-06 00:54
    Hi,
    which schematics? from : http://forums.parallax.com/forums/default.aspx?f=21&m=180521
    (this diagram does not show a RS-232 line from the GPS, just the TTL converted...)


    or this one : the PMB-248
    http://www.parallax.com/Portals/0/Downloads/docs/prod/sens/PMB-248 GPS Receiver_A Schematic.pdf

    To me the diagram show a direct connection to a RS-232.

    Cheers
    Yosh
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-10-06 17:26
    Oh. Okay, if you're using a PMB-248, then apparently it has an RS-232 level shift on it for those pins. So using pins 5 and 6 on the module, you can connect direct.
  • hover1hover1 Posts: 1,929
    edited 2009-10-06 17:55
    On Parallax Item #28500 you probably would not connect Pin 6 (RS-232 Rx) and Pin 2 (TTL Rx) because you never issue commands to the GPS module. It just spits out NMEA data at 4800 baud every second. You just listen for the data.

    As for the original question, I don't see why you couldn't listen to both the RS-232 (to PC Com Port) and TTL (BS2) lines at the same time, but I would contact Parallax Tech Support to be sure.
  • YoshtiYoshti Posts: 108
    edited 2009-10-06 18:21
    ~S!~ Great

    My end results is this:
    Have a BS2 and a BS2p40 talk to each other, while both BS2 have sensors attached to them.
    Spit the info on the LCD display 4 lines by 20... My Compass so far is working great.
    Now adding a GPS also would be great.

    Then without disconnecting any of those components, connect my laptop to the GPS and use a Map and Road software ! Through a USB to COM port converter (Parallax has a great one) I would just plug it in!

    Is that be possible?

    Cheers

    Yosh!
  • dev/nulldev/null Posts: 381
    edited 2009-10-06 18:48
    It should work fine Yohsti. What you need to do on your PC is to filter out the commands sent from the Stamp to the GPS. Since you are using the same wires, your PC will receive whatever the Stamp sends to the GPS as well. The Stamp sends "!GPS" plus a byte to the GPS, so this is what you need to filter out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • YoshtiYoshti Posts: 108
    edited 2009-10-06 19:25
    Hi dev/nul,
    I don't get it... I thought I'm not using the same wire!
    Cheers
    Yosh
  • hover1hover1 Posts: 1,929
    edited 2009-10-07 11:31
    I guess some clarification is needed at this point. Which GPS unit are you using? The 28146 Smart GPS module or the 28500 module. The lesser expensive 28500 is the one with seperate RS232 and TTL lines. If it is the 28500, you don't send "!GPS" to it. It doesn't have any smarts. You just·listen to the raw data.
    Yoshti said...
    Hi dev/nul,
    I don't get it... I thought I'm not using the same wire!
    Cheers
    Yosh
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-10-07 16:10
    Not sure if I missed something above or not. On the PMB-248 GPS Receiver we carry you don't want to connect the RS-232 and TTL connections at the same time. You would use one or the other. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    ·
  • YoshtiYoshti Posts: 108
    edited 2009-10-07 18:41
    ~S!~ Chris
    Great thanks !

    Now what would happen if I connect both?...
    I know if there is no big threath to connect both at the same time ... silly me will try anyway just to see what will happen !
    Cheers
    Yosh !
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-10-07 18:56
    You could potentially damage the GPS Module and it would not be a warranty issue. =) I'd recommend against it. Now, in theory you could connect just the outputs (both RS-232 and TTL) without issue. The inputs are what makes connecting both channels a bad thing. The outputs just stream data out and are isolated by the RS-232 driver on the GPS.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    ·
  • YoshtiYoshti Posts: 108
    edited 2009-10-07 19:34
    ~S!~ Chris
    Ok super... now its clear " I promised I will not connect them both"

    Now what would you suggest of a setup, to "TOGGLE" the 2. Meaning, It will run most of the time on the BS2. And once in a while , i would need my PC to connect to it : (Without physically openning my kit un-plug my BS2 from it, and wire the PC.

    Must be a way to do an automatic "SWITCH" over? or at least a main switch to flip the connection?

    Cheers
    Yosh
  • hover1hover1 Posts: 1,929
    edited 2009-10-08 02:42
    Chris,

    I think this has been the issue all along.·I believe we are talking·about the #28500 althought the OP never said, I asked him to clarify. There is no input to that module, just output.·THERE IS NO INPUT JUST OUTPUT.

    And you said·"Now, in theory you could connect just the outputs (both RS-232 and TTL) without issue."

    I think that is what he was looking for all along.

    If it is still not clear, please ask.

    Best Regards,

    Jim
    Chris Savage (Parallax) said...
    You could potentially damage the GPS Module and it would not be a warranty issue. =) I'd recommend against it. Now, in theory you could connect just the outputs (both RS-232 and TTL) without issue. The inputs are what makes connecting both channels a bad thing. The outputs just stream data out and are isolated by the RS-232 driver on the GPS.

    Post Edited (hover1) : 10/8/2009 2:47:11 AM GMT
  • YoshtiYoshti Posts: 108
    edited 2009-10-08 03:29
    Hi,
    I did not check the stock number but I'm pretty sure that the 28500 is the PMB-248.
    That is the one showing in the schematics with to line of communication... so yes it is...

    And yes also connect them both at the same time to read the NMEA (hope is the right acronym) stream...
    But if still too risky to use both at the same time, there must be a geek in here wink.gif to guide me to set up a nice way to toggle the connection. Either manually or using the BS2(preferred).

    Cheers
    Yosh
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-10-08 18:22
    28500 has both TTL and RS-232 inputs and outputs. If you connected both sets of inputs you could damage the PMB-248. If, however you were merely streaming the output to different devices you should be fine because there would be no possibility of a bus conflict.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    ·
  • YoshtiYoshti Posts: 108
    edited 2009-10-09 00:03
    Hi,
    Wow excellent ! thanks to all involved.. learned some good stuff at the same time!
    One more then!
    Can I then use only one input (TTL from the bs2) to control the GPS, while the RS-232 I would connect only the output to the PC? is that still ok not to have a bus conflict ?

    Cheers
    Yosh
    Thanks again !
  • hover1hover1 Posts: 1,929
    edited 2009-10-09 13:03
    Yosh - What do you want to control on the GPS? The·Parallax # 28500 does not have any instruction set. It is output only. The input to the GPS may be there for factory programming.
    Now the Parallax #28146 does respond to commands because it has a SX20 on board the module. It only has one pin for I/O and is TTL.
    Yoshti said...

    Can I then use only one input (TTL from the bs2) to control the GPS, while the RS-232 I would connect only the output to the PC? is that still ok not to have a bus conflict ?

    Cheers
    Yosh
    Thanks again !
  • YoshtiYoshti Posts: 108
    edited 2009-10-09 15:05
    Hi Hover1
    Even better. Anywhere showed anything about input instructions and how I talk to it!

    So there is no need for me to connect the INPUT on the GPS to anything! Great!

    LMAO, It took a long thread to get all the info, but learned a lot!

    Thanks Hover! I'm getting there slowly ! wink.gif

    Can we clean this thread to condense all this info to couple replies?

    It would be clearer for later when searching for this info! Especially for a noob like me!!!

    Cheers
    Yosh
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-10-09 16:28
    Actually, while we don't have the specification sheet for these modules, all GPS receivers I have seen that have serial inputs do have customer level commands that can be sent. For example, I have seen several where the baudrate of the serial stream can be changed by sending a serial command to it. There are also commands on some for storing clibration information. It really depends on the receiver and the level of depth you want to go into but first you need the firmware specification. For our purposes this was a way to get a 3.3V capable unit that would be more compatible with the Propeler, while still being compatible with the BASIC Stamp Modules.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    ·
  • hover1hover1 Posts: 1,929
    edited 2009-10-09 20:28
    If Parallax had code to talk to the GPS, they would have posted it, they never leave us out in the coldtongue.gif And Chris has given all the information that he has. He is a wealth of information. He doesn't get enough thanks at times.

    I have drilled down into the Polstar site to try and find instructions for the PMB-248 to no avail.·That's OK since it works as advertised as a GPS reciever.

    When I want a little more control, I use the 28146, which allows some hacking. See Nuts and Volts Column #139

    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV139.pdf

    But Yosh, start off by understanding the output of the #28500 NMEA strings, and extract the data that you need and manipulate it the way you want.

    Good Luck!

    Jim
    Chris Savage (Parallax) said...
    Actually, while we don't have the specification sheet for these modules, all GPS receivers I have seen that have serial inputs do have customer level commands that can be sent. For example, I have seen several where the baudrate of the serial stream can be changed by sending a serial command to it. There are also commands on some for storing clibration information. It really depends on the receiver and the level of depth you want to go into but first you need the firmware specification. For our purposes this was a way to get a 3.3V capable unit that would be more compatible with the Propeler, while still being compatible with the BASIC Stamp Modules.

    Post Edited (hover1) : 10/9/2009 8:40:37 PM GMT
  • hover1hover1 Posts: 1,929
    edited 2009-10-09 20:33
    @Yosh

    See post·above about talking to the module.

    I can write something up after I get back from my three day vacation, (only one this year!)

    Jim
    Yoshti said...
    Hi Hover1
    Even better. Anywhere showed anything about input instructions and how I talk to it!

    So there is no need for me to connect the INPUT on the GPS to anything! Great!

    LMAO, It took a long thread to get all the info, but learned a lot!

    Thanks Hover! I'm getting there slowly ! wink.gif

    Can we clean this thread to condense all this info to couple replies?

    It would be clearer for later when searching for this info! Especially for a noob like me!!!

    Cheers
    Yosh
Sign In or Register to comment.