Pages: 1 [2]   Go Down
Author Topic: How to set a value for millis()?  (Read 4755 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 4
Posts: 65
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 199
Posts: 12768
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
have you seen this thread?
I have.  And there is a nasty subtle bug in what was proposed as a solution.
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 111
... only learning ...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: 1 [2]   Go Up
Jump to: