You have a scope. I envy you $)
It sure helps .. ![]()
JBMetal:
I found another 8KHz by adding a while (1) loop inside the void Loop.
Get out of my head! ![]()
That was coming up on my todo list. I was interested to see what, when, and why loop() was being called because I was curious about repetitive loop invocation overhead and what happens in between. That link nicely addressed that. Thank you!
Its seems pretty clear, function call overhead can be considered fairly expensive.
This is the content of main.cpp
There's nothing special after every iteration of loop().
#include <WProgram.h>
int main(void)
{
init();
setup();
for (;;)
loop();
return 0;
}
And this is blink after arduino process before compile. There's nothing special after all your code in the loop either:
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
#include "WProgram.h"
void setup();
void loop();
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(1000); // wait for a second
}