New answers tagged

3

The execution time of your loop() will be slightly longer when the CPU runs at 8 MHz v.s. 16 MHz, but I don't expect the difference to be significant. CPU-bound functions, such as digitalWrite(), will run at half the speed. These functions, however, are quite fast. In contrast, analogRead() is slow, as it takes roughly 110 µs to execute, so ...


0

It depends. The loop function is handled like a while loop. This means, when the loop function finishes, some framework code is executed (very small) and the loop function is called again etc. However, there are some calls that do not depend on the clock speed, the best example is the delay function, but also if you made your own check using e.g. millis ...


Top 50 recent answers are included