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

User avatar
By aobs
#51988 I am using SPI for my LCD (library TFT_ILI9163C), but the MISO pin is not used. I am running out of pins on the ESP-WROOM-02 (ESP-13) and would like to use the unused MISO pin for SoftwareSerial RX.

Changing the pin function in the sketch setup() does not work:

Code: Select allpinMode(MISO, INPUT);


For testing purpose, I changed the line in SPI.cpp begin() from

Code: Select allpinMode(MISO, SPECIAL);


to

Code: Select allpinMode(MISO, INPUT);


It does not work either.

Any pointers will be helpful.
User avatar
By martinayotte
#52033 I don't see why it is not working ...
Are you looking at the good pin ?
Did you try simply checking its state with digitalRead() without using SoftwareSerial, just to if GPIO became really an input (use INPUT_PULLUP if you don't have external pullup) ?
User avatar
By aobs
#52066
martinayotte wrote:I don't see why it is not working ...
Are you looking at the good pin ?
Did you try simply checking its state with digitalRead() without using SoftwareSerial, just to if GPIO became really an input (use INPUT_PULLUP if you don't have external pullup) ?


Thanks. I tried your suggestion and confirmed that the MISO pin is receiving data. I found out the problem is because the voltage is not stable. That is why when the device that is sending the serial data to the ESP is connected to the voltage line, the voltage drops and causes the LCD display to fail. Stabilizing the voltage fixed the problem.