Problema al grabar datos en eeprom

Hola y gracias por vuestro tiempo.

Estoy intentando grabar cada minuto la temperatura de un sensor DHT11 en una eeprom de 512kb cada minuto, y un rtc Pcf8563.
El problema es que siempre me graba la hora y los minutos como 0. La temperatura y la humedad las graba bien.
La primera vez que lo cargo pongo en hora y fecha actual el reloj y luego comento las lineas.

El sketch es un refrito de varios, grabo los datos el void escribir_eeprom() y leo con void leer_eeprom().
Alguna idea de porque no graba ?

#include "Wire.h" // for I2C
#define chip1 0x50 // direccion de la eeprom
#include <Rtc_Pcf8563.h>

//init the real time clock
Rtc_Pcf8563 rtc;
Pcf8563

#include "DHT.h" //Añadimos la libreria con la cual trabaja nuestro sensor

#define DHTPIN 2 // Indicamos el pin digital donde conectaremos la patilla data de nuestro sensor
#define DHTTYPE DHT11 // DHT 11
DHT dht(DHTPIN, DHTTYPE);

byte hora=0;
int minutos=0;
int dia=0;
int mes=0;
int anio=0;

unsigned int direccion=0;
int h=0;
int t=0;

void setup()
{
Serial.begin(9600); // for screen output
Wire.begin(); // inicia, I2C!
// rtc.initClock();
//set a time to start with.
//day, weekday, month, century, year
// rtc.setDate(21, 3, 3, 0, 14);
// //hr, min, sec
//rtc.setTime(22, 30, 00);

}

void writeData(int device, unsigned int add, byte data)
// writes a byte of data 'data' to the chip at I2C address 'device', in memory location 'add'
{
Wire.beginTransmission(device);
Wire.write((int)(add >> 8)); // left-part of pointer address
Wire.write((int)(add & 0xFF)); // and the right
Wire.write(data);
Wire.endTransmission();
delay(10);
}

byte readData(int device, unsigned int add)
// reads a byte of data from memory location 'add' in chip at I2C address 'device'
{
byte result; // returned value
Wire.beginTransmission(device); // these three lines set the pointer position in the EEPROM
Wire.write((int)(add >> 8)); // left-part of pointer address
Wire.write((int)(add & 0xFF)); // and the right
Wire.endTransmission();
Wire.requestFrom(device,1); // now get the byte of data...
result = Wire.read();
return result; // and return it as a result of the function readData
}

void loop()
{

escribir_eeprom();
//leer_eeprom();

}

void escribir_eeprom(){

writeData(chip1,direccion,rtc.getHour());
direccion++;
writeData(chip1,direccion,rtc.getMinute());
direccion++;
writeData(chip1,direccion,dht.readHumidity());
direccion++;
writeData(chip1,direccion,dht.readTemperature());
direccion++;
delay(60000);
}

void leer_eeprom(){
hora=readData(chip1,direccion);
if (hora<10) {
Serial.print("0");
}
Serial.print(hora, DEC);
Serial.print(":");
direccion++;
minutos=readData(chip1,direccion);
if (minutos<10) {
Serial.print("0");
}
Serial.print(minutos, DEC);
direccion++;
Serial.print(" ");
h=readData(chip1,direccion);
Serial.print("Humedad relativa: ");
Serial.print(h, DEC);
Serial.print(" %\t");
direccion++;
t=readData(chip1,direccion);
Serial.print("Temperatura: ");
Serial.print(t, DEC);
Serial.println(" *C");
direccion++;

}

Hola de nuevo
Siguo haciendo pruebas.Si añado al codigo salida serie funciona sin problemas, pero solo si esta el monitor serial del ide de aurduino v1.05 en marcha. Si lo cierro el reloj se para.

Es raro. Yo quiero que funcione autonomo, sin necesidad de estar conectado al pc.
Alguna idea?

void escribir_eeprom(){

Serial.print(rtc.formatTime());
Serial.print(" ");
Serial.println(rtc.formatDate(RTCC_DATE_WORLD));
minutos=rtc.getMinute();// this will print the minute alone
minuto_anterior=minutos;
while(minuto_anterior==minutos){
Serial.print(rtc.formatTime());
hora=rtc.getHour(); // this will print the hour alone
Serial.print(":");
minutos=rtc.getMinute();// this will print the minute alone
Serial.print(" ");
dia=rtc.getDay();// this will print the day alone and so on...

h = dht.readHumidity(); //Guarda la lectura de la humedad en la variable float h
t = dht.readTemperature(); //Guarda la lectura de la temperatura en la variable float t
Serial.print("Humedad relativa: ");
Serial.print(h);
Serial.print(" %\t");
Serial.print("Temperatura: ");
Serial.print(t);
Serial.print(" *C");
Serial.println(" estoy dentro");

}

writeData(chip1,direccion,hora);

direccion++;
writeData(chip1,direccion,minutos);

direccion++;
writeData(chip1,direccion,h);

direccion++;
writeData(chip1,direccion,t);

direccion++;

}