-->
Page 1 of 1

Can I use MISO for SoftwareSerial RX?

PostPosted: Tue Aug 02, 2016 11:05 pm
by aobs
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.

Re: Can I use MISO for SoftwareSerial RX?

PostPosted: Wed Aug 03, 2016 11:04 am
by martinayotte
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) ?

Re: Can I use MISO for SoftwareSerial RX?

PostPosted: Wed Aug 03, 2016 11:04 pm
by aobs
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.