deckle studio
Open the editor
Behavioural mixed-signal modelMSP2807ili9341_touch

TFT 2.8" 240×320 touch (ILI9341 + XPT2046)

2.8" colour TFT module, 240 × 320 pixels (ILI9341, 4-wire SPI, 16-bit RGB565 with COLMOD 0x55), with a resistive touch panel on an XPT2046 controller on its own SPI pins (T_CLK, T_CS, T_DIN, T_DO, T_IRQ low while touched). VCC 3.3–5 V (regulator on the module), logic 3.3 V: wire it straight to a 3.3 V MCU (ESP32), through level shifting from a 5 V one. LED high switches the backlight on. 14-pin header in this order: VCC, GND, CS, RESET, DC, SDI, SCK, LED, SDO, T_CLK, T_CS, T_DIN, T_DO, T_IRQ. In the simulation, click or drag on the display window to touch; the XPT2046 reports X 200…3900 across the short side and Y 200…3900 down the long side (portrait), read with commands 0xD0 (X) and 0x90 (Y), pressure from 0xB0 / 0xC0. Board 86 × 50 mm. Firmware: no ILI9341 library is installed (Adafruit_GFX is), so a driver of your own: start SPI with SPI.beginTransaction(SPISettings(40000000, MSBFIRST, SPI_MODE0)) on an ESP32 (8 MHz on an AVR), give fillRect, fillScreen, drawFastHLine and drawFastVLine one address window each (otherwise Adafruit_GFX fills pixel by pixel: a full screen takes seconds, on the real panel as here), send a run of one colour with SPI.writePattern, and redraw only what changed.

VCCGNDCSRESETDC/RSSDI (MOSI)SCKLEDSDO (MISO)T_CLKT_CST_DINT_DOT_IRQMSP2807
Schematic symbol

Key data

Category
Modules
Simulation model
Behavioural mixed-signal model
Manufacturer part number
MSP2807
Reference prefix
DS
Pins
14
Land pattern
PinHeader_1x14_P2.54mm_Vertical

Simulation model

A behavioural model implements the interface of the chip (registers, protocol, timing) at its pins. The pins are connected to the analog circuit like CMOS pins.

Model
ili9341_touch
Supply pins
VCC / GND

Pins 14

PinNameUse
VCCVCCSupply pinSupply input: decouple with 100 nF close to the pin
GNDGNDGround pinGround
CSCSInput pinLogic input: never leave open (tie unused inputs to VCC or GND)
RESRESETInput pinLogic input: never leave open (tie unused inputs to VCC or GND)
DCDC/RSInput pinLogic input: never leave open (tie unused inputs to VCC or GND)
SDISDI (MOSI)Input pinLogic input: never leave open (tie unused inputs to VCC or GND)
SCKSCKInput pinLogic input: never leave open (tie unused inputs to VCC or GND)
LEDLEDInput pinLogic input: never leave open (tie unused inputs to VCC or GND)
SDOSDO (MISO)Output pinLogic output: drives the next input; do not tie outputs together
T_CLKT_CLKInput pinLogic input: never leave open (tie unused inputs to VCC or GND)
T_CST_CSInput pinLogic input: never leave open (tie unused inputs to VCC or GND)
T_DINT_DINInput pinLogic input: never leave open (tie unused inputs to VCC or GND)
T_DOT_DOOutput pinLogic output: drives the next input; do not tie outputs together
T_IRQT_IRQOutput pinLogic output: drives the next input; do not tie outputs together

Parameters 2

Mountingmount
Defaultportrait
portraitlandscape

How the module sits in the device: landscape = turned 90° clockwise (320 × 240). Only the view turns; the firmware sets MADCTL and maps the touch values itself.

Touch (0 = none, 1 + column + 1000 × row)touchlive
Default0

Set by clicking on the simulated display.

PCB

Connector / off-boardPinHeader_1x14_P2.54mm_Vertical

2.8" ILI9341 touch module (MSP2807) on a 14-pin 2.54 mm header (VCC, GND, CS, RES, DC, SDI, SCK, LED, SDO, T_CLK, T_CS, T_DIN, T_DO, T_IRQ); the 50 × 86 mm module lies over the board