Maximum Frequency of a ESP8266 – Revisited

By ctherouxNo Comments

The ESP8266 can yield a 163 kHZ wave using the Arduino IDE and writing the code in C.  The code used is:

int pin = 5;
void setup() {
  pinMode(pin, OUTPUT);
}
void loop() {
  digitalWrite(pin, HIGH);
  digitalWrite(pin, LOW);
}

Nevertheless the wave form is far from being square as show on the picture below.  Click on the picture to enlarge it.

ESP8266 generated wave In C

By adding a 5 uS delay, we get a pretty good square wave.  The frequency is then 85.6 kHZ.  The code used is:

int pin = 5;
void setup() {
  pinMode(pin, OUTPUT);
}
void loop() {
  digitalWrite(pin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pin, LOW);
}

The yielded wave form is given below.  Click on the picture to enlarge it.

ESP8266 generated wave In C with correction

The frequency is 60 times higher than running a similar code on the ESP8266 with NodeMCU.

ESP8266, Internet of Things, IoT

Leave your Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Blue Taste Theme created by Jabox