Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Samighi11
#24792 I have used the ESP8266 for a while and am used to the way to flash it. I specifically got a 012 to ensure I had enough GPIO pins to drive a few LEDs.

I understand GPIO15 Low and GPIO2 High, then GPIO 0 HIGH on RESET, will bring it int programming mode. I am successful in flashing the board with Arduino IDE 1.6.5.

I need to know how to design a circuit that can make use of at least 1 or all 3 GPIO15, 0 and 2 pins. I see a lot of circuits that keep GPIO15 low, GPIO 2 High. then use GPIO0 Low using a button, then RESET low at the same time and programming can be done. ADAFruit HUZZAH board does that. I need an extremely small foot print circuit that can at least use 1 of the pins along with the other one 012 version provides.

Do i have to give up all these pins to get it to work? if I program it, can I then use them? My main issue is that on power loss (which is common, building a LED Set that won't be powered all the time), the indereminate state of these pins, put the ESP8266 in program mode, and won't run the SPI Flash.

Basically I want to ensure after programming, I can use as many pins as I can without it going into programming on power loss/power up. I can give up GPIO0 if needed.

If you need pictures, diagrams, etc of what I am running, please let me now. I use standard FTDI type programmers at 3.3V with independent 3.3 power to the ESP (common ground)

thank you.
User avatar
By martinayotte
#24793
Samighi11 wrote:I understand GPIO15 Low and GPIO2 High, then GPIO 0 HIGH on RESET, will bring it int programming mode. I am successful in flashing the board with Arduino IDE 1.6.5.

Entering in FLASH mode requires GPOI0 to be LOW, so I presume the above is a typo.

As for pins recycling, as I've promoted on many threads, which is true even with ESP01, let's dedicate GPIO0 and GPIO2 for an I2C bus since it is required PullUps and those GPIOs also need PullUps for Normal EXEC Boot sequence. (Just attach a PullDown Push Button for UPLOAD mode). With this I2C bus. you can add GPIOs Expander such MCP23017 and get 16 new GPIOs or more with multiple MCP23017.

For GPIO15, it is requires to be PullDown, but your firmware can do every thing you want after startup. You can easily drive it as output to relay or anything else, as long the LOW state at powerup isn't any issue.
User avatar
By Samighi11
#24795 Yes. Typo.

Do I need to do a reset while the pins at in the upload state?

So I would add a pull-up for 2 and 0. Momentary pull down with button. Do I need to pull down (or up ) reset? At this time?

I have i2c expander. W 0 and 2 pulled up, I can then run i2c bus?

The main question is do I need to reset I guess to start programming?
User avatar
By martinayotte
#24797
Samighi11 wrote:Yes. Typo.

Do I need to do a reset while the pins at in the upload state?

So I would add a pull-up for 2 and 0. Momentary pull down with button. Do I need to pull down (or up ) reset? At this time?

I have i2c expander. W 0 and 2 pulled up, I can then run i2c bus?

The main question is do I need to reset I guess to start programming?


Look at https://github.com/esp8266/esp8266-wiki ... ot-Process for boot mode.

RES also need pull up. If you're building your own dev board, it is convenient to have both GPIO0(Boot) and RES with switches.

About I2C Bus, feel free to attach any device .., MCP23017 is a good candidate ...