Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By sumotoy
#35466 Looks like it crash, syntoms like this are clearly sign of a crash or cs line stop work. I have 2 modelu running from yesterday (one has even the mcp23s17 in the same line), both are exchanging random data and still running.
Maybe the module has problems, try to change the SPI speed in cpp file:
ILI9163C_SPI = SPISettings(80000000, MSBFIRST, SPI_MODE0);
to somethink like
ILI9163C_SPI = SPISettings(8000000, MSBFIRST, SPI_MODE0);
User avatar
By chage
#35523
sumotoy wrote:Looks like it crash, syntoms like this are clearly sign of a crash or cs line stop work. I have 2 modelu running from yesterday (one has even the mcp23s17 in the same line), both are exchanging random data and still running.
Maybe the module has problems, try to change the SPI speed in cpp file:
ILI9163C_SPI = SPISettings(80000000, MSBFIRST, SPI_MODE0);
to somethink like
ILI9163C_SPI = SPISettings(8000000, MSBFIRST, SPI_MODE0);


Hi sumotoy,
is there a good way to tell if CS line stop working? whenever this happen (white screen), i can still see the blue LED on nodemcu blinking , which is connected to D0 (CS) pin. That looks like CS pin is still toggling but the display stop responding.

how do you connect your nodemcu to the display module? do you connect nodemcu 3v3 and gnd to display module vcc and gnd?

I am powering my nodemcu thru the onboard mini usb, and power the display module with nodemcu 3v3 and gnd.
In addition:
- I have a bypass cap on the 3v3 (I put it in to see if it help stabilize the Vcc)
- I have 10k pullup on both CS and RST pin.
User avatar
By sumotoy
#35563 Hi,
I'm actually don't use rst, I've just pullup directly at 3v3.
The distorsion can be caused by inconsistent cs connection but white screen no, this mean that tft restarted with no initialization so it remains blank.
At 160mh one of the 2 modules sop working one time after several hours but was the ESP that crashed, it can happen, the other one at 80Mhz it's still running from several days.
From what you are saing the ESP module still run when blank display happen.
I have connected as follow:
CS -> 16 (D0)
A0(DC) -> 2 (D1)
RST->3v3
VCC->3v3
LED->(mine has internal resistor so goes at 3v3)
GND->gnd
SCLK->D5
MOSI->D7
I'm powering by USB but my USB it's able to send 1A so I will check for this:
1) Check if the voltage direct to display it's at list 3.2V, it's not rare that USB give much less than 5V and nodemcu module uses a linear regulator that has some dropoff. Also che if the voltage it's CONSTANT and don't have drops.
2) I will tie to 3v3 the rst pin of the display. Maybe a 10k it's to weak and the display reset itself (but not connect the rst pin to the ESP).
3) Maybe your tft it's defective? Did you try connect to another processor and test it?
User avatar
By chage
#35590 Hi,
I did try connecting RST to 3v3 directly before, but it did not help.
Just an update that your previous suggestion on changing SPI speed from 80000000 to 8000000 seems to make the issue goes away. I do not know how previous original high speed setting can cause the TFT to restart, maybe you have some thoughts on it?

Since i changed it to 8000000, everything runs fine, more than 24 hours now and no blank screen or distortion. I also checked the voltage before, the reading is pretty constant around 3.25V.

For now, i will move ahead with the mini project that I want to complete, and come back to figure out the actual root cause as to why SPI speed can mitigate the issue. Please post your finding if you figured something out :)

Thanks!