the old fart
Senior Member
The time on my 'I2C RTC DS1307 AT24C32 Real Time Clock' gains two seconds a day.
To correct this in software I have added this to the program.
'One Shot' perday
adjust gosub
To correct this in software I have added this to the program.
'One Shot' perday
Code:
if hour=8 and mins=8 and b52=0 then let b52=1 gosub correcttime:endif ; clock runs 2second fast per day
if mins =9 then let b52=0:endif
adjust gosub
Code:
correcttime:
hi2csetup i2cmaster, %11010000, i2cslow, i2cbyte ' set DS1307 slave address
hi2cin 0,(seconds,mins,hour) 'Read Time
serout OLED,Baud,(254,128," correcting ")
pause 2000
hi2csetup i2cmaster, %11010000, i2cslow, i2cbyte
hi2cout 0,(seconds,mins,hour)
return