lalorm
Posts: 4
Joined: Thu Jun 08, 2017 10:43 am

3.5" screen on GPIO

Thu Jun 15, 2017 9:12 pm

Hi all,
I imagine this is a common problem, but I haven't been able to find a solution. I'm using a 3.5" TFT screen connected to the Pi 3 (I'm also going to be using a Pi Zero which I haven't tried yet) using the GPIO pins rather than the hdmi port. I've used fbcp and omxplayer to play a video and that works. However the video looks like it's running at 10 fps in places. Mostly when there is any real movement on screen it looks jerky. The video looks great over hdmi but I don't have that option for what I want. As far as I understand it, the hdmi will use graphics acceleration but if I use the GPIO it doens't.
Is there any way around this? Is there a better way to loop a video without having to use HDMI? I'm wondering how others have used these small screens for retropi and other video players. All I want to do is loop a video
Regards
M.

User avatar
bitbank
Posts: 259
Joined: Sat Nov 07, 2015 8:01 am
Location: Sarasota, Florida
Contact: Website

Re: 3.5" screen on GPIO

Thu Jun 22, 2017 12:21 pm

There are several options for 3.5" LCD; based on your comments, I'm assuming you have a 320x480 display connected via 4-wire SPI interface. Those displays run very slowly due to the speed of the interface and there's no 'fix'. The SPI bus can run up to 125Mhz, but those displays use low cost shift registers which max out at about 16Mhz. 320x480x16 bits per pixel = 2457600 bits per frame. 16000000 / 2457600 = 6.5 frames per second. I've written software to update only the sections of the screen which change and this can achieve better frame rates as long as the whole screen isn't changing each frame. The fbtft/fbcp drivers don't really have any smarts to them about partial updates, so you're not going to get very far with them. There are more expensive screens that attach to the GPIO header and achieve high frame rates by using every single I/O port to talk to the display in parallel. Pimoroni just released a 800x480 'Hyperpixel' display which uses this method:

https://shop.pimoroni.com/collections/d ... hyperpixel
The fastest code is none at all :)

Return to “Graphics, sound and multimedia”