NEO-6m GPS with Mega 2560

Hi, I have moved my (working) Neo-6m GPS from a Uno (pins 2,3) to a Mega 2560 that has a 3.5" TFT touchscreen shield, therefore, I only have pins 22-53 accessible. I set my TX/RX pins as such...

static const int RXPin = 46, TXPin = 45;
static const uint32_t GPSBaud = 9600;

...but I get "No GPS Data Received - Check wiring"

Is there an incompatibility issue I am unaware of?

The TFT shield uses Serial1, 2 & 3? What exact shield is it?

Are you using a software serial library on those pins?

Please post the whole code.

bumpydog:
Is there an incompatibility issue I am unaware of?

The convention, and one which saves forum members time, is that if you want help with code, you post it.

So this is a pure guess, as we dont know the code you are using, but maybe you are using Software Serial for the GPS, in which case if you study the Software Serial reference, you will see that it wont work on those pins on a Mega.

Apologies for not showing the whole code. Yes, the GPS uses software serial and, as you state, those pins do not support change interrupts, only pins 50-53 (on that header). I changed to 52/53 and all works fine, thanks.

In a similar vein, can I use any of that bank of pins as SDA/SCL for an I2C device instead of 20/21? (BME280)

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.