What’s the functional difference between putting the display to sleep and setting the display backlight to 0? I am using some code in the screen to collect data from the serial port, and the data collection stops when I put the display to sleep. I would prefer to just set the backlight to 0 and then allow the data to be collected. Then when a screen is touched, the backlight gets set back to 100.
Any thoughts on this? Will I hurt the display by keeping it running continuously?
I guess when putting it to sleep the processor actually enters some kind of sleep mode. Also, I think timers don’t run in sleep mode. I guess you could verify this by measuring the current consumption. On the other hand, reducing the brightness to 0 certainly does reduce the current consumption but the UI would remain fully functional, meaning it would still run timers and react to all user inputs.
Still working on my DIY project (6 channels Heathing Weekly switch), it’s near to be completed.
I did the same question than you : I want to switch off my Nextion display when it runs itself. 250 mA > 170 mA under 5V
First, I try to use the cls instruction. Unfortunately, cls switches the main screen off, However, the other objects (text, buttons, …) are still visible ! Not interesting !
Then, I try to set the dims to 0, and set it to 25 when I wanted the display. It works fine.
In fact, Dim is setting in the EEPROM memory (I think) because, the setting operates even after powering off/on thge module.
I know we can’t write more than 10 000 times in a EEPROM because it can kill the EEPROM.
In my project, I want to light the display ON for each commutation (On or Off) of my project.
Let’s suppose 6 commutations per day for each of the 6 channels. 36 switchings per day, It gives 13140 switchings per year. My Nextion will kill before it’s first year !!!
It’s each address in EEPROM that has a limit, not the entire EEPROM, so each address will last 2,845 days, then you can just switch to different addresses. You have 1032 to play with.
It’s each address in EEPROM that has a limit, not the entire EEPROM, so each address will last 2,845 days, then you can just switch to different addresses. You have 1032 to play with.
Unfortunately that’s unlikely. 10k writes indicates that the “EEPROM” is only standard flash. It’s common for microcontrollers to emulate “EEPROM” via flash because it’s much, much cheaper. Usually the only difference is that anything called “EEPROM” is easier to access during operation. Some microcontrollers have multiple flash sectors tied together to distribute the wear and thus increase lifetime).
Anyways, the important point is, you can only erase groups of 64 bytes (or 128 or something else; depends on the specific chip) - these groups are called pages. So every write to a page requires the entire page to be erased and rewritten. Btw. this is why you have “EEPROM” emulation. The emulation hides the erase/rewrite stuff since it’s not only complicated but often timing sensitive, too.
Long story short, without further details on how Nextion exactly implemented the “EEPROM” you can’t make the assumption you made.
Then, I try to set the dims to 0, and set it to 25 when I wanted the display. It works fine.
In fact, Dim is setting in the EEPROM memory (I think) because, the setting operates even after powering off/on thge module.
dims is the variable that updates the EEPROM, dim only changes the runtime behavior. I’d think of dims as a function that updates dim and then writes the new value to the EEPROM.
While Nextion gives some sort of lifetime for its EEPROM, it doesn’t give any info about the dims, bauds variables, how they work exactly and what wear is to be expected. F.ex. it’s unclear whether they write to EEPROM/flash when the new value matches the current one.
Having a doubt with my Nextion’life, I will be more moderate. Instead of my first try, I won’t display on for each switching. I will only set the display on when I will touch the screen and the timer will display off 30 seconds after every manual action. It’s a little pity but the Nextion informations are very very poor in comparison with the Picaxe documentation…
I used a DS3231 for the clock because, with the Nextion RTC clock, I didn’t want to loose the time, after every main power fail.
However, I am very proud of my project. It’s work like I want… and it’s the main goal of a DIY project … The 5" display is wonderful.
Sorry to interrupt, but I want to know if the nextion screen can do “standby”? It goes black when not in use and wakes up when in use by tapping on the screen.
Have you even read the first posts of this thread (and followed the suggestions)? Because that’s the exact question that’s been asked here in the beginning. As far as I’m concerned I got no new knowledge since my first reply here.
The interesting thing is that it has a 24C08 chip. This is actually a „true“ EEPROM with 1024 bytes capacity. That means that @elf was right indeed; each byte should wear individually thus nothing of what I said seems to apply. Seems to? Yes, something is still fishy. The 24C08 is specified to have an endurance of 1 million writes (Atmel datasheet; STMs version even specs 4 million). Now your guess is as good as mine why Nextion says it‘s only good for 10k writes… cheap knockoff? I don‘t believe they understated the performance of their device by a factor of 100.
Again, the Nextion guys seem to read here and to react by publishing their answers in form of a blog article…
1 Like
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).