Go Down

Topic: How to set a value for millis()? (Read 20241 times) previous topic - next topic


have you seen this thread?


in one place Member macsimski suggests this declaration

extern volatile unsigned long timer0_overflow_count;

and this code to reset

timer0_overflow_count = 0;

this resets to 0... maybe it can be coaxed to set to a specific value.

Coding Badly

have you seen this thread?

I have.  And there is a nasty subtle bug in what was proposed as a solution.


@ Coding Badly:

may you help me to understand better the issues you mentioned? I tried to run the code for hours, and it continue working.

Sometimes, the comparison returns false and it is probably caused my the "on going" modification of the variable. But, I only realize the mentioned operation just after the "true", that is after the modification if this is the case.


Go Up