WSAL10684 – 2.8inch TFT Touch Shield/en
Erscheinungsbild
Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.
Summary
The Waveshare 2.8-inch TFT Touch Shield is a display expansion module featuring an ST7789V driver chip, SPI interface, 320×240 resolution and a four-wire resistive touch panel. It plugs directly onto Arduino boards (e.g., UNO) or STM32 boards (e.g., XNUCLEO-F103RB), with an onboard SD card slot for image display.
Related products at JW Tech
Technical overview
- Driver chip: ST7789V; Interface: SPI; Resolution: 320×240; Display size: 57.6 mm × 43.2 mm; Outline dimension: 73.3 mm × 55.3 mm; Colors: RGB, 262K; Touch method: four-wire resistive.
- Interfaces: SCLK (SPI clock), MISO, MOSI, LCD_CS (LCD chip select), LCD_BL (backlight control), LCD_DC (data/command select), SD_CS (SD chip select), TP_CS (XPT2046 chip select), TP_IRQ (XPT2046 interrupt output), 5V, GND.
- Applications: digital photo frames, drawing boards, e-books, MP3 players.
- When using an Arduino board with an ICSP interface, keep jumpers SB1, SB2 and SB3 open. When using a board without an ICSP interface, connect SB1, SB2 and SB3 each with a 0-ohm resistor.
- Windows software installation: copy the libraries from the 2.8inch_TFT_Touch_Shield/Arduino/lib folder into the \Arduino\libraries directory. Open an example program, select the development board model as Arduino UNO, choose the corresponding COM port, then compile and download.
- Four demo functions: DisplayString (display strings), DrawGraphic (draw graphics), ShowBMP (display BMP images from SD card), TouchPanel (touch pen function).
- For image display: pictures must be 240×320, 24-bit BMP; SD card formatted as FAT; copy pictures directly to the root directory of the SD card (no subfolders).
- Before testing TouchPanel, calibrate the touchscreen: use the stylus to tap the red plus sign until calibration is complete; click CLEAR in the upper right corner to clear the display.
- Touch functions in Touch.cpp: tp_adjust() (calibrate), tp_dialog() (clear screen to white), tp_draw_board() (open artboard).
- Display functions in LCD.cpp: lcd_init(), lcd_draw_point(), lcd_display_char(), lcd_display_num(), lcd_draw_line(), lcd_draw_circle(), lcd_draw_v_line(), lcd_draw_h_line(), lcd_draw_rect(). Two font sizes defined in font.c: height 12 / width 6 and height 16 / width 8.
Commands and examples – verify before use:
void TFT::lcd_init()
void TFT::lcd_draw_point(uint16_t hwXpos, uint16_t hwYpos, uint16_t hwColor)
void TFT::lcd_display_char(uint16_t hwXpos, uint16_t hwYpos, uint8_t chChr, uint8_t chSize, uint16_t hwColor)
void TFT::lcd_display_num(uint16_t hwXpos, uint16_t hwYpos, uint32_t chNum, uint8_t chLen, uint8_t chSize, uint16_t hwColor)
void TFT::lcd_draw_line(uint16_t hwXpos0, uint16_t hwYpos0, uint16_t hwXpos1, uint16_t hwYpos1, uint16_t hwColor)
void TFT::lcd_draw_circle(uint16_t hwXpos, uint16_t hwYpos, uint16_t hwRadius, uint16_t hwColor)
void TFT::lcd_draw_v_line(uint16_t hwXpos, uint16_t hwYpos, uint16_t hwHeight, uint16_t hwColor)
void TFT::lcd_draw_h_line(uint16_t hwXpos, uint16_t hwYpos, uint16_t hwWidth, uint16_t hwColor)
void TFT::lcd_draw_rect(uint16_t hwXpos, uint16_t hwYpos, uint16_t hwWidth, uint16_t hwHeight, uint16_t hwColor)
tp_adjust()
tp_dialog()
tp_draw_board()
Notes and version constraints
- The described demos were tested on Arduino UNO and XNUCLEO-F103RB; porting to other boards requires adjusting pin mapping according to the schematic.
- Rev2.1 uses the ST7789V driver with an IPS panel and 262K colors; older versions used HX8347 with 65K colors. According to the manufacturer, Rev2.1 supports 30 MHz write speed, while the older version supported 50 MHz.
- When inserting the shield: for boards without an ICSP interface (e.g., NUCLEO), pads SB1–SB3 must be connected with 0-ohm resistors or solder bridges; otherwise the LCD may not work correctly.
- The SD card must be formatted as FAT; images must be exactly 240×320 pixels, 24-bit BMP, and placed directly in the root directory.
- Touchscreen calibration must be performed before each restart or after changes; without calibration, coordinates will be inaccurate.
Source and revision record
- 2.8inch TFT Touch Shield - Waveshare Wiki
- Source revision: 104256
- Captured: 2026-08-30T02:36:42+00:00
- SHA-256:
6450723f879eb08fdd0a720e789e473a4c4d50bf6e1bedc49307d8b09c69c5f6