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.
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
| Pin | Name | Use |
|---|---|---|
| VCC | VCCSupply pin | Supply input: decouple with 100 nF close to the pin |
| GND | GNDGround pin | Ground |
| CS | CSInput pin | Logic input: never leave open (tie unused inputs to VCC or GND) |
| RES | RESETInput pin | Logic input: never leave open (tie unused inputs to VCC or GND) |
| DC | DC/RSInput pin | Logic input: never leave open (tie unused inputs to VCC or GND) |
| SDI | SDI (MOSI)Input pin | Logic input: never leave open (tie unused inputs to VCC or GND) |
| SCK | SCKInput pin | Logic input: never leave open (tie unused inputs to VCC or GND) |
| LED | LEDInput pin | Logic input: never leave open (tie unused inputs to VCC or GND) |
| SDO | SDO (MISO)Output pin | Logic output: drives the next input; do not tie outputs together |
| T_CLK | T_CLKInput pin | Logic input: never leave open (tie unused inputs to VCC or GND) |
| T_CS | T_CSInput pin | Logic input: never leave open (tie unused inputs to VCC or GND) |
| T_DIN | T_DINInput pin | Logic input: never leave open (tie unused inputs to VCC or GND) |
| T_DO | T_DOOutput pin | Logic output: drives the next input; do not tie outputs together |
| T_IRQ | T_IRQOutput pin | Logic output: drives the next input; do not tie outputs together |
Parameters 2
mountHow 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.
touchliveSet by clicking on the simulated display.
PCB
PinHeader_1x14_P2.54mm_Vertical2.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