TinyGPS test_with_gps_device

Hello,

I am trying an EM-406 GPS unit with a Mega 2560 using the Arduino 1.0 r2 IDE. I have just tried the test_with_gps_device example sketch with the TinyGPS library. It seems to compile and upload ok but I get the following output in the serial monitor.

Testing TinyGPS library v. 12 by Mikal Hart

Sizeof(gpsobject) = 115

Sats HDOP Latitude Longitude Fix Date Time Date Alt Course Speed Card Distance Course Card Chars Sentences Checksum

(deg) (deg) Age Age (m) --- from GPS ---- ---- to London ---- RX RX Fail

**** **** ******* ******* **** ******* ******* **** ******* ****** ***** *** 0 0.00 *** 0 0 0 **** **** ******* ******* **** ******* ******* **** ******* ****** ***** *** 0 0.00 *** 0 0 0 **** **** ******* ******* **** ******* ******* **** ******* ****** ***** *** 0 0.00 *** 0 0 0 **** **** ******* ******* **** ******* ******* **** ******* ****** ***** *** 0 0.00 *** 0 0 0 **** **** ******* ******* **** ******* ******* **** ******* ****** ***** *** 0 0.00 *** 0 0 0 **** **** ******* ******* **** ******* ******* **** ******* ****** ***** *** 0 0.00 *** 0 0 0 **** **** ******* ******* **** ******* ******* **** ******* ****** ***** *** 0 0.00 *** 0 0 0

I assume I should be receiving the data from the gps and seeing numbers where the zero's and asterisks are? I have been able to extract NMEA sentenes with other sketches so I think my connections are ok.

Many thanks for your time.

Hi, been playing all day with a new gps device, i had the same problem at first but was easily sorted. for me i had to ensure the correct pin was selected as the GPSRX.

SoftwareSerial nss(3, 4);

in the above line 3 is the rx pin and 4 is the tx pin

also ensure the correct BAUD rate is selected

nss.begin(4800);

i had to change mine to 38400 but yours may be different.

hope this helps

Many thanks for the suggestions, I will keep playing around with the connections and settings...

Cheers

Hmm, despite much fiddling today still no luck. I notice that only the tx led is flashing on the board and not the rx led, should that be the case?

I notice that only the tx led is flashing on the board and not the rx led, should that be the case?

The TX and RX LEDs are controlled by the USB-to-serial chip, not by the Arduino, and most certainly not by SoftwareSerial. So, yes, this is certainly possible.

Hello, I just wanted to say I have fixed the problem.

After reading the notes on the Software serial library I learned that not all pins on the Mega does not support change interrupts ( I don't know what that means yet, but I will find out) so I changed the R(X) pin to 10 and it worked! :)

After reading the notes on the Software serial library I learned that not all pins on the Mega does not support change interrupts ( I don't know what that means yet, but I will find out) so I changed the R(X) pin to 10 and it worked!

You have 4 hardware serial ports. Pray tell why you also need to use software serial to read a device. Are you really connecting 5 serial devices to the Mega?

Thanks Paul.

No I've only got one serial device (em-406 GPS) hooked up at the moment. I've just been too dumb and lazy to get familiar with using the hardware serial ports. But I will challenge myself to understand how to next...

Cheers.

But I will challenge myself to understand how to next...

There's really nothing to it. The pins on the board are labeled RX1/TX1 for the Serial1 instance, RX2/TX2 for the Serial2 instance, etc.