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

User avatar
By MikeBolton
#25916 I have been using a ESP-01 module running at 115.2KB from a PC - RS232 with HIN232 IC and logic level limited to 3.3V via a 470 ohm resistor and zener. This works fine.

Sent identical data to the ESP Rx pin from a PIC at 3.3V supply and it didn't work. The baud rate is correct to within 0.08% and the logic levels seem OK. Also tried to drive the Rx pin from a 4000B series logic device at 3.3v. Connecting the 4011 output to the ESP Rx pin completely killed the 4011 output.

Is there any specification for the Rx input? What is the current sink needed to ensure a logic low? Is it slew rate dependent? With a series resistor of 470 ohms it works. With direct drive from a PIC (18F25K80) it doesn't. It is the same on three different ESP modules so not a hardware fault.

I have been tearing my hair out to get my ESP-01 to work from a PIC. Anyone else with similar problems?

Mike B
User avatar
By Barnabybear
#25922 Hi, based on nothing more than just a quick read of your findings. You state that "With a series resistor of 470 ohms it works.".
Is it possable that other communication devices (that work) have current limiting outputs, where as the PIC uses a "full blown" output that triggers the ESP's internal protection? 470 ohms limits the current to a maximum of 7mA, off hand I don't know the input impedance of Rx.
Last edited by Barnabybear on Thu Aug 13, 2015 3:22 pm, edited 11 times in total.
User avatar
By martinayotte
#25923 Maybe we need to have simple schematic here, because I'm not sure how this is wired.
Since both PIC and ESP are at 3.3V, the resistance/zener is only needed for the HIN232, right ?
BTW, personally, I'm prefer using a MOSFET with 2 resistances as voltage translator...
User avatar
By MikeBolton
#25925 Martin

The resistor and zener just protect the CMOS logic, not the ESP now. Instead of driving the ESP Rx input from the CMOS logic, I have used a transistor as an inverter, 470 ohms collector load to 3.3V. The Rx input is driven by the collector (no series resistor as such) and this now works. Does suggest the ESP Rx input needs a significant pulldown current, but not measured how much. I don't know what the Rx logic low value is. (How much does it need to be pulled down?)

Anyway, I am now in a position to monitor the traffic between the PIC and the ESP (both ways) with the PC program. I suspect the PIC may be producing spurious characters on its EUSART output but couldn't check before. We have our own ESP code to reduce the 'verbiage' of the AT set as we need a fairly high data transfer rate and all the AT stuff is a complete waste of time, especially when the data is only a few bytes per message.

Would be interested in other's experience of PICs with an ESP.

Mike B