Closed rtek1000 closed 7 months ago
Greetings,
I am unclear on what is meant by instabilities and the time changing by itself (since that is what it does.) Would you please elaborate and be more specific.
I am not aware that setting the alarm registers would have any effect on the time registers.
The setSyncProvider() function does not use interrupts. However, please see the comments in these two example sketches.
Earlier versions of the library instantiated an "RTC" object for the user. This caused a name conflict for some architectures. More details here.
I am unclear on what is meant by instabilities and the time changing by itself (since that is what it does.) Would you please elaborate and be more specific.
I noticed a time reduction of a few minutes, for example, it was supposed to go from 11:59 to 12:00, but it showed 11:55
I am not aware that setting the alarm registers would have any effect on the time registers.
The setSyncProvider() function does not use interrupts. However, please see the comments in these two example sketches.
I now used the 400kHz clock, I will do more tests
myRTC.begin();
Wire.setClock(I2C_clockFrequency);
setSyncProvider(myRTC.get); // the function to get the time from the RTC
Earlier versions of the library instantiated an "RTC" object for the user. This caused a name conflict for some architectures. More details here.
I understand, about the initialization, thanks for the explanation.
I have not had reports of a similar issue. I would first suspect something other than the library, possibly a hardware issue. Good luck, and I would be interested to hear if you find the problem.
Regarding using the alarm registers for general purpose storage, the datasheet notes that not all values are valid:
The alarms can also be programmed to repeat every second, minute, hour, day, or date. Table 2 shows the possible settings. Configurations not listed in the table will result in illogical operation.
I would assume this means illogical operation of the alarm functionality and not of the time registers, but that would need to be verified.
I really do not know. I left the part that uses addresses 7-9 commented out, to test, then I will use these addresses again and see if any problems occur.
The address map shows some bits with a value of 0, but for addresses 7 to 9 there is no such indication:
And also the data I was storing is within the range of: 0 to 59 for address 07h 1 to 12 for the address 08h 0 or 1 for address 09h
In other words, bits A1M1, A1M2 and A1M3 are not being used.
That should be good, then!
Hello,
Years ago I had found the DS3232RTC Library v1.0, and used the example to create a mechanical clock control program.
But, a few days ago, I was informed that there have been instabilities in the watch controller.
I noticed a few hours ago that the time changed by itself.
I was using memory addresses numbers 7, 8 and 9 of the DS3231, for general use.
Is there any interference between the writing of addresses 7, 8 and 9, with the current RTC time?
Does the synchronization function use some type of interrupt timer?
setSyncProvider(myRTC.get);
I also noticed that the old example is different from the current example, for example the old one does not have these instructions:
Current sketch:
Old sketch:
Old library attached, for reference only. DS3232RTC.zip Time-master.zip