Me auriga cycle time



Is it possible to adjust the cycle time when using a loop? In default of how much is it? I would it as small as possible.




add a wait


I would like to have the little cycle time possible. Do you know every how much time is it? 0.1s?


It always depend upon how much code is in each loop to how long the loop will take


Depends also on whether you’re running the code live or upload. Live has a significant overhead in processing each piece of code. Upload will always be significantly faster.

As OotB says, depends on what your code is doing. If all you’re doing is toggling a pin and you’re in upload mode (for example), you could be doing over a million loops per second. (The onboard processor clock speed is 16MHz)

I wrote a simple piece of code to go round a loop for 1 second and count the itterations, I got 182000-183000 loops per second. It was checking the time, incrementing a loop counter and comparing the time difference until it got to 1000 milliseconds. So in my case, my loop takes 0.000005s :slight_smile:

On the other hand, if you’re using LIVE mode, then you might be lucky to get 30 loops per second.

It all depends on what your loop is intended to do, and how many clock cycles that processing takes