ST7796S 3.5" TFT 320x480 with touch (SPI) with ESP32

Supply 3.3-5 V Bus SPI
VCCGNDCSRESETDC/RSSDI(MOSI)SCKLEDSDO(MISO)T_CLKT_CST_DINT_DOT_IRQ

Pins and ESP32 wiring

PinRoleESP32 pinNotes
VCCPower3V3On-board 3.3 V regulator: 3V3 or 5 V both work on most boards
GNDGroundGND
CSSPI chip selectD5
RESETInput (the ESP32 drives it)D25Reset
DC/RSInput (the ESP32 drives it)D26Data / command select
SDI(MOSI)SPI MOSID23
SCKSPI clockD18
LEDNot wired to the ESP32—Backlight: to 3V3 (always on) or through a transistor for dimming
SDO(MISO)SPI MISOD19Optional: only needed to read from the display
T_CLKSPI clockD27Touch controller clock (XPT2046), shares the SPI bus
T_CSSPI chip selectD32Touch controller chip select
T_DINSPI MOSID33Touch controller data in
T_DOSPI MISOD4Touch controller data out
T_IRQInterruptD35LOW while the screen is touched

Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.

Sources

Try it in 3D in BoardPilot

BoardPilot Part data (JSON)

Related parts

Part data: CC BY 4.0, free to reuse with credit to BoardPilot.