Works with 2.8" 320*240 ILI9341 TFT
Tested on v1.2 of this display:
- Connect the display to the raspberry Pi as below
Display | RPi pin | GPIO # |
---|---|---|
VCC | 1 | 3.3v |
GND | 6 | gnd |
CS | 24 | 8 |
RESET | 13 | 27 |
DC | 15 | 22 |
SDI(MOSI) | 19 | 10 |
SCK | 23 | 11 |
LED | 33 | 13 |
- Download and install the tft9341 overlay
SSH into the RPI
git clone https://github.com/goodtft/LCD-show.git
cd LCD-show/
sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo
Update the boot/config.txt file
sudo nano /boot/config.txt
add these lines at the end.
# turns spi on
dtparam=spi=on
# loads tft module for /dev/fb1
#
#dtoverlay=tft9341:rotate=270
dtoverlay=tft9341:rotate=270
# sets tft backlight pin on
gpio=13=op,dh
# or off at startup
#gpio=13=op,dl
- Reboot and test
sudo reboot
When rebooted, SSH in again.
You can then;
-
Check that /dev/fb1 exists
ls /dev/fb1
-
get info about fb1
fbset -fb /dev/fb1 --info
-
test that the display works.
cat /dev/urandom > /dev/fb1