The latest development version of this page may be more current than this released 2.0.0 version.

ILI9340 Display driver

Overview

Every half-second, this sample application draws a color-filled rectangle in a corner of the LCD display. The rectangle fill color cycles through red, green, and blue on each update.

Wiring

The NUCLEO-L476RG should be connected as follows to the Adafruit TFT display.

NUCLEO-L476RG
Arduino Header
NUCLEO-L476RG
Pin
Adafruit TFT
Pin
D3 PB3 SCK
D7 PA8 D/C
D8 PA9 RST
D11 PA7 MOSI
D12 PA6 MISO
A2 PA4 NSS

The Seeed 2.8 inch TFT Touch Shield V2.0 should be plugged in the Arduino header on nRF52-PCA10040. The following pins will be connected except the TFT reset pin. A separate wire should connect P0.21 pin to RESET pin on the nRF52-PCA10040.

nRF52832
Pin
Seeed TFT
Pin
P0.25 SPI_SCK
P0.23 SPI_MOSI
P0.24 SPI_MISO
P0.16 TFT_CS
P0.17 TFT_DC
P0.21 RESET

The Adafruit 2.8 inch TFT Touch Shield should be plugged in the Arduino header on nRF52840-PCA10056. The following pins will be connected.

nRF52840
Pin
Adafruit TFT
Pin
P1.15 SCLK
P1.13 MOSI
P1.14 MISO
P1.12 TFT_CS
P1.11 TFT_DC

Building and Running

For NUCLEO-L476RG, build this sample application with the following commands:

west build -b nucleo_l476rg samples/display/ili9340

See ST Nucleo L476RG on how to flash the build.

For nRF52-PCA10040, build this sample application with the following commands:

west build -b nrf52_pca10040 samples/display/ili9340

See nRF52-PCA10040 on how to flash the build.

For nRF52840-PCA10056, build this sample application with the following commands:

west build -b nrf52840_pca10056 samples/display/ili9340

See nRF52840-PCA10056 on how to flash the build.