ESP8266 firmware flashing on Windows

The flashing of ESP8266 module will be done using the Windows XTCOM_UTIL application. This application can also read/write registers, flash image download, HSpiFlash image download ands memory image download. I'm going to use "flash image download", which is in fact the firmware flashing. The XTCOM_UTILITY and the flash image can be downloaded here (alternate link here).

Modules:

RS232 FTDI
ESP8266

Connections:


Warning! ESP8266 does not support 5V on either of its pins.
Connecting the ESP8266 to FT232RL FTDI USB to TTL Serial+Adapter:
  • VCC = 3.3V (might require a separate power supply for the ESP8266 module, because the FTDI might not give enough current)
  • GND = ground
  • CH_PD = Chip enable, connect to +VCC
  • RST = Leave floating
  • GPIO0 = Normally floating but this needs to be connected to GND when flashing the ESP8266 module
  • UTXD = Tx data connect to TX of FTDI
  • URXD = Rx data connect to RX of FTDI

Flashing ESP8266 module with XTCOM_UTILITY:

Run the program and go to Tools->Config device. Select the Com port of FTDI adapter (only Com ports COM1-COM6 are supported - change port in Windows control panel if necessary). The port used by FTDI adapter is visible in Device Manager. In my case the port was COM2 and the speed was set to 115200. Press Open button to open the COM port and then click Connect.


Go to API TEST->Flash Image Download. Press Browse to select the firmware image and then press the Download button to start flashing.


Flash image file info output when using AT+GMR command:
AT version:0.21.0.0
SDK version:0.9.5


References: tutorial from iot-playground.com, images from stak.com and arduino-info.wikispaces.com
Similar tutorial: developer.mbed.org

New line, carriage return and tab representation in c/c++

Characters representation table

Name Character Decimal value Hexadecimal value Octal value String value
New line (line feed) LF 10 0x0A 012 \n
Carriage return CR 13 0x0D 015 \r
Tab TAB 9 0x09 011 \t

References: www.asciitable.com

Ebay ESP8266 pinout - model ESP-01

This particular ESP8266 was bought off Ebay from China. Ebay has all kinds of ESP8266 models. My version is ESP-01it was bought in 2014 and it looks like this.

China Ebay ESP8266 pinout

ESP8266 board connections:

  • 3.3V power supply
  • GPIO0 and GPIO2 are 2 general purpose input/output pins. GPIO0 will be set to GND only when loading the firmware
  • CH_PD must be in pullup mode when programming only
  • RST in pullup mode
Warning! ESP8266 does not support 5V on either of its pins.

References: The image was taken from www.electroschematics.com and the information from www.whatimade.today