Waveshare WSH 4inch TFT Touch Shield User's manual

4inch TFT Touch Shield
Version: V1.0 Date: 20170914 1
4inch TFT Touch Shield
User Manual
OVERVIEW
This is a 4inch resistive screen TFT LCD, 320x480 resolution, integrate controller on board. It uses
SPI interface, can be used to display image, text or draw geometric figure with functions.
PARAMETERS
LCD Type: TFT
LCD Interface: SPI
LCD Controller: ILI9486
Touch Screen Controller: XPT2046
Touch Screen Type: Resistive
Resolution: 320x480 (Pixel)
Color Gradation Exponent: 65536
INT E RFACE
Symbol
Arduino PIN
STM32 PIN
Description
5V
5V
5V
5V power input
GND
GND
GND
Ground
SCLK
D13
PA5
SPI clock
MISO
D12
PA6
SPI data input
MOSI
D11
PA7
SPI data output
LCD_CS
D10
PB6
LCD chip select
LCD_BL
D9
PC7
LCD back light
LCD_RST
D8
PA9
LCD reset
LCD_DC
D7
PA8
LCD data/command
selection
4inch TFT Touch Shield
Version: V1.0 Date: 20170914 2
TP_BUSY
D6
PB10
Touch panel busy
SD_CS
D5
PB4
Micro SD card chip
select
TP_CS
D4
PB5
Touch panel chip
select
TP_IRQ
D3
PB3
Touch panel interrupt
HOW TO USE
HARDWARE CONFIGURATION
If there is ICSP interface on Arduino board, set the SPI Config switch onto ICSP position.
(default)
If Arduino board has no ICSP interface, set the SPI Config switch onto the position that
SCLK\D13, MISO\D12, MOSI\D11
EXAMPLES
We provide Arduino UNO examples and XNUCLEO-F103RB examples for this screen.
ARDUINO EXAMPLES
1. Download the examples: 4inch TFT Touch Shield code.7z, and copy the libraries which are in
Arduino\lib folder of examples to the libraries folder which is under the installation directory
of Arduino IDE.
2. Before running the LCD_ShowBMP code, copy the pictures which is in the PIC folder to SD
card.
3. Open the LCD_ShowBMP project with Arduino IDE, download to Arduino board.
4.
The Touch code use four sets of calibration values, could support painting operation in four
directions. There are five colors which could be selected on the right. The size of paintbrush
is 9 pixels by default. Users can also click the AD on screen to calibrate:
Please use the stylus click the cross on the screen. The cross will always move until the
screen adjustment is completed.
5. Following the prompt, click the red sign “+” one by one to finish the calibration.
STM32 E XAMPLES
1. Before running the code that display image. copy the pictures which is in the PIC folder to
SD card. Then insert the LCD to NUCLEO or XNUCLEO board.
2. Open the project with MDK, download to the NUCLEO or XNUCLEO development board.
4inch TFT Touch Shield
Version: V1.0 Date: 20170914 3
3. The LCD will first show some common functions: Draw dots, draw dotted line and solid line,
rectangle, filled rectangle, circle and solid circle. Every figure keeps for 3s. You can change
the size of dot, the width of lines and the size of the circles.
4. The Touch code use four sets of calibration values, could support painting operation in four
directions. There are five colors which could be selected on the right. The size of paintbrush
is 9 pixels by default. Users can also click the AD on screen to calibrate:
Please use the stylus click the cross on the screen. The cross will always move until the
screen adjustment is completed.
5. Following the prompt, click the red “+” one by one to finish the calibration.
Note:
Image: 320x480, 24bit, bmp.
SD card: FAT
Loading...