-->
Page 1 of 2

Which ESP model does provide 160MHz?

PostPosted: Wed Jun 17, 2015 7:09 am
by HermannSW
Arduino ESP IDE allows to select:
Image


Hermann.

Re: Which ESP model does provide 160MHz?

PostPosted: Wed Jun 17, 2015 7:35 am
by Ribeiro Santos
All (I guess)! :D

Re: Which ESP model does provide 160MHz?

PostPosted: Wed Jun 17, 2015 11:04 am
by torntrousers
I gave it a quick try with an ESP-12. Seems to work.
With this simple sketch that times one hundred thousand iterations of a loop:
Code: Select allint counter = 0;
long startmillis;
void setup() {
   Serial.begin(115200);
   startmillis = millis();
}
void loop() {
  if ((counter++ % 100000) == 0) {
     Serial.print("Time for 100000 iterations: ");
     Serial.println(millis()-startmillis);
     startmillis = millis();
  }
}

Running at 80 Mhz that gives about 650, at 160Mhz 355. That number appears to slowly increase over time, not sure why that is or if it would stabilize somewhere if left running for a while. For comparison, i also tried that sketch on an Arduino Uno which gives 2735, so much slower.

Re: Which ESP model does provide 160MHz?

PostPosted: Wed Jun 17, 2015 12:05 pm
by picstart
[code] int counter = 0;
long startmillis;
void setup() {
Serial.begin(115200);
startmillis = millis();
}
void loop() {
if ((counter++ % 100000) == 0) {
Serial.print("Time for 100000 iterations: ");
Serial.println(millis()-startmillis);
startmillis = millis();
}
}
[/code]

if the counter was reset to zero within the loop and the modulo replaced with a relational operator greater than maybe it would help.
Modulo base base ten of 100,000 is not the most economical calculation for a MCU to perform.