¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Loop Timer


 


The Arduino millis() millisecond timer runs uninterrupted? and loops around after?
about 50 days.? This can be used to time between events such as loop completion,
or loop being delayed. ?

This may be helpful...or not.

Arv
_._


 

On Fri, Apr 10, 2020 at 03:07 PM, Arv Evans wrote:
runs uninterrupted? and loops around after?
about 50 days
I looked into this corner case way back in another project. In that case, best to my recollection, the overflow was handled automatically by the way twos compliment arithmetic works. But, I don't remember the constraints.?

Tom, wb6b


 

Tom

When I used it (several years ago) I added an RC pullup on one digital I/O pin.
Then set an interrupt to trigger when that pin went high.? The interrupt routine?
compared current millis() with older millis() to determine that the loop was not?
slowing down between checks.? The interrupt routine reset the RC timer once?
millis() had been read.

May be useful, maybe not.? I just mentioned it in case someone was looking?
for a way to verify the code was running at normal speed.

Arv
_._


On Fri, Apr 10, 2020 at 4:22 PM Tom, wb6b <wb6b@...> wrote:
On Fri, Apr 10, 2020 at 03:07 PM, Arv Evans wrote:
runs uninterrupted? and loops around after?
about 50 days
I looked into this corner case way back in another project. In that case, best to my recollection, the overflow was handled automatically by the way twos compliment arithmetic works. But, I don't remember the constraints.?

Tom, wb6b


 

Thank you, Arv, I think we can get around this by just having people reboot the system once a week.