Weird LCD issue

Hello,
I'm encountering a very weird problem.
I made my own weather station using an arduino Mega 2560.
As sensor it use a DHT22, GY-651, Tiny RTC, and a 16x2 LCD Display.
The LCD Display is used by the RTC to show each second the current uptime of the installation.
My code and wiring work fine on my Mega 2560.
Now, when i switch to an Arduino UNO R3, (i just have to change the SDA,SCL wires of pin numbers, the rest use standard 7,8,9 etc...)
My LCD display work at the beginning (when i initialize it, i can print a text without problem it's displayed)
But when the rest of the code is started, the RTC who try to print a text each second on the LCD display nothing .
The wiring seem correct because if i replace lcd.print by Serial.print the RTC infos are correctly displayed into the monitor.
I tried to initialise it again just before my RTC display procedure with this code

lcd.begin(16, 2);
lcd.setCursor(0, 0);

But still no text, and i can't even clear the old text printed at the very beginning on the LCD !
Now, when i switch it back on my Arduino Mega the LCD is working fine again...
Any idea on what can cause this problem ? as the code and my wires seem correct that sound total sorcery to me.

I read you think your code is OK, but without it, an answer is almost impossible.
So post your code to get any chance on a to the point answer.
There's more differences between an Uno an a 2560 beside the pinout, it's likely that's where the problem is.

alright here is my code:

/*
  Mega2560 + HanRun HR911105A 11/46 + DHT22 + GY-65 + HD44780 + Photoresistor
 
 HR911105A:
 * Ethernet shield attached to pins 10, 11, 12, 13 - HanRun HR911105A
 
 DHT22:
 * Connect pin 1 (on the left) of the sensor to +5V
 * Connect pin 2 of the sensor to whatever your DHTPIN is
 * Connect pin 4 (on the right) of the sensor to GROUND
 * Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor
 
 GY-65:
 * Connect VCC of the sensor to 3.3V (NOT 5.0V!)
 * Connect SCL to i2c clock - on '168/'328 Arduino Uno/Duemilanove/etc thats Analog 5 - Arduino Mega pin 21
 * Connect SDA to i2c data - on '168/'328 Arduino Uno/Duemilanove/etc thats Analog 4 - Arduino Mega pin 20

 HD44780:
 * 1: GND 
 * 2: VCC
 * 3: To 10k ohm potentiometer
 * 4: Connect to pin 7
 * 5: GND
 * 6: Connect to pin 8
 * 11: Connect to pin 9
 * 12: Connect to pin 10
 * 13: Connect to pin 11
 * 14: Connect to pin 12
 * 15: VCC
 * 16: GND
 
 Photoresistor
 * Connect to pin A0
 */

#include <SPI.h>
#include <Ethernet.h>
#include "DHT.h"
#include <floatToString.h> // Deprecated
#include <Wire.h>
#include <Adafruit_BMP085.h>
#include <elapsedMillis.h>
#include <LiquidCrystal.h>
#define DS1307_I2C_ADDRESS 0x68  // the I2C address of Tiny RTC
#define DHTPIN 2
#define DHTTYPE DHT22   // DHT 22  (AM2302)
char buffer[25]; // sorcery trick to concat the floats to string
elapsedMillis timer0;
#define interval 3600000
elapsedMillis timer1;
#define interval2 1000
Adafruit_BMP085 bmp;
DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); //On définie les Pins pour l'écran LCD
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
// Convert normal decimal numbers to binary coded decimal
byte decToBcd(byte val)
{
 return ( (val/10*16) + (val%10) );
}
// Convert binary coded decimal to normal decimal numbers
byte bcdToDec(byte val)
{
 return ( (val/16*10) + (val%16) );
}

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
//IPAddress server(74,125,232,128);  // numeric IP for the server (no DNS)
char server[] = "requesttests.appspot.com";    // name address for the server (using DNS)

// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192,168,0,177);

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;

const int luminosityPin = A0;
int luminosityValue = 0;
int luminosityFinal = 0;
int cycle = 0;
// Function to set the currnt time, change the second&minute&hour to the right time
void setDateDs1307()                
{
  second =0; 
  minute = 0;
  hour  = 0;
  dayOfWeek = 0;
  dayOfMonth =0;
  month =0;
  year= 0;
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.write(decToBcd(0));
  Wire.write(decToBcd(second));    // 0 to bit 7 starts the clock
  Wire.write(decToBcd(minute));
  Wire.write(decToBcd(hour));      // If you want 12 hour am/pm you need to set
                                  // bit 6 (also need to change readDateDs1307)
  Wire.write(decToBcd(dayOfWeek));
  Wire.write(decToBcd(dayOfMonth));
  Wire.write(decToBcd(month));
  Wire.write(decToBcd(year));
  Wire.endTransmission();
}
// Function to gets the date and time from the ds1307 and prints result
void getDateDs1307()
{
 // Reset the register pointer
 Wire.beginTransmission(DS1307_I2C_ADDRESS);
 Wire.write(decToBcd(0));
 Wire.endTransmission();
 Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
 second     = bcdToDec(Wire.read() & 0x7f);
 minute     = bcdToDec(Wire.read());
 hour       = bcdToDec(Wire.read() & 0x3f);  // Need to change this if 12 hour am/pm
 dayOfWeek  = bcdToDec(Wire.read());
 dayOfMonth = bcdToDec(Wire.read());
 month      = bcdToDec(Wire.read());
 year       = bcdToDec(Wire.read()); 
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print(hour, DEC);
 lcd.print(":");
 lcd.print(minute, DEC);
 lcd.print(":");
 lcd.print(second, DEC);
 lcd.print(" ");
 lcd.print(month, DEC);
 lcd.print("/");
 lcd.print(dayOfMonth, DEC);
 lcd.print("/");
 lcd.print(year,DEC);
 lcd.setCursor(0, 1);
 lcd.print("Cycle: ");
 lcd.print(cycle);
 //Serial.print("Day of week:");
}

void setup() {
  Wire.begin();
  lcd.begin(16, 2);
  lcd.setCursor(0, 0);
  lcd.print("XyliboxLabs !");
  timer0 = 0; // clear the timer at the end of startup
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
  setDateDs1307(); //Set current time;
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  if (!bmp.begin()) {
        Serial.println("Could not find a valid BMP085 sensor, check wiring!");
	while (1) {}
  }
  SendShit();
}

void loop()
{
  // if there are incoming bytes available
  // from the server, read them and print them:
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
  }

  // if the server's disconnected, stop the client:
  if (!client.connected()) {
    //Serial.println();
    //Serial.println("disconnecting.");
    client.stop();

  if (timer0 > interval) { // http://www.forward.com.au/pfod/ArduinoProgramming/TimingDelaysInArduino.html
    timer0 -= interval; //reset the timer
    SendShit();
  }
  }
  
  if (timer1 > interval2) {
    timer1 -= interval2; //reset the timer
    getDateDs1307();//get the time data from tiny RTC
  }
}

void SendShit()
{
  dht.begin();
  cycle = cycle + 1;
luminosityValue = analogRead(luminosityPin); // Read the value of the photoresistor
luminosityFinal = luminosityValue/10;

  float h = dht.readHumidity();
  float t = dht.readTemperature();
  float Pa = bmp.readAltitude(101500);
  float a = bmp.readPressure();
  // check if returns are valid, if they are NaN (not a number) then something went wrong!
    if (isnan(t) || isnan(h)) {
    Serial.println("Failed to read from DHT");
  } else {
    Serial.println("[========= iNFOS ==========]");
    Serial.print("Humidity: ");
    Serial.print(h);
    Serial.print(" %\t");
    Serial.print("Temperature: ");
    Serial.print(t);
    Serial.println(" *C");
    // GY-65
    Serial.print("Pressure: ");
    Serial.print(Pa);
    Serial.print(" Pa  \t");
  // you can get a more precise measurement of altitude
  // if you know the current sea level pressure which will
  // vary with weather and such. If it is 1015 millibars
  // that is equal to 101500 Pascals.
    Serial.print("Altitude: ");
    Serial.print(a);
    Serial.println(" M");
    Serial.print("Luminosity: "); 
    Serial.print(luminosityFinal); 
    Serial.print(" \t");
    Serial.print("Cycle: ");
    Serial.println(cycle);  
  }
  // start the Ethernet connection:
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    // try to congifure using IP address instead of DHCP:
    Ethernet.begin(mac, ip);
  }
  // give the Ethernet shield a second to initialize:
  delay(1000);
  Serial.println("[======== ETHERNET ========]");
  Serial.println("connecting...");

  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    Serial.println("connected");
    // Make a HTTP request:
  
    String stringOne = floatToString(buffer, h , 2); // Warning, shit is deprecated ! http://playground.arduino.cc/Main/FloatToString but that the only easy solution i've found, dtostrf(); is pain !
    String stringTwo = floatToString(buffer, t , 2);
    String stringThree = floatToString(buffer, Pa , 1);
    String stringFour = floatToString(buffer, a , 2);
    String stringFive = "GET /GetTester?getString=lolz&humidity=" + stringOne + "&temperature=" + stringTwo + "&pressure=" + stringThree + "&attitude=" + stringFour + "&lumi=" + luminosityFinal + "&cycle=" + cycle + " HTTP/1.1";
    Serial.println(stringFive);
    client.println(stringFive);
    client.println("Host: requesttests.appspot.com");
    client.println("Connection: close");
    client.println();
  }
  else {
    // if you didn't get a connection to the server:
    Serial.println("connection failed");
  }
}

(a bit ugly i agree)

I thought that that LCD pin configuration is too good to be true but, if you are getting anything at all, I guess it has to be kosher.

The code you are using is very much the same as I use for all my clocks. That below sends time to serial as well as LCD and might have what you want.

//Arduino 1.0+ Only
//Arduino 1.0+ Only

#include <LiquidCrystal.h>
#include "Wire.h"
#define DS1307_ADDRESS 0x68

LiquidCrystal lcd(8,9,16,5,6,7);

void setup(){
  Wire.begin();
  Serial.begin(9600);
      lcd.begin(16, 2);
      lcd.clear();
  // Print a message to the LCD.
  lcd.print("It is");
}

void loop(){
  printDate();
  delay(1000);

}

byte bcdToDec(byte val)  {
// Convert binary coded decimal to normal decimal numbers
  return ( (val/16*10) + (val%16) );
}

void printDate(){

  // Reset the register pointer
  Wire.beginTransmission(DS1307_ADDRESS);

  byte zero = 0x00;
  Wire.write(zero);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_ADDRESS, 7);

  int second = bcdToDec(Wire.read());
  int minute = bcdToDec(Wire.read());
  int hour = bcdToDec(Wire.read() & 0b111111); //24 hour time
  int weekDay = bcdToDec(Wire.read()); //0-6 -> sunday - Saturday
  int monthDay = bcdToDec(Wire.read());
  int month = bcdToDec(Wire.read());
  int year = bcdToDec(Wire.read());


 lcd.setCursor(2, 1);
    switch (weekDay)                      // Friendly printout the weekday
  {
    case 1:
      lcd.print("MON  ");
      Serial.print("MON  ");
      break;
    case 2:
      lcd.print("TUE  ");
      Serial.print("TUE  ");
      break;
    case 3:
      lcd.print("WED  ");
      Serial.print("WED  ");
      break;
    case 4:
      lcd.print("THU  ");
      Serial.print("THU  ");
      break;
    case 5:
      lcd.print("FRI  ");
      Serial.print("FRI  ");
      break;
    case 6:
      lcd.print("SAT  ");
      Serial.print("SAT  ");
      break;
    case 7:
      lcd.print("SUN  ");
       Serial.print("SUN  ");
      break;
  }

  Serial.print(monthDay);
  Serial.print("/");
  Serial.print(month);
  Serial.print("/");
  Serial.print(year);
  Serial.print(" ");
  Serial.print(hour);
  Serial.print(":");
  Serial.print(minute);
  Serial.print(":");
  Serial.println(second);
 
   lcd.setCursor(8,1);
  
  lcd.print(monthDay);
  lcd.print("/");
  lcd.print(month);
  lcd.print("/");
  lcd.print(year);

  lcd.setCursor(8,0);
  lcd.print(hour);
  lcd.print(":");
  lcd.print(minute);
  lcd.print(":");
  lcd.print(second);
  lcd.println("   ");
  
}