This guide helped immensely! My only issue was that my display's controller was an ST7789V and not an ST7789. For anyone else struggling with an ST7789V, you can simply use -DST7789VW=ON instead of -DST7789=ON. Unfortunately, Genesis/Mega drive emulation doesn't have enough CPU cycles left over to run at full speed on a pi zeroW.
It actually worked for me. Just Changed the -DST7735R=ON to -DILI9341=ON for my specific board. Thank you so much. I tried several other guides/videos, but this one worked for me in 2020. Good luck everyone!
When sonic first came out and I was in elementary school, I never dreamed it would end up being emulated on a computer that fits in your pocket. Back when the Sega Genesis came out, cell phones weren't even a thing yet. Now, there are computers that are tiny and can play any game from multiple systems, and for not too much money :)
Dude!! I have a waveshare 2" SPI based on the ST7789V. After following the manufacturers instructions to install all the software... I had the shifted screen issue (video starts shifted to the right). Looked all over the place for a solution and stumbled across your video. I followed your instructions but just edited the "st7789.cpp" as waveshare has a patch that takes care of the native screensize resolution. Anyway... rebuilt according to your excellent instructions and restarted my pi. Works beautiful!!! 😉😊 Thanks for the excellent information!
Cheers, it's really useful in situations like this where you're messing with the display or if you don't have it plugged into a display at all. Glad you found it useful!
Hey scott, Ive got a similar display (waveshare 2.8 inch 320x240), doing same as you seems to give a corrupt output somehow. Ive tried a few differnt clock divisor values and none seem to make a difference really. Thanks in advance.
Hmmm, do you know of a similar library for these screens (have a couple ili9341 but also have a 640x480 4" one) that works on the Arduino Mega 2560 and/or the Mega DUE? Want to use either the 2560 or the DUE as an touchscreen input device on another project but definitely need it to be able to draw WAY faster than it currently does...
Hello i seem toi have a problem my screen turns on with the top white and bottom part have a lot of colors kindal ike the ancient screens what could this be?
This library is specifically for the rpi, but as both this and the orangepi can be Debian based it might be possible to port it. You are best asking this on the fbcp-ili9341GitHub page.
I haven't tried it myself. I don't see why it wouldn't work though, as the library basically just mirrors whatever would normally go out via the hdmi port. It's at least 60fps and runs with no discernable lag on video games. Would be interested if you get it to work or not!
Hey guys u have a Pi Zero 2w and i think i did the installation right also specifying my screen cotroller but i cant figure out the pinout, can anyone help
Earned my subscribe and like thanks man, I used a Hat version of the LCD but with this guide with the Read me from the Gethub repository were up and running. Quick question what do I adjust to make this full screen seems I have a black bar on top and bottom. This is a 1.44x1.44 running retro pi on a pi zero...
Yes, as the CPU has to keep pushing data to the BM2835 chip, the GPU is not used at all for SPI screens (afaik). I don't think I ever checked how much of an impact it had, as the CPU was still plenty fast enough for what I was doing with it.
Hey I completely new to the hobby, I mean newborn new!! I don’t understand what most of this means… I have a question hopefully somebody can steer my in the right direction, So I want to take one a these small screens and put a loop on it.. but I want to encase it in something very slim like the size of a box of cards.. is there a screen or a way that I can do that?
Great video! I got the screen working but I seem to have an offset of around 16 to 20 pixels. Its like a black border and shifts everything to the right. I can't seem to find any setting to fix this, any ideas?
Amazing! Many thanks, Do you think it is possible to let Raspberry Pi run an Eink display as a driver and a host at the same time? or should I build a driver MCU separate for the display and control it with the SPI on the GPIO's?
You can use the SPI pins to drive an eink display, something like www.amazon.co.uk/1-54inch-Display-Module-Resolution-Two-Color/dp/B07Q6V93HQ/. No point using the driver I used here, as your not getting more than about 1fps from an eink screen regardless of how fast you drive it!
Amzing video! I am looking to show regular Raspberry Pi OS GUI on a 240x240 round lcd with GC9A01 controller. Didn't manage do to it... Any ideas were to look? Thanks :)
There are many things that can go wrong here, have you closely followed the instructions on the GitHub page? Have you set the -DSSD1351=ON directive? Have you started with -DSPI_BUS_CLOCK_DIVISOR set to somethhing high like 60 and see if that works? Are you certain that all your connections are correct, and that -DGPIO_TFT_DATA_CONTROL and -DGPIO_TFT_RESET_PIN are set correctly using the BCM pin numbers? If you're still stuck, I advise posting on the GitHub page for further help, but when you do, mak sure you are very specific and give all of your connections, compilation arguments, hardware info, exactly what you have tried etc or people won't be able to help.
Thank you! The library only works on the RPi so you won't be able to use it on the ESP32. However I have seen some really smooth animation etc from the ESP32 on similar displays, this for example; ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Wql4WTpPrWs.html. Regarding video, if the MP4 was on an SD card I don't know that it would be decoded fast enough for 30fps display. Here is someone who has done video, but the MP4 has to be converted to a dat file first github.com/MhageGH/esp32_ST7735_Movie. Let me know if you manage to get this to work!
@@ScottMarley Thank you for your help, soon as I got some time, ill try to implement it and see what fps I can achive. Ill post here if I manage to do anything, programing is my weak spot :)
Hello, thanks for the video I have a question, does v-sync work in this kind of setup? or are you having variable refresh rate depending how many frames you push into the screen? do these kind of displays suffer from screen tearing?
The short answer is that no, vsync doesn't work as SPI screens have no idea what vsync is. The long answer along with some ways to mitigate it can be found here github.com/juj/fbcp-ili9341/blob/master/README.md#about-tearing
Awesome tutorial Sir! My problem is that I have an ILI9341 2.8" TFT SPI 240x320.. but it is not like yours which is ST7789.. what I have has TJCTM24028-SPI written at the back.. After following the steps in you video the screen is output is a mirror image of what should be displayed.. 😔 I will look at juj link and see if there is a way this TFT display will work with some hacks.. thanks!
Got it, you can mirror the display by adding either display_rotate=0x10000 for a horizontal flip or display_rotate=0x20000 for a vertical flip to /boot/config.txt. From www.raspberrypi.org/forums/viewtopic.php?t=120793#p816458 Hope that helps
I can't give you a single piece of code that makes this work. How you configure everything depends on the exact SPI screen you have. Download and write retropie to a MicroSD, make sure it works fine over HDMI. Then follow the instructions on this video and the GitHub page for the spi driver, to set up the spi screen. Links are in the description.
I tryed to run it on the "240x240, General 1.3inch LCD display Module, IPS, HD" from Waveshare and only get a blackscreen (back lite is on) How could I find out whats wrong?
There are so many things that can make this not work! The 240x240 from adafruit (which I believe is the same screen) definitely does work, so you might have to keep trying. Double check all your pin connections, and the cmake command should be something like this: -DST7789=ON -DGPIO_TFT_DATA_CONTROL=5 -DGPIO_TFT_RESET_PIN=6 -DSPI_BUS_CLOCK_DIVISOR=8 .. (don't forget the two dots on the end!) providing you have reset on pin 31 and dc on pin 29. Try increasing -DSPI_BUS_CLOCK_DIVISOR=8 to =40 or something. See if it works at all. If all else fails, you can ask on the github page for help there.
Howdy, I get a "Please specify which display controller to use on command line to CMake!" error. How can I specify the display controller? Here is the command I am running: ""cmake -DHX8357D=ON -DGPIO_TFT_DATA_CONTROL=25 -DGPIO_TFT_RESET_PIN=24 -DSPI_BUS_CLOCK_DIVISOR=10 -DSTATISTICS=0 .."" so the back of my screen says HX8357D so I assume that is the driver or controller right? how to fix?
well I went into the Cmakelists.txt and saw there was an ADAFRUIT_HX8357D_PITFT so I will use that if not then I'll do what you did and edit the text files
@@adriang.4628 Yes, definitely give that a go. You might also want to open an issue in GitHub. The readme.md says that you can use -DHX8357D=ON but there is no code in CMakeLists.txt to check for that build option. Must have been an oversight.
was writing a little retropie acttacy screen.. but after seeing this do you think this will work with the PiMoroni Breakout Garden 1.54 240x240 SPI display?
I have no idea, it depends on wether the display driver chip for that screen is supported by the library. So you'll have to find out what the driver chip is.
@@KineticEgg oh I see, I'd never heard of breakout garden before. Looks a bit like that qwik system or seeeds grove stuff. I generally prefer breadboards anyway ;) have fun!
If anyone can help I’ve been trying to figure this out for a while my screen is a 2inch 240x320 waveshare screen but my pin out is Vcc,gnd,Din,Clinton,cs,DC,RST, BACKLIGHT. So I’m confused what should Goto mosi miso etc if anyone knows how to plug this in lmk please
Din on your screen connects to MOSI (RPi pin 19). Clk goes to pin 23, CS goes to pin 24, RST goes to pin 31, DC goes to pin 29. Backlight usually goes to Vcc if you want it on, but might be ground. Try it and see. You can leave MISO unconnected. Vcc goes to either 3.3V or 5V depending on your screen. GND goes to ground. If you do that and follow the rest of the instructions to build the library then it should (might!) work.
@@ScottMarley didn’t work on pi4 so I tried on my pi3 B+ with retro pie I think I have it hooked up right but nothing is on the screen just the backlight and the hdmi put doesn’t work either the tv says something about resolution
@@ScottMarley I did everything in your video and got as far as configuring boot options...i am missing the hdmi_cvt =320 240 60 1 0 0 0. line. i enabled the "hdmi force_hotplug =1" but i get the error vc_dispmanx_display_open failed! Make sure to have hdmi_force_hotplug=1 setting in /boot/config.txt. I have the ili9341 2.8 display. any ideas?
You need to add a line to /boot/config.txt, either 'display_rotate=0x10000' for a horizontal flip or 'display_rotate=0x20000' for a vertical flip. If you just need to rotate the screen instead of flip it, use 'display_rotate=#' where # is 1, 2 or 3. Hope that helps.
@@ScottMarley Hi Scott, thank you for your reply. display_rotate=0x20000 in config.txt works. But it flips the HDMI Output too. So any ideas, howt to flip only the ili9341 Display?
@@sebastianputlitz2708 I don't know if that's possible. Try some more config.txt options from here and see if anything works www.raspberrypi.org/documentation/configuration/config-txt/video.md
Looks like it isn't possible as far as I can tell. You can rotate the spi display separately from the hdmi, but not mirror it. The library is written to just display the hdmi buffer, as stated here github.com/juj/fbcp-ili9341#do-i-have-to-show-the-same-image-on-hdmi-output-and-the-spi-display-or-can-they-be-different
So my screen has only a screen, no sd card and no touch screen. My PINs are: 1.VCC 2.GND 3.MISO 4.MOSI 5.BLK 6.DC 7.RES 8.CLK So the Chip is automaticly selected?
@@cheat_steve10 it's not automatically selected as such, its selected via the TFCS pin on your screen, so that needs to be wired as per the diagram in the video (except mine is called CS). Just follow that diagram and you'll be good.
Hey Scott! Amazing job man! PErfect. I wonder if you could assist. i cannot get it to work. i keep getting white screen. My screen is a ili9341 and i use the following specs - sudo apt-get install cmake cd ~ git clone github.com/juj/fbcp-ili9341.git cd fbcp-ili9341 mkdir build cd build cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DILI9341=ON -DGPIO_TFT_DATA_CONTROL=24 -DGPIO_TFT_RESET_PIN=25 -DSTATISTICS=0 .. make -j i have the core of my pi at 360. this means that 360/6 = 60hz ... But the screen keeps getting white .... any ideas?
Hi, there are a bunch of things that can go wrong here, and I can't see anything obvious from what you've posted. Check your connections and pins are correct. Also increase your divisor to 40 or so and see if that helps. If so, you can then reduce it until it works. You might be better asking for help on the GitHub page however, where people far more knowledgeable than me may be able to help!
The commands will be different depending on the model of the LCD, screen controller, resolution, orientation and a load of other stuff so its vital that you read through the docs carefully to make it work for your use case. The GitHub documentation is really good, much better than anything I could write here.