0

I bought a generic 2.8" TFT LCD 240x320 Serial SPI Display that uses the ILI9341 driver.

I cannot seem to make it work with my RPi 4B. Does anyone have an idea as to why? Or ideas to further narrow down the problem?

Process

Although I cannot find a datasheet, this thread from raspberrypi.org says it is possible when following the Adafruit tutorial and connecting the LED to 3.3v.

Adafruit says:

Vin connects to the Raspberry Pi's 3V pin
GND connects to the Raspberry Pi's ground
CLK connects to SPI clock. On the Raspberry Pi, thats SLCK
MOSI connects to SPI MOSI. On the Raspberry Pi, thats also MOSI
CS connects to our SPI Chip Select pin. We'll be using CE0
D/C connects to our SPI Chip Select pin. We'll be using GPIO 25, but this can be changed later.
RST connects to our Reset pin. We'll be using GPIO 24 but this can be changed later as well.

Based on the Pi's datasheet and corroborated by the gpio readall command, I connected it to my RPi 4B as follows:

Display     RPi 4B *physical pin*
---------------------------------
VCC         1
GND         9
LED         17
CS          24 (CE 0)
Reset       18 (GPIO 24, as per the Python3 code)
DC          22 (GPIO 25, as per the Python3 code)
MOSI        19
SCK         23

Pre-requisites

I followed these prerequisites to run standard updates, to make sure it has pip3 and python3 installed and I2C and SPI are enabled. I ran their test script and all is well.

The rgb_display_pillow_demo.py code that I want to execute also asks for dependencies to be installed:

This demo will draw a few rectangles onto the screen along with some text on top of that. This example is for use on (Linux) computers that are using CPython with Adafruit Blinka to support CircuitPython libraries. CircuitPython does not support PIL/pillow (python imaging library)!

These libraries are installed and I can run the script without errors.

Problem

I do not see anything appear on the screen. In fact, I should probably see a backlight of some sorts when powering the display on, without even running software, but I don't. Both the Pi and the display are working (vendor tested it on Arduino) and are connected with DuPont cables. It was factory soldered, so no cold joints can be assumed.

Perhaps I could test the display simply by executing these commands to rule out other issues:

FRAMEBUFFER=/dev/fb1 startx
con2fbmap 1 1

It is my understanding this would bring the console up on this TFT display. And I would then be able to revert to it being displayed via HDMI via:

con2fbmap 1 0

enter image description here

1
1

Ground is Pin 9 just to make sure :P but yes that +

sudo nano /boot/config.txt

--> add the following line to the end of the file:
dtoverlay=rpi-display

helped me a lot THX SmuPi

just to give another hint

Typically you want to see your device booting on the TFT. I.e. your boot console must be mapped to /dev/fb1.

Open /boot/cmdline.txt as root:

> sudo vi /boot/cmdline.txt

and add at the end of the first line:

fbcon=map:10 fbcon=font:VGA8x8 logo.nologo

just be sure you realy added this to the end of the line made the mistake that i added it underneath which is not working.

Best Regards

0
0

I've played around with a similar display (see picture below) the last days, maybe this will help.

I connected the Pi4 and the display based on the following article: https://www.xgadget.de/anleitung/2-2-spi-display-ili9341-am-raspberry-betreiben

This resulted in the following wiring:

2.4 TFT SPI 240*320     Raspberry Pi 4      Pin Nr
SDO(MISO)               GPIO 9 (MISO)       21
LED                     GPIO 18 (PCM_CLK    12
SCK                     GPIO 11 (SCLK)      23
SDI(MOSI)               GPIO 10 (MOSI)      19
D/C                     GPIO 24             18
RESET                   GPIO 25             22
CS                      GPIO 8 (CEO)        24
GND                     Ground              7
VCC                     3V3 Power           1

After that I only had to make the following adjustment (found on https://lallafa.de/blog/2015/03/fbtft-setup-on-modern-raspbian/):

sudo nano /boot/config.txt

--> add the following line to the end of the file:
dtoverlay=rpi-display

After reboot, the console (Text) was visible on the display.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.