Setting up a ILI9341 Display on the Raspberry Pi Zero

Setting up a ILI9341 Display on the Raspberry Pi Zero

I had a ILI9341 2.2 inches 320x240 tft display laying around, as well as a bunch of pi zeros, so why not use them together?

The screen:

The ILI9341 screen was bought on ebay, some time ago, but can be found on aliexpress.

alt text

The Pi Zero:

alt text

The Connections

(Thanks to Aaron Brown)

ILI9341 ---------RPI(Broadcom GPIO) --------- RPI PIN#

BL_LED ----------GPIO 18 --------------------------12

SCK ------------- SCLK ------------------------------23

MISO ------------ MISO ------------------------------21

MOSI------------- MOSI ----------------------------- 19

CS ---------------- CE0 -------------------------------24

RST -------------- GPIO 25 -------------------------- 22

D/C -------------- GPIO 24 -------------------------- 18

Vin --------------- 3.3V ------------------------------ 1

GND --------------- GND ------------------------------- 6

Since there are conflicting name conventions for the GPIO pins on the Raspberry, I opted to give a fritzing schematic aswell.

alt text

The Software Setup

As always, first make sure that everything is up to date:

sudo apt-get update && sudo apt-get upgrade

In the old days you would need to compile the kernel module yourself, but now it's already built-in!

3 steps are required:

first, create a file /etc/modules-load.d/fbtft.conf with these contents:


Then, create the file /etc/modprobe.d/fbtft.conf with:

fbtft_device name=adafruit22a verbose=0 rotate=90

And finally, on boot/cmdline.txt, add, in the end of the line:

fbcon=map:10 fbcon=font:VGA8x8

If setting the font there doesn't work, change it via:

sudo dpkg-reconfigure console-setup

Reboot, and it should be shouwing the console!

If you want to make it stay always on, change /etc/kbd/config:


Now I only need to design and 3d-print a decent case, and lose all the tape.

alt text