Problems with connecting gps module to Arduino Mega 1280

So I have been trying to connect gps module to my Mega and it’s not working. I’m not quite sure how to connect the Tx and Rx wires from the gps.
I have them now connected to Mega’s Tx1 and Rx1 which are pins Rx1 = 19 and Tx1 = 18.

I have been searching for many examples but I am confused about the pins…

Here’s my testing code:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // Are these referring to the Rx and Tx pins or just some Digital pins or what? 
// I have been testing the code with 19 and 18 pins in this function but noooo...

void setup()  
{
  Serial.begin(57600);
  mySerial.begin(4800); // GPS baudrate
  Serial.println("Ready");
}

void loop()
{
  if (mySerial.available())
  {
    char c = mySerial.read();
    Serial.write(c);
  }
}

You haven't said which GPS you're using, but it may be that you need RS232 level converters.

It's RoyalTek RGM-2000.

SoftwareSerial mySerial(2, 3); // Are these referring to the Rx and Tx pins or just some Digital pins or what?

Just some digital pins.

You don't need to use SoftwareSerial. Use Serial1 (as you are plugged into TX1/RX1) instead.

void setup()  
{
  Serial.begin(57600);
  Serial1.begin(4800); // GPS baudrate
  Serial.println("Ready");
}

void loop()
{
  if (Serial1.available())
  {
    char c = Serial1.read();
    Serial.write(c);
  }
}

dxw00d: SoftwareSerial mySerial(2, 3); // Are these referring to the Rx and Tx pins or just some Digital pins or what?

Just some digital pins.

You don't need to use SoftwareSerial. Use Serial1 (as you are plugged into TX1/RX1) instead.

void setup()  
{
  Serial.begin(57600);
  Serial1.begin(4800); // GPS baudrate
  Serial.println("Ready");
}

void loop() {   if (Serial1.available())   {     char c = Serial1.read();     Serial.write(c);   } }

I tried that too before I made this topic in here, also not working. Could it be that I need the TTL-to-RS232 converter like AWOL said?

The only device with that name I could find appears to be a USB device. How have you connected it?

Looks like this GPS has the ability to use different cables for either USB or serial interface (google provided references using this hardware with PocketPC's as well as via USB).

I did find a partial tear-down (see http://www.tobias-schlegel.de/?page_id=51&lang=en) that may provide access to the TTL level signals needed.

If the OP is using the serial interface cable it will most certainly require a converter.

I hope this helps,

Brad (KF7FER)

AWOL:
How have you connected it?

The wires come straight to the arduino from the gps module. There’s nothing between on the module and Arduino. In the Brad’s link, there was a picture where was only the Tx wire named, so is it necessary to connect the another ( white (Rx) ) wire to Arduino at all?

I have the components to do the TTL->RS232 converter so I think I’ll give it a try as soon as possible!

Okhhheyyy, I got it working!(and without the converter). I'm not sure what was wrong at the first place... But thanks for the help anyways!