hi dear
i working with ccs c compiler
my problem is rtc does not write set time and date also does not read time and date
it shows only 00:00:00 both date and time how to check my 32.768khz working or not
i checked with CRO the clock is coming from PIC but no data out to sda pin
this is my code
#include<lcd.c>
#include "ds1307.c"
byte sec;
byte min;
byte hrs;
byte day;
byte month;
byte year;
byte dow;
void main()
{
lcd_init();
ds1307_init();
//port_b_pullups(TRUE); // Need to pull up the keypad row pins
lcd_putc("\Welcome\n");
ds1307_set_date_time(31,12,9,2,23,59,55);//day, month,year,dow,hr,min.sec
while(1)
{
delay_ms(1000);
ds1307_get_date(day,month,year,dow);
ds1307_get_time(hrs,min,sec);
lcd_gotoxy(1,1);
printf(lcd_putc,"Time : %02d:%02d:%02d",hrs,min,sec);
lcd_gotoxy(1,2);
printf(lcd_putc,"Date : %02d:%02d:%02d",dow,month,year);
}
}