Arduino Mega2560 and Lassen IQ GPS

Hi all,

I'm new to Arduino. I'm trying to make my Mega2560 talk to my Lassen IQ GPS (on the GPS logger shield from Adafruit). So far I only managed to get the logger to work.

I tried with the "SoftwareSerial" and no luck yet.

If anyone can give me clue on which way to go.

Thanks.

I cant remember which pins, but you can use the serial from the device on digital pins 0 and 1 on a duemelanovae and uno, i think its the same as mega, but this is a hardware serial, then you can follow most of the gps tutorials. Arduino Playground - GPS

Thanks for the answer, but no luck yet.

More details about my setup:

Arduino Mega 2560
Adafruit GPS data logger v1.1 sheild
GPS Lassen IQ

Tx on pin #2
Rx on pin #3
Power pin #4

Here is one of the sketch I'm trying to use. Like I said in the original post, for now I'm just trying to receive any kind of data, I'm not in the parsing yet.

Thanks.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

void setup()
{
Serial.begin(57600);
Serial.println("Goodnight moon!");

// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
}

void loop() // run over and over
{
if (mySerial.available())
Serial.print((char)mySerial.read());
if (Serial.available())
mySerial.print((char)Serial.read());
}

you could get rid of the cast to char on the serial.println, its not necessary

I don't think it will make any difference, I don't get there but thanks.

I'm running the Lassen IQ on the Sparkfun GPS evaluation board and the unit is working correctly at least on Tsip. It's really look like a problem with the serial communication on the Mega or with the Lassen.

Ok,

just did a test with an Arduino Uno (a friend's one) and it's working with the code above... So the problem is with the MEGA 2560, so I have to do more tests. I saw in a post somewhere that the Mega can't read on any pin... I'll rewire it and let you know.

Thought I'd mention I'm in the same situation. I found out the Mega 2560 doesn't like using 2, 3 as soft serial ports. I ran the serial pins to Serial1 and edited the SD_GPSlogger code, eliminating soft serial and changing gpsSerial to Serial1 in all instances. That worked fine for getting the limited functions Trimble offers through NMEA. I'll be working on some code to use their proprietary communications. It requires sodlering wires to pins 1 & 3 on the surface mount of the adafruit shield. Those are the pins connecting to Serial A of the GPS.

Some useful links:

http://forums.adafruit.com/viewtopic.php?f=31&t=21910

http://forums.adafruit.com/viewtopic.php?f=31&t=14814

Why are you trying to
a) use obsolete SoftwareSerial
b) any software serial software
on a Mega with 4 hardware serial ports?

The code offered with the Adafruit GPS logger board uses soft serial ports as it was designed to work with standard Arduinos. It is the same software I started out using and modified to make work on the Mega's hardware serial ports. The code is pretty complex looking to newbies like myself and, I assume, the original poster.

The code is pretty complex looking to newbies like myself and, I assume, the original poster.

A global replace of mySoftSerial with Serial1 doesn't require a great deal of understanding of the code to implement.

Understanding the limitations and capabilities of the libraries one is using, on the other hand, may require some level of understanding, but it is essential that the effort be extended.

PaulS:
A global replace of mySoftSerial with Serial1 doesn't require a great deal of understanding of the code to implement.

Right, that's why I could figure out that eliminating softSerial and replacing it with Serial1 solved my problem with using the NMEA communications.

Understanding the limitations and capabilities of the libraries one is using, on the other hand, may require some level of understanding, but it is essential that the effort be extended.

Yes, but when there are project deadlines, like in my case, that isn't always an option. Learning complex subjects in depth takes time. I'll have to invest it later when I have some to spare :slight_smile: