He vuelto a empezarde cero y he usado el codigo de ejemplo:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DS1307.h>
DS1307 rtc(4, 5);
LiquidCrystal_I2C lcd(0x27,20,4);
int a;
int prueba;
void setup()
{
//SetUp LCD
lcd.init();
lcd.backlight();
lcd.setCursor(5, 1);
lcd.print("SISTEMA OK");
// Set the clock to run-mode
rtc.halt(false);
// The following lines can be commented out to use the values already stored in the DS1307
rtc.setDOW(SUNDAY); // Set Day-of-Week to SUNDAY
rtc.setTime(12, 0, 0); // Set the time to 12:00:00 (24hr format)
rtc.setDate(3, 10, 2010); // Set the date to October 3th, 2010
// Set SQW/Out rate to 1Hz, and enable SQW
rtc.setSQWRate(SQW_RATE_1);
rtc.enableSQW(true);
}
void loop()
{
lcd.setCursor(6, 3);
lcd.print(rtc.getTimeStr());
delay(1000);
}
El resultado ha sido el siguiente:
Conectando el rtc sin resistencias PU ya que las lleva:
Llevando el lcd y el rtc a las patillas SDA y SCL del Arduino (Va por I2C aunque se vean patillas DB0, DB1,.......):
Y a la corriente de salida del arduino:
Esta muy mal???????
Gracias