How can the Aging Value be changed in a DS2321?


First, I am a hobbyist with the lack of a serious programming background. This is my first post. None the less, I have had a ball working with the Arduinos. I have had great success building projects using a LAN connection to do remote switching with a telnet terminal connection. I also built an Arduino for a country fire department to trip their siren at noon as well as cycle it 8 times for fire calls. It uses the RTC DS2321. It has been in service for nearly 4 years.

The forum has been a great resource. A special tip of the hat to those who don't respond with lines of code but respond with things like (my favorite response) "All you have to remember is..." and we are left to figure it out from there. Thank you!

On to my question and back to that fire siren:

I built 2 of the control units. One to install and the second to troubleshoot if need be. The second, which has been running as long as the installed one, keeps very good time. It only loses a few seconds in 6 months or so. The installed one loses a few seconds a month.

I have since bought 5 more that all lose many seconds an hour!

I have seen hints that there may be a way to adjust the DS2321's "Aging Value" which may correct this. I have read the spec sheet. I see where there are 2 bytes (11h and 12h) that hold this aging value. I have been unable to find anything on line explains how these bytes can be read or written to.

I have also struggled my way through a couple of libraries to see if there was any thing there. But, alas...beyond my skill set.

So, the question is, can the aging value of a DS2321 be read and/or adjusted by a mere mortal? And, of course, if so, how?

I look forward to your replies.

I have since bought 5 more that all lose many seconds an hour

You have almost certainly purchased modules with counterfeit or reject DS3231 chips. This is quite common, especially on eBay, indeed counterfeits of most popular chips can be found.

Send them back to the seller, with a complaint. It would help if you could post clear, focused close ups of the chip markings, so that people can check against known counterfeits.

There is nothing you can do with the "aging" register if it loses time at that rate, but if you want to try, the DS3231 data sheet clearly describes how and what to write to the aging register (0x10).

I have been unable to find anything on line explains how these bytes can be read or written to.

You write to the one byte aging register in exactly the same way that you write to any other register in the DS3231. As the data sheet shows, you can change the internal oscillator by about +/-6 ppm at 20 C, which adjusts the clock by about +/- 3 minutes PER YEAR.

That clock is highly accurate out of the box , as said suspect you have out of spec devices .
Note it may become inaccurate at temperature extremes

Check the DS3231 chip and see if you instead have the DS3231M, that version of the chip is a bit less accurate.

Wire.beginTransmission(0x68); //I2C address of Ds3231
Wire.write(0x10);  //internal address of ageing offset register is being pointed
Wire.requestFrom(0x68, 1);   //read data from ageing offset regiater
byte x =;  //x holds the current value of the ageing offset register