Recently I bought an unbranded 3.5” 480×320 SPI TFT touch screen for a hardware CTF challange I am building on a Raspberry Pi.
TL:DR
- Skip these rubbish screens, they’re a massive pain to set up and have very poor refresh rates (sub 8 FPS)
- If you’re a masochist and want to learn more, read on…
These little screens fit nicely on top of the Raspberry Pi and you can add a case to hold everything tightly together. There is a different version of the screen that connect via HDMI but I felt it’s bulky and for my project the refresh rate did not matter too much.
I won’t get into too much technical details, there are heaps of websites describing the controller and framebuffer driver and in the end it’s very hard to find the information that really matters. I will link some of these website at the end of this tutorial for your reference.
The LCD screen I tested is powered by the XPT2046 Touch Controller and ILI9486 driver.
Given there is no driver provided with the LCD screen, after you madly visit countless websites hopefully you will end on this page: LCD driver for the Raspberry PI Installation – https://github.com/waveshare/LCD-show
The only script that worked with this screen was `LCD35B-show-V2`. The screen started to work however there was one big problem. All the colors were INVERTED.
It took me a while to figure out a working combination but finally I managed to make it work. Instead of LCD35B-show-V2 run: LCD35C-show
./LCD35C-show
Don’t restart the Raspberry Pi yet, the screen won’t work. You need to edit `/boot/config.txt`. Towards the end of the file make sure the dtoverlay
looks something like:
dtoverlay=waveshare35c,fps=50,speed=24000000,debug=32:rotate=90 hdmi_force_hotplug=1 hdmi_group=2 hdmi_mode=1 hdmi_mode=87 hdmi_cvt 480 320 60 6 0 0 0 hdmi_drive=2 display_rotate=0
You can play around with the speed, for me ‘24000000’ worked fine.
Now you can reboot your Pi and enjoy your LCD screen.
If this method worked for you drop me a line in the comment section.
Some useful links:
- https://github.com/waveshare/LCD-show
- http://www.lcdwiki.com/3.5inch_RPi_Display
- RPi Touchscreen – How to turn it off?
- PiScreen2 + Raspberry Pi3 display not working
- Adventures with SPI TFT screens for the Raspberry Pi
- RPi 2 and 3.95 TFT ili9488
- 3.5 inch Pi TFT LCD Touchscreen(320*480)
- Retropie + 3.5 inch RPi LCD v3.0 (no brand)
- PiScreen Driver Install Instructions