ST7796 SPI displays - design error

Some ST7796 SPI TFT displays have a diode fitted inline with the TFT chip select. This causes problems if the TFT shares the SPI bus with other devices such as a touch controller (e.g. XPT2046).

Further information can be found here.

It might be possible the diode is taking the logic level out of bounds. Can you short it out and if so does it solve the problem. Check the signal levels with a scope. Without a schematic that is about my best guess.

The schematic is here. For signal interface details you can look at the ST7796 data sheet here.

The CS controlling signal comes from the driving microcontroller so that signal level is not sourced by the TFT panel.

I have a 4" 480x320/ST7796 display connected to an ESP32 WROM with 36 pins. The display is working well as graphics but does not react as touch screen. So far I was not able to solve the problem and your post gives me the hope to get out of this cul de sac.
I have shorted externally SCK to T_CLK, SDI(MOSI) to T_DIN and SDO(MISO) to T_DO.
I would like to ask you if, as an alternative to using the soldering iron, it is possible to separate the TFT bus from the touch bus and connect this latter to separate ESP32 digital pins. Or doing it just for the signal connected to the diode.

You must leave the touch pins unconnected if you do not short out the diode. If you leave the Touch interface bus connected to the display interface signal pins then you must connect the touch T_CS to logic 1 (ie 3.3V) so the output T_DO does not drive the bus and fight the display SDO(MISO) output. The bus is already separate on the PCB so can be disconnected. You cannot use the Touch controller in these cases, or connect the display on the same bus, unless you do the diode modification detailed.

The Arduino example on the display Wiki page for the display board uses separate pins and hence two SPI busses on an Arduino board for the example given. This is an option you can use too with independent XPT2046 touch library.

The problem caused by the diode is explained here.

I have used the sodering iron to short the diode. It was much easier than I could expect.
However, while my 4" ST7796S display shows graphics well, on the serial monitor I see no reaction to my touch when the sketch “touch_TFT_espi” runs, as it shows only lines like tis : x: 0, y:0, z:4095. On the display screen a rectangular area is black.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.