Zum Inhalt springen

WSAL13587 – 4inch TFT Touch Shield/en

Aus JW Tech Wiki

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

Technical overview of the Waveshare 4inch TFT touch shield: ILI9486 display controller, XPT2046 touch chip, SPI connection and demo programs for Arduino and STM32.

Related products at JW Tech

Technical overview

  • The module uses the ILI9486 LCD controller and is initialized over the SPI interface; the initialization routines are located in LCD_Driver.cpp.
  • Touch control uses the XPT2046 chip; related functions are in LCD_Touch.cpp.
  • For Arduinos with an ICSP header (e.g., UNO), leave the SPI config switch on the ICSP side; without ICSP, set it to SCLK/D13, MISO/D12, MOSI/D11.
  • The demo projects cover three folders: LCD_Show (shapes and patterns), LCD_ShowBMP (BMP image display via SD card) and LCD_Touch (drawing board).
  • To show a BMP image, copy the files into the root directory of a FAT-formatted SD card; images must be 480×320 pixels at 24-bit color depth in BMP format.
  • The bundled font library provides five sizes: font8 (5×8), font12 (7×12), font16 (11×16), font20 (14×20) and font24 (17×24).
  • The vendor also ships the Image2Lcd tool for converting images into array data, plus Zimo221 as a font-extraction utility.
  • On the STM32 side, the demo was tested on an XNUCLEO-F103RB (STM32F103RBT6); demos use the HAL library and call GUI_Show, LCD_Show_bmp and TP_DrawBoard sequentially in the main program.

Commands and examples – verify before use: 

System_Init();
LCD_Init(Lcd_ScanDir, 200);
SD_Init();
LCD_ShowBMP();
TP_Init(Lcd_ScanDir);
TP_GetAdFac();
TP_Dialog();
TP_DrawBoard();

Notes and version constraints

  • The source does not provide exact voltage, current or temperature values; electrical specifications should be taken from the ILI9486 / XPT2046 datasheets.
  • Compatibility with microcontrollers other than UNO / XNUCLEO-F103RB is not documented and must be checked per pin mapping.
  • Demo version and required Arduino IDE version are not stated; updates may change behavior.
  • The SD card must be placed in the root directory – subfolders are not supported according to the source; verify before testing.
  • No warranty, certification or safety information is present in the source; these points require human confirmation from the supplier.

Source and revision record