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

User avatar
By Mario Mikočević
#34794 Heya,

as per Kolban's ebook (page 26, Nov) I tried to be universal vs programmers and did voltage divider with 10k/22k ratio. On GPIO2 I have DS18B20 sensor and the rest is usual.
Now the funny thing, when USB programmer (CP2102 in my case) is connected to RX/TX/GND, through divider, everything is fine, Serial() works, I can flash it, erase it, it just works.
*but*
When I do remove RX/TX connection, ESP fires up serial LED meaning continuous wdt resets or exceptions.
I noticed that when I do remove that voltage divider and go straight RX or TX it works fine in both situations, with and without programmer connected.
Cannot debug it (or do know how) because it barfs on me when I do not have Serial() connection.

Anyone have a clue what is happening here ?


TIA,
--
Mozz
User avatar
By martinayotte
#34808 Simple voltage dividers done with resistors have this pitfall : when no TX output from USB-TTL are connected, so no more HIGH idle state, the divider is acting like a pull-down on RX pin of ESP, which mean it like it is receiving a continuous Break character.
So, maybe this Break condition is not handled properly, maybe not handled at all, a probably some RX buffer get filled with zeros.
I would rather use the traditional MOSFET level translator which has pull-ups on both side, meaning that if nothing connect, the RX will still see it has a HIGH idle state.