OK, silly question but have you tried another DS1307 RTC chip ? While rare, maybe part of that one is damaged? I've used that RTC for years and never had a problem. There's a 'driver' for it in the CCS package or in the 'code library' here. The 4K7 pullups are should be fine for 5 volts but I use 3k3.
Also there might be a 'bug' in the driver you're using, perhaps a mislabeled variable or the correct one misused ?
Another way to attack it is to use a spare I/O pin as a serial output and send the data to a PC running a terminal program. You'll need a max232 type chip on the O/P to the PC but it should be easy enough to hack in for test purposes. I always dedicate one pin to be for 'test' LED / 'serial output'.
Without the real hardware and code it is difficult to troubleshoot 'over the internet.
Jay
AnthonyRFC
Joined: 21 Jun 2015 Posts: 16 Location: Venezuela
Posted: Sun Mar 13, 2016 7:31 am
Hi all:
I could finally fix the problem using:
Code:
#define USE_INTERRUPTS 1
That line tells to the library to disable all interrupts during the reading process of the DS1307.
I hope this can help others with the same problem.
Best regards,
Anthony _________________ From CumanĂ¡, Venezuela.
All times are GMT - 6 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum