Go Down

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

mk3

have you seen this thread?

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1167861718

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

Quote
have you seen this thread?

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

ionito

@ 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.

Thanks

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy