RTC module not going up in 1000ms intervals. How do i fix?

I have problem with my rtc project that I'm doing for school. I'm not sure what is wrong but my rtc gets pushed back gradually and in about 23 hours its back about 7 minutes. I am using this library

and the LiquidCrystal library that comes with the Arduino IDE. attached you will find the code for my project. Any help is appreciated

Final.ino (1.12 KB)

A ds3231 shouldn't drift that much per day. They do have an "aging offset" register that allows you to increase/decrease the oscillator frequency. You should see what it currently is at and increase it (speed of the oscillator). datasheet

Please post a link to the exact RTC module that you are using.

blh64:
A ds3231 shouldn't drift that much per day. They do have an "aging offset" register that allows you to increase/decrease the oscillator frequency. You should see what it currently is at and increase it (speed of the oscillator). datasheet

How do i access this "aging offset" register? I'm very new to this

jremington:
Please post a link to the exact RTC module that you are using.

here sorry i should've done that before

I don't see anything seriously wrong with the code, so I suspect you either have a fake chip or defective module.

JekieBoi:
How do i access this "aging offset" register? I'm very new to this

You look at the datasheet which defines the address of all the internal registers and read the proper one. If you look at the library you are using (inside the .h file) the author may have already written a function to do this. It is really no different than reading other internal registers which happen to hold the date/time.

blh64:
A ds3231 shouldn't drift that much per day. They do have an "aging offset" register that allows you to increase/decrease the oscillator frequency. You should see what it currently is at and increase it (speed of the oscillator). datasheet

Seven minutes error in 23 hours? I have a feeling that this is too big a job for any aging offset register...

jremington:
I don't see anything seriously wrong with the code, so I suspect you either have a fake chip or defective module.

This is probably the correct explanation.

jremington:
I don't see anything seriously wrong with the code, so I suspect you either have a fake chip or defective module.

Thank you so much, i suspected as much and have swapped the module, hopefully it works now

What DS3231 library are you using?
--- bill