Answer the question
In order to leave comments, you need to log in
Which option “wears out” the microcontroller less?
Let's say there is some variable that is incremented under certain conditions, and the rest of the time it is reset to 0.
You can write it like this:
if(num != 0)
num = 0;
num = 0;
Answer the question
In order to leave comments, you need to log in
If your variable is in the RAM of the microcontroller, and not in non-volatile memory, then no one considers "wear and tear". There is a limit on writing to non-volatile memory. Typically 10,000 cell overwrites are guaranteed. And the amount of rewriting in RAM. Well, if you find such figures - show, it will be interesting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question