I2C works on Uno, Crashes on Mega. Is my Mega faulty?

Ive been playing with an Arduino Uno for over a month now, and the project Im working on has got quite complex and required something with more flash storage and I/O pins.
I am struggling to get my I2C RTC (Real time clock) working correctly on the Mega, using the standard examples and libraries that work fine when its plugged into the Uno.
What am I missing? I've tried plugging the RTC into both A4 and A5, and the dedicated SDA and SCL pins on the Mega, and it will not work, the sketch seems to hang at setSyncProvider(RTC.get);
Its not an issue with the RTC, as soon as its plugged into the Uno the sketch runs as expected.
Im using the standard example but here it is on pastebin should you want to take a look - http://pastebin.com/j45rVW8h
Any help much appreciated, thanks!

The I2C pins on the Mega are not A4 and A5 but D20 and D21, they are even labeled SDA and SCL on the Mega2560. Are you using a Mega2560?

The dedicated pins are labeled only on the backside. Did you connect the wires correctly? Have you tried the same pins on the UNO? What pull-ups do you use?

Thanks for the reply. I am using D20 and D21 on a Mega2560. All wiring is correct, Ive tried 10K and 2.2K pull up resistors. The wire length totals about 10cm.

Works perfectly fine on Uno.

Cheers

Try to check if pins 20 and 21 are hardware sides OK. Connect a resistor and an LED to those pins and set the pin HIGH and LOW to see if they work.

Thanks, I should of thought of this before. I have used pins 20 and 21 as both inputs and outputs, it looks like there is a short somewhere. I'll inspect the board and see if I can spot it.

Thanks again for your input!

how many devices you have connected I2C devices if they are different and have different voltages such as 3.3V and 5V then you must use a converter logic level as this may contaminate the data, see cone in the diagram I am attaching ... let me know ... however you have the correct PIN 20 and 21 ...

MeteoFabro1_ETH_LCD1.8.fzz (110 KB)

got ... are you sure that RTC has already in its PCB resistors PULL UP? ... controls ...

Fritzing Project Weather Station Fabro1.pdf (775 KB)