Welcome to new things

[Technical] [Electronic work] [Gadget] [Game] memo writing

How to write programs from PC to ESP8266

This is a memo note on how to write a program to the ESP8266 from a PC.

explanation

This is a memo note for myself, but I will give a brief explanation.

  • ESP8266 is a microcontroller with WiFi communication function.
  • Create a program on the PC and transfer it to the ESP8266 to write the program.
  • This article is a memo note on setting up the circuit and software used when connecting a PC to the ESP8266.
  • Programs are written to the ESP8266 via serial communication.
  • Connect the USB serial converter module to the USB of the PC, and connect the serial communication line of the USB serial converter module to the ESP8266.
  • The USB voltage is 5V and the USB serial conversion module also operates at 5V, but the ESP8266 operates at 3.3V.
  • USB serial conversion module FT231X USB Serial Conversion Module from Akizuki Denshi is used.
  • USB Serial Conversion Module device driver is http://www.ftdichip.com/からダウンロードします..
  • The USB serial conversion module (FT231X) used has a 3.3V output pin, which is used to power the ESP8266.
  • Programming and writing is done using the Arduino IDE.

Circuit Creation Method

ESP8266

Pin Application Name access point
3.3V 3.3V for USB Serial Conversion Module
EN Pull-up with 10k resistor
GPIO15 Pull DOWN with 10k resistance
GPIO2 Pull-up with 10k resistor
GPIO0 Pull-up with 10k resistor + GND across tact switch (PGM)
RXD USB Serial Conversion Module TXD
TXD USB Serial Conversion Module RXD
RST GND across tact switch (RES)
GND AllOne of the following GND

Serial Conversion Modules

Pin Application Name access point
3.3V 3.3V for USB Serial Conversion Module

schematic

Arduino IDE設定

  1. [File]-[Preferences]-[Additional Board Manager URLs], enter "Add "http://arduino.esp8266.com/versions/2.4.2/package_esp8266com_index.json". If there is more than one, separate them with a comma.".
  2. Enter "ESP8266" in the search in [Tools]-[Board]-[Board Manager], select "ESP8266" and press "Install
  3. Select [Tools]-[Board]-[Generic ESP8266 Module

Program transfer method (how to enter transfer mode)

  1. Hold down both switches PGM and RES.
  2. Release the switches in the order RES→PGM
  3. ESP8266 goes into transfer mode, so transfer the program from PC.

program transfer

  1. Connect USB Serial Conversion Module to PC
  2. Launch the Arduino IDE
  3. [Tools]-[Serial Port]-[\].
  4. Put the ESP8266 into transfer mode
  5. Compile & Transfer by pressing the "arrow buttons

Circuit for actual use

Since the operation of ESP8266 is unstable in the above circuit for writing, it is better to stabilize it by connecting a resistor and a capacitor to "EN" when actually using it after writing.

See the following article for details. [https://www.kwbtblog.com/entry/2019/01/17/105828:embed:cite]

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com