Say I want to save a few resistors in my design. Would this work as a barebones circuit?
-
\$\begingroup\$ What is your goal in posting this unclear question and then immediately self-answering it? The question itself is nowhere near what is required to be a canonical question, and your answer is somewhat erroneous. \$\endgroup\$– Chris StrattonAug 4, 2018 at 16:28
-
\$\begingroup\$ My only goal in posting this is to provide this information to anyone who might look for it online in the future. When I was researching this information for my own purposes it was not readily accessible. I have nothing to gain personally by posting this. I have corrected the mistake you pointed out (thanks for that). Are there any others I missed? How is the post unclear? \$\endgroup\$– Murey TasrocAug 4, 2018 at 18:29
-
\$\begingroup\$ Your hand-drawn sketch has no relation to your question title since it contains no connections to other logic. \$\endgroup\$– Chris StrattonAug 4, 2018 at 18:48
-
\$\begingroup\$ gpio15 is connected directly to logic level low and gpio2 is connected directly to logic level high. How does that have no relation to the topic? \$\endgroup\$– Murey TasrocAug 4, 2018 at 18:52
-
\$\begingroup\$ Power supply rails are not "logic". "Logic" is something like 74HCTxxx. \$\endgroup\$– Chris StrattonAug 4, 2018 at 18:53
1 Answer
No -- connecting gpio15 directly to ground to set boot mode will cause shorts (see below). Also, gpio2 and gpio0 have internal pullup resistors that are automatically enabled so you don't even need to connect gpio2 to anything for a barebones application. Here is a correct barebones circuit:
More information on the boot mode select pins:
A table for the pins dictating ESP8266 boot mode (0 is gnd, 1 is 3.3v)
Not sure what SD-Card Boot mode is... for normal use the first and second lines are applicable.
It is recommended that you use pullup/down resistors to set these voltages rather than connecting these boot mode select pins directly to certain voltages. Or read below for more specifics.
GPIO15 has other purposes other than boot mode select (specifically it is TXD2, the debugging UART output -- since UART drives the line high periodically, connecting this pin directly to ground for normal boot mode selection will cause a short (unless you disable UART on this pin, which I'm not sure how to do)).
Connecting GPIO 2 directly to logic level high to save a resistor in your design won't cause any problems as long as you don't drive this pin low somewhere in your code. Same with GPIO0 -- that's what a reset button does -- again though, don't drive it high as an output in your code and then press the reset button. If you don't trust yourself to not use these pins in your program, I would just stick to using pullup/pulldown resistors to set boot mode.
Also, always make sure that you only use these pins as outputs -- if they are used as an input and driven to an incorrect logic on startup, the ESP won't boot correctly.
If you are going to use these pins as outputs, make sure that whatever you are using it for won't affect the logic of the pin on startup. One way you can ensure this is to use the below circuit -- if the "logic output" is driven to a certain voltage, that will not affect the logic of the esp pin. That said, the esp pin can be used as an output through this circuit (the logic will just be inverted) -- so if you program the esp pin to be high, the "logic output" will be low, and vice versa: