ESP8266 page

From Eric

(Difference between revisions)
Jump to: navigation, search
m
m
Line 1: Line 1:
 +
= The chip=
= The chip=
The ESP8266 is a SoC designed by Espressif.  
The ESP8266 is a SoC designed by Espressif.  
Line 10: Line 11:
I use the following board.  
I use the following board.  
[[File:esp8266_board.jpg|400px|thumb|none]]
[[File:esp8266_board.jpg|400px|thumb|none]]
-
 
-
The pin-out is the following.
 
-
[[File:esp8266_pinout.jpg|400px|thumb|none]]
 
=Connecting the ESP8266 board to a PC=
=Connecting the ESP8266 board to a PC=
 +
 +
The main things to know:
 +
* VCC is 3.3V (NOT 5V).
 +
* Input pins are NOT 5V tolerant.
 +
* The power supply shall deliver at least 500mA.
 +
* Pin CH_PD must be pulled-up to 3.3V
 +
* Pin RST must be pulled-up to 3.3V.
 +
 +
The ESP8266 board pin-out is the following:
 +
[[File:esp8266_pinout.jpg|400px|thumb|none]]
 +
=Using AT commands=
=Using AT commands=
Line 21: Line 30:
Every command must end with a CR/LF sequence. On minicom, this can be obtained using CTRL-M followed by CTRL-J.
Every command must end with a CR/LF sequence. On minicom, this can be obtained using CTRL-M followed by CTRL-J.
The AT commands are fully described in Espressif manual "[|ESP8266 AT Instruction Set]".
The AT commands are fully described in Espressif manual "[|ESP8266 AT Instruction Set]".
-
 
-
Here is a trace of the commands I used to
 
-
 
=Reprogramming the ESP8266=
=Reprogramming the ESP8266=
-
The ESP8266 can be reprogrammed. To do so, you can either go the easy way using Arduino or the hard way installing a cross-compiler, a download, etc.
+
The ESP8266 can be reprogrammed. To do so, you can either go the easy way using Arduino or the hard way installing a cross-compiler, a firmware uploading tool, etc.
== Using the Arduino environment==
== Using the Arduino environment==
(To be completed.)
(To be completed.)
-
== Installing a cross-compilation environment==
+
== Building and installing the cross-compiler and sdk==
I have followed the indications given [https://github.com/pfalcon/esp-open-sdk here]. A lot of information is also provided by Espressif on their [http://bbs.espressif.com/|BBS]). In particular, a lot of documents are available on [http://bbs.espressif.com/viewforum.php?f=51|this page].
I have followed the indications given [https://github.com/pfalcon/esp-open-sdk here]. A lot of information is also provided by Espressif on their [http://bbs.espressif.com/|BBS]). In particular, a lot of documents are available on [http://bbs.espressif.com/viewforum.php?f=51|this page].
Line 53: Line 59:
A lot of very interesting/important information about programming the ESP8266 are given [http://www.danielcasner.org/guidelines-for-writing-code-for-the-esp8266/ here].
A lot of very interesting/important information about programming the ESP8266 are given [http://www.danielcasner.org/guidelines-for-writing-code-for-the-esp8266/ here].
-
 
-
== Building and installing the cross-compiler and sdk==
 
==Uploading the software to the chip==
==Uploading the software to the chip==
-
The chip can be placed in the flash programming mode by pulling up GPIO0 during power-on.
+
The chip can be placed in the flash programming mode by pulling up GPIO0 during reset (pull down GPIO0, pull down RESET, pull-up RESET).
A flash download tool is provided by Espressif [http://bbs.espressif.com/viewtopic.php?f=57&t=433 here].
A flash download tool is provided by Espressif [http://bbs.espressif.com/viewtopic.php?f=57&t=433 here].
-
ANother tool (using Python) is available [https://github.com/themadinventor/esptool/ here].
+
Other tools:
 +
*[https://github.com/themadinventor/esptool/|ESPtool] in Python
 +
*[https://github.com/igrr/esptool-ck/|esptool-ck] in C
 +
*[https://github.com/DonKinzer/esp_tool/|esptool-ck] in C++
 +
 
 +
==Restoaring the AT firmware==
 +
The AT firmware can be found [https://github.com/espressif/esp8266_at|here] at Espressif.
 +
 
 +
=Other sources of information=
 +
* [http://www.esp8266.com|The ESP8266 community wiki]
 +
* [http://www.esp8266basic.com/|ESP8266 Basic]
 +
* [https://github.com/nodemcu/nodemcu-firmware|NodeMCU]: LUA on the ESP¨8266. You can build your version of NodeMCU on the net using [http://nodemcu-build.com/|this site]: configuration is done on the web site page and they buld the appropriate version of the firmware.

Revision as of 18:15, 17 April 2016

Contents

The chip

The ESP8266 is a SoC designed by Espressif.

Someone managed to decap the chip (well, a similar one) and show its internal layout (source here):

Esp8266 internals.jpg

The MCU is a lx106 processor IP.

The board

I use the following board.

Esp8266 board.jpg


Connecting the ESP8266 board to a PC

The main things to know:

  • VCC is 3.3V (NOT 5V).
  • Input pins are NOT 5V tolerant.
  • The power supply shall deliver at least 500mA.
  • Pin CH_PD must be pulled-up to 3.3V
  • Pin RST must be pulled-up to 3.3V.

The ESP8266 board pin-out is the following:

Esp8266 pinout.jpg


Using AT commands

Every command must end with a CR/LF sequence. On minicom, this can be obtained using CTRL-M followed by CTRL-J. The AT commands are fully described in Espressif manual "[|ESP8266 AT Instruction Set]".


Reprogramming the ESP8266

The ESP8266 can be reprogrammed. To do so, you can either go the easy way using Arduino or the hard way installing a cross-compiler, a firmware uploading tool, etc.

Using the Arduino environment

(To be completed.)

Building and installing the cross-compiler and sdk

I have followed the indications given here. A lot of information is also provided by Espressif on their [1]). In particular, a lot of documents are available on page.

On a fresh MINT installation, here are the commands I had to type to get a complete development environment:

 git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
 cd esp-open-sdk/
 sudo apt-get install autoconf
 sudo apt-get install gperf
 sudo apt-get install texinfo
 sudo apt-get install libtool
 sudo apt-get install automake
 sudo apt-get install ncurses-dev
 sudo apt-get install g++
 sudo apt-get install expat
 make STANDALONE=y


A lot of very interesting/important information about programming the ESP8266 are given here.


Uploading the software to the chip

The chip can be placed in the flash programming mode by pulling up GPIO0 during reset (pull down GPIO0, pull down RESET, pull-up RESET).

A flash download tool is provided by Espressif here. Other tools:

Restoaring the AT firmware

The AT firmware can be found [5] at Espressif.

Other sources of information

  • ESP8266 community wiki
  • Basic
  • [6]: LUA on the ESP¨8266. You can build your version of NodeMCU on the net using site: configuration is done on the web site page and they buld the appropriate version of the firmware.
Personal tools