Uncategorized

ILI9341 LCD Setup Notes

Asked 
Active today
Viewed 63 times
1
2

I ordered a cheap 2.8 inch ILI9341 screen from Amazon (https://www.amazon.co.uk/240×320-Screen-Serial-Module-ILI9341/dp/B07MXH92RL/ref=sr_1_12?dchild=1&keywords=spi+screen&qid=1589230039&sr=8-12) in the hopes of using it in a custom handheld Retropie console. However, I have attempted many different methods, none of which seem to work. I have reason to believe that the screen is not faulty as, when I give power to the backlight, it lights up, so I think that this is a software issue. Does anybody know how I can configure it to work? Many thanks, Dominic.

share  edit  follow  close 1   flag
 New contributor
0

Question

The OP has the following LCD:

Amazon Ftvogue ILI9341 2.8″ 240×320 SPI TFT LCD Screen (5110 interface, with SD Card socket, no touch screen)

ili9341 LCD

He is following the following guide to setup the LCD:

ili9341 Raspberry Pi guide – Pi0ket 2019feb26

He gets a white screen, and now a black screen. What is going on? How to fix it?

/ to continue, …


Answer

/ to continue, …


Discussion

The OP’s LCD uses the Nokia 5110 interface. So I google that to refresh my memory.

5110 interface

And I checked out the OP’s LCD to make sure if the pin outs match. It appears that the OP’s LCD 14 pin connector has the 5110’s 8 pin subset. The 14 pin has reserved 6 pin to touch panel, but is not uses. Everything looks good so far.

OP's LCD

And the schematic

lcd schematic

/ to continue, …


References

(1) Amazon Ftvogue ILI9341 2.8″ 240×320 SPI TFT LCD Screen (5110 interface, with SD Card socket, no touch screen)

(2) Amazon Ftvogue ILI9341 2.8″ 240×320 SPI TFT LCD Screen Docs and Schematic

(3) ili9341 Raspberry Pi guide – Pi0ket 2019feb26

(4) Artillery SPI TFT XPT2046 3.2 inch LCD touch screen monitor Module for Raspberry Pi3B/B+

(5) TSC2046 XPT2046 TOUCH SCREEN ILI9341 2,008 views 2017oct01

(6) LCD TFT screen 2.8″ ILI9341 SPI connect (How to build kernel/driver)

(7) How to create a simple LCD Touchscreen GUI Arduino, AdaFruit Library, ILI9341 240×320 – GreatScot 2018apr19 422k views, 12k Thumbs up 2018aug19

(8) ILI9341 Touch LCD SPI Based Driver for Rpi3B+ stretch – juj 2019apr19

(9) Rpi ILI9341 / XPT2046 SPI 3.2″ Touch LCD Display – LCwiki

(10) How to install LCD driver

(11) Getting an ILI9341 SPI screen working on Rpi – MGD Blog 2014feb19

(12) notro/fbtft Drivers for small TFT LCD display modules

(13) notro/fbtft Framebuffer use

(14) notro/fbtft Wiki

(15) notro/rpi-firmware branch:builtin

/ to continue, …


Appendices

Appendix A – SPI Setup

LCD3


Appendix B – LCD Pin out

LCD1


Appendix C – Back Lit Test

LCD2


Appendix D – Testing MGD Blog notro/fbtft Setup

(11) Getting an ILI9341 SPI screen working on Rpi – MGD Blog 2014feb19 (12) notro/fbtft Drivers for small TFT LCD display modules (13) notro/fbtft Framebuffer use (14) notro/fbtft Wiki (15) notro/rpi-firmware branch:builtin

Steps

(1) Use ILI9341 driver

(2) Compiled a custom kernel to load module.

(4) Wiring module to Rpi

Notes: (a) Used AdaFruit’s wiring scheme: https://github.com/notro/fbtft/wiki/LCD-Modules#adafruit-22 (b) AdaFruit’s 2.2″ 18-bit color TFT LCD display with microSD card breakout PRODUCT ID: 1480 US$25 https://www.adafruit.com/product/1480 (c) MISO, SDCS are not used by the module

---------------------------------------------
Display Driver  Rpi       Remark
        GPIO    Pin
        Name
--------------------------------------------- 
BL      led     GPIO18     Back Lit
SCK     SCLK    
MISO *                     Used by SD-card (Not used in this setup)
MOSI            MOSI    
CS              CE0        Chip Select
SDCS *                     SD-card Chip Select (Not used in this setup)
RST     reset   GPIO25  
D/C     dc      GPIO24    Data/Control
VIN     3V3 
GND     GND
---------------------------------------------

(6) Load module

sudo modprobe fbtft_device custom name=fb_ili9341  gpios=reset:25,dc:24,led:18 speed=16000000 rotate=90 bgr=1

Notes: (a) rotat=90 -> landscape, (b) bgr=1 -> correct background colour

(7) Send console to frame buffer 1

con2fbmap 1 1

Notes: (a) If using X:

FRAMEBUFFER=/dev/fb1 startx

(8) To load module automatically at boot, add the following line to /etc/modules:

fbtft_device custom name=fb_ili9341  gpios=reset:25,dc:24,led:18 speed=16000000 rotate=90 bgr=1

(9) To use built-in version, add this to the kernel command line:

fbtft_device.name=fb_ili9341 fbtft_device.gpios=reset:25,dc:24,led:18 fbtft_device.speed=16000000 fbtft_device.rotate=90 fbtft_device.bgr=1 fbtft_device.custom=1

/ to continue, …


End of Answer

share  edit   undelete  flag
Add Another Answer
Rpi ILI9341 2.8″ 240 x 320 5110 SPI TFT LCD Screen Setup Problem

Dominic McGreevyI ordered a cheap 2.8 inch ILI9341 screen from Amazon (amazon.co.uk/…) in the hopes of using it in a custom handheld Retropie console. However, I have attempted many differ…

tlfong01

tlfong01
3071
Perhaps search this forum for “ili9341 tlfong01”.
I read the product datasheet and found that it has no touch screen option. So it should be easier to use: Ref (1) “Amazon Ftvogue ILI9341 2.8″ 240×320 SPI TFT LCD Screen (5110 interface, with SD Card socket, no touch screen)”: amazon.co.uk/240×320-Screen-Serial-Module-ILI9341/dp/B07MXH9‌​2RL/…. Good Luck. Cheers.
Your screen is [Nokia 5110] compatible TFT LCD screen. So you might find the following driver worth a try: (1) “5110 and TFT LCD video tutorial – ElecFreaks”: elecfreaks.com/store/blog/post/…, (2) “YouTube 5110 LCD and TFT LCD (TFT01-1.8SP and 2.2SP)”: youtube.com/watch?v=N7HGZuwRrp4&feature=youtu.be. Good Luck. Cheers.
Dominic McGreevy

Dominic McGreevy
11
Thank you for your input! I searched “ili9341 tlfong01” and went to the link you shared (pi0cket.com/ili9341-raspberry-pi-guide). This was the most luck that I have had so far; for the most part, it looks as though the terminal is processing it correctly. However, there is still nothing being displayed on the screen. Instead I get this error message: “-bash: nbsp: command not found”. This confuses me as, when I type in “confbmap 1 1”, it outputs: “[1]+ Done sudo modprobe fbtft_device custom name=fb_ili9341”. Many thanks, Dominic.
tlfong01

tlfong01
3071
Ah, I think you have the character encoding problem. See the following Q&A for more details: (1) “What is this character (Â) and how do I remove it with PHP? – Asked 8 years ago, Viewed 36k times”: stackoverflow.com/questions/7186550/…
Don’t worry if you don’t understand what those web page guys are talking about. What you need to know is to get rid of the funny characters in the following string of your long bash command: “custom name=fb_ili934 ”. You might like to ask/google around what is the meaning of the string “ ” I forgot if “ ” means blank/space or similar. If you are too lazy to google, you might just try and error as “ili9341” followed by a space and semicolon or command. Good luck and cheers.
I googled again: “A common character entity used in HTML is the non-breaking space:  ”: w3schools.com/html/html_entities.asp. Cheers. PS – Now I remember those funny characters which I did use ages ago, when I was learning HTML!
Dominic McGreevy
Dominic McGreevy
Once again, thank you very much! I am no longer just seeing a white backlight and I’m seeing a black screen with the backlight on. Finally some progress! I still don’t understand why it isn’t outputting the Retropie UI. Many thanks, Dominic.
tlfong01

tlfong01
Congratulations! So you are making some progress. I have no idea of your black screen problem, properly wrong driver. I forgot if you need to compile the driver. Have you done that! Perhaps I can read the pi0cket article more carefully and see anything wrong. Keep trying. Cheers.
Dominic McGreevy
Dominic McGreevy
0:32
Hi again! I don’t think that this is a driver issue as it is filling the screen with black, meaning that it is doing something. I just don’t know how to fix it. It’s really strange because it’s not an uncommon thing to use an ILI9341 screen with a Raspberry Pi, yet I seem to be running into all sorts of issues which nobody else is.
tlfong01

tlfong01
I didn’t catch you. Are you saying that Rpi ILI9341 is a piece of cake, but you can’t fix it. If you don’t find any guy showing off their working thing, that means all others are weeping in the dark. Perhaps I should resume my long stalled LCD project: raspberrypi.stackexchange.com/questions/104600/…. Cheers.
Dominic McGreevy
Dominic McGreevy
Sorry about that; I wasn’t clear. I was wondering whether it is because I’m doing it on a newer version of Retropie or something along those lines. I might have a go on an older version later and sew how it goes. Many thanks, Dominic.
tlfong01

tlfong01
Ah, actually it is not a good idea to start with Retropie, even your project is gaming. You might like to read Ref 11 ~14 for a better tutorial on setting up the ILI9341 screen, using notro/fbtft. This is what I suggest you to try instead. Ah, supper time. See you late this evening or tomorrow.
Dominic McGreevy

Dominic McGreevy
11
Hi. I installed Raspbian and attempted to do it on that instead of Retropie, yet I still haven’t had any luck. Unfortunately, I’m getting to the point where I want to give up because nothing is working. It’s causing me a lot of stress and I just don’t know whether it is worth it anymore. If you have managed to get a similar screen working, please can you tell me what operating system you used, how you wired it, what tutorial you used, etc. Many thanks, Dominic.
tlfong01

tlfong01
3071
Ah, your are using Orange Pi 2.0, uBuntu 14, of course won’t work. Me Rpi4B 4GB, buster 20feb13, and all my ili9341 screens are touch sensitive. Using no touch screens would damage my reputation, and I will be losing face when all my Arduino bad friends LOL. Ah, you remind me that I should have a couple of old, no touch LCDs in my junk box, collecting dust, including a Nokia 5110 screen. Let me search the box for any ugly ones that look like yours and give them a go. Perhaps you wait a little bit longer, and I will carry on till tomorrow, 🙂 youtube.com/watch?v=sC24GI9V_Cs
Dominic McGreevy

Dominic McGreevy
0:32
Thank yo so much! I don’t think you understand just how helpful you’ve been. I look forward to hearing from you again! Many thanks, Dominic.
By the way, I am using a Raspberry Pi 3B+ to test it but I will eventually use a Raspberry Pi Zero.
tlfong01

tlfong01
3071
Yes, you need to give as much details as possible, such as (1) Rpi version and raspbian version (buster 2020feb13)., (2) The wiring diagram you are using, (3) The instruction and steps you followed, at which step you get stuck, etc. You might like to read Appendix D as an example. I am not sure if the no touch LCD if found from the junk box, will have the same pin out as yours. Or it may happen that my touch sensitive LCD has pins more like yours.
It is likely that my wiring is different from yours. So I would suggest you to do this assignment to morrow: Edit your question, or post your own answer’ giving all the details, like my answer here.
And if you write up your answer, day after day, like me, as a diary or project progress report, then later when looking back (in case you do not give up in the middle :)), you would understand better every bit of the completed project, as you build it day after dayyoutube.com/watch?v=XonFZjuyc6E.Ah bed time. I call it a day, see you tomorrow.
The last message was posted 8 hours ago.
.END

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: