ESP8266 GPIO Diagram

Mr.aegkaluk sopapun
4 min readAug 22, 2019

--

เป็น diagram ที่ใช้งานบ่อยๆ

GPIOs connected to the Flash Chip

GPIO6 to GPIO11 are usually connected to the flash chip in ESP8266 boards. So, these pins are not recommended to use.

Pins used during Boot

The ESP8266 can be prevented from booting if some pins are pulled LOW or HIGH. The following list shows the state of the following pins on BOOT:

  • GPIO16: pin is high at BOOT
  • GPIO0: boot failure if pulled LOW
  • GPIO2: pin is high on BOOT, boot failure if pulled LOW
  • GPIO15: boot failure if pulled HIGH
  • GPIO3: pin is high at BOOT
  • GPIO1: pin is high at BOOT, boot failure if pulled LOW
  • GPIO10: pin is high at BOOT
  • GPIO9: pin is high at BOOT

Pins HIGH at Boot

There are certain pins that output a 3.3V signal when the ESP8266 boots. This may be problematic if you have relays or other peripherals connected to those GPIOs. The following GPIOs output a HIGH signal on boot:

  • GPIO16
  • GPIO3
  • GPIO1
  • GPIO10
  • GPIO9

Additionally, the other GPIOs, except GPIO5 and GPIO4, can output a low-voltage signal at boot, which can be problematic if these are connected to transistors or relays. You can read this article that investigates the state and behavior of each GPIO on boot.

On-board LED

Most of the ESP8266 development boards have a built-in LED. This LED is usually connected to GPIO2.

RST Pin

When the RST pin is pulled LOW, the ESP8266 resets. This is the same as pressing the on-board RESET button

GPIO0

When GPIO0 is pulled LOW, it sets the ESP8266 into bootloader mode. This is the same as pressing the on-board FLASH/BOOT button.

GPIO16

GPIO16 can be used to wake up the ESP8266 from deep sleep. To wake up the ESP8266 from deep sleep, GPIO16 should be connected to the RST pin. Learn how to put the ESP8266 into deep sleep mode:

I2C

The ESP8266 doens’t have hardware I2C pins, but it can be implemented in software. So you can use any GPIOs as I2C. Usually, the following GPIOs are used as I2C pins:

  • GPIO5: SCL
  • GPIO4: SDA

SPI

The pins used as SPI in the ESP8266 are:

  • GPIO12: MOSI
  • GPIO13: MISO
  • GPIO14: SCLK
  • GPIO15: CS

PWM Pins

ESP8266 allows software PWM in all I/O pins: GPIO0 to GPIO16. PWM signals on ESP8266 have 10-bit resolution. Learn how to use ESP8266 PWM pins:

Interrupt Pins

The ESP8266 supports interrupts in any GPIO, except GPIO16.

ESP-01 Reset button & power supply

ESP8266EX & ESP8285 GPIO

--

--

Mr.aegkaluk sopapun
Mr.aegkaluk sopapun

Written by Mr.aegkaluk sopapun

IoT Developer @ IoT Worldtech Co.,Ltd

No responses yet