Unofficial Nextion/TJC User Forum

Real time questions


My project use the built-in RTC Nextion. It works fine. However, I read the DS3231 is more accurate thant the built-in RTC Nextion. So I added a DS3231. It is managed (I2C) by a Picaxe chip. All these works fine.

Now, I adjust the different rct0---- rct5 every minute. I know it is to much often and stupid !

Are rtc0—rtc5 variables or EEprom entries ? I know that an EEPROM mustn’t be written all the time and I am afraid to kill it.

In the doubt, I will modify my programm to set the built-in RTC only once a day…

Is there a cell battery in the Nextion to keep the time/date without power ?

Thanks for your replies…


I did some write cycle endurance testing on the Nextion EEPROM and found no issues with data retention even at 10 million cycles. At one write per minute that’s around 20 years. However, the RTC values on the Nextion aren’t stored in the non-volatile EEPROM. They are instead stored on the RTC chip itself in volatile memory that requires a battery backup for data retention. If the voltage on the coin cell battery drops below 1.0V then the RTC data (stored in 16 registers) is potentially corrupted.

The type of memory the RTC uses isn’t subject to the write/erase cycle limitations found in EEPROMs. The seconds register changes every second, for example. The RTC chip also uses bit 7 in the seconds register as a low voltage flag intended to indicate if the RTC time is out of calibration. I haven’t test reading this flag out via the Nextoin rtc0…rtc5 system variables but it wouldn’t be hard to check - set the RTC, repeatedly remove power/battery backup and checking for rtc5 values over 127…

You might also consider checking if rtc6 can be used to confirm valid RTC values. Per Nextion, “rtc6 is readonly and calculated by RTC when date is valid.

Link to the RTC chip datasheet - AT8563

1 Like

Many thanks ratnin for all your precisions. It’s a good news However, I edited my application to avoid useless rtc settings.

I am afraid I will be dead before my EEprom Nextion and that isn’t a good news !!!


This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).