ok your totally right my bad,
I have gotten the right library now but what is hapening is the time just jumps around and the date is not what the code sais.
what am i doing wrong?
here is my code
#include <LiquidCrystal.h>
#include <DS1302.h>
#include <Wire.h>
// Init the DS1302
DS1302 rtc(2, 3, 4);
// Init the LCD
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup()
{
// Set the clock to run-mode, and disable the write protection
rtc.halt(false);
rtc.writeProtect(false);
// Setup LCD to 16x2 characters
lcd.begin(16, 2);
//The following lines can be commented out to use the values already stored in the DS1302
rtc.setDOW(FRIDAY); // Set Day-of-Week to FRIDAY
rtc.setTime(12, 0, 0); // Set the time to 12:00:00 (24hr format)
rtc.setDate(6, 8, 2010); // Set the date to August 6th, 2010
}
void loop()
{
// Display time centered on the upper line
lcd.setCursor(4, 0);
lcd.print(rtc.getTimeStr());
// Display abbreviated Day-of-Week in the lower left corner
lcd.setCursor(0, 1);
lcd.print(rtc.getDOWStr(FORMAT_SHORT));
// Display date in the lower right corner
lcd.setCursor(6, 1);
lcd.print(rtc.getDateStr());
// Wait one second before repeating
delay (1000);
}