Maximum Frequency of a ESP8266 – Revisited
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.
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.
The frequency is 60 times higher than running a similar code on the ESP8266 with NodeMCU.