[Guide] ili9341 SPI TFT Screen on Retropie

Various user-contributed guides for hardware-related things
User avatar
wermy
Site Admin
Posts: 1344
Joined: Tue May 03, 2016 8:51 pm
Has thanked: 618 times
Been thanked: 1319 times
Contact:

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by wermy » Tue Jan 31, 2017 8:49 pm

Thanks for sharing! :) I got the same screen working pretty well recently. I just used fbtft_device name=adafruit22a and used the same pin configuration they did. I was able to set the speed on mine to 80000000 (only after soldering it up directly to the pi with 3-4" wires - it was unstable otherwise), and it's running great! Well enough for playing games in my opinion, anyway. I'll be using it in my next project. :)
ImageImageImageImage

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2811
Joined: Thu May 05, 2016 8:33 am
Location: Rogers, AR
Has thanked: 1420 times
Been thanked: 3081 times

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by Helder » Tue Jan 31, 2017 11:53 pm

kamon wrote:Thank you!!! Ordered one to play with :).

Also, guys.
I followed a project awhile back where someone built a custom PCB for the GBA and used a 3.2" SPI LCD, here's a link to the GH project:

https://github.com/Ryzee119/GBA_Emulator-by-Ryzee119-/

Not only did they release their Eagle files so you can get the boards made, but they also had a SPI breakout board over on oshpark: https://oshpark.com/shared_projects/9tH3I87q

Looks like everything would work.

And, even more interesting to me:
@Helder, would you ever be interested in turning his Eagle files into a more robust one that at least has X/Y buttons, and preferably with some of the features your AIO has?

Maybe even for commission :)?
That is my whole reason to be looking into these screens to be honest and I'm well aware of those files but thanks for the links. I plan to make some changes to his choices of components for power and charging but I wanted to look into screen possibilities that are not 3.5 inch but more like 3.2inch so there doesn't need to be any case modding for the screen.

NTSC TVs (older tube sets) run at around 30fps and these SPI screens run about that speed so these emulators should run decent on them.
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!

kamon
Posts: 32
Joined: Wed Jul 27, 2016 7:29 pm
Has thanked: 4 times
Been thanked: 4 times

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by kamon » Wed Feb 01, 2017 12:53 am

I figured as much, but always good to make sure everyone has as much info as possible :D.

If possible support for both 3.2 and 2.8 screens would be nice. The 2.8 especially so because it's nearly identical in size to the GBA's and you can use the original screen(or a new replacement).
The less items that need to be bought/custom made the better!

Though, 3.2 and a screen with a border like dominator's would be awesome, too.

User avatar
moosepr
Posts: 523
Joined: Wed Jan 25, 2017 6:18 am
Has thanked: 69 times
Been thanked: 241 times
Contact:

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by moosepr » Wed Feb 01, 2017 2:11 am

Helder wrote: That is my whole reason to be looking into these screens to be honest and I'm well aware of those files but thanks for the links. I plan to make some changes to his choices of components for power and charging but I wanted to look into screen possibilities that are not 3.5 inch but more like 3.2inch so there doesn't need to be any case modding for the screen.

NTSC TVs (older tube sets) run at around 30fps and these SPI screens run about that speed so these emulators should run decent on them.

if we are sharing, then i best add to the list!! here is a link to the super minimal board in the puctures

https://oshpark.com/shared_projects/BP9tGKag

I did have a bit of a play making a board that would have the screen on one side, a pi zero stuck on the other, and power/gpio pins round the edges

https://oshpark.com/shared_projects/tSdupLd4

I have only been using eagle for a short while (only been designing pcb's the same length of time) so be gentle

I also made an eagle library for the ili9341 screens. Until my screens land i cant be sure its 100% right, but i think its ok

https://github.com/moosepr/eaglez/blob/ ... I-Zero.lbr
Get a small cheep LCD in your project https://www.sudomod.com/forum/viewtopic.php?f=22&t=2312
Wrap it all round a battery https://www.sudomod.com/forum/viewtopic.php?f=13&t=2292
Or use a custom PCB to make it really small https://www.sudomod.com/forum/viewtopic.php?f=13&t=2512
or make it really really really really tiny!! https://www.sudomod.com/forum/viewtopic.php?f=13&t=2919

User avatar
Mischief
Posts: 225
Joined: Sat May 21, 2016 7:50 am
Location: Wolverhampton, UK
Has thanked: 29 times
Been thanked: 68 times

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by Mischief » Wed Feb 01, 2017 2:23 am

Can PWM audio still be used with these screens? I do like the screen/Pi Zero combo PCB so much space saved :D

User avatar
moosepr
Posts: 523
Joined: Wed Jan 25, 2017 6:18 am
Has thanked: 69 times
Been thanked: 241 times
Contact:

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by moosepr » Wed Feb 01, 2017 2:34 am

Mischief wrote:Can PWM audio still be used with these screens? I do like the screen/Pi Zero combo PCB so much space saved :D
by default my guide uses GPIO18 for the backlight. this is mainly because it can do pwm and let you adjust the backlight brightness. This would interfere with the PWM audio, but in the command you are using to initialise the screen, there is an 'LED' parameter, so you could shift that to make it easier.

on my board i have the backlight powered from the same input as the screen, so it removes it all together (although i need to research to see if the fbtft driver can be used without the LED parameter) giving you another pin to play with!!

if you are not using UART or I2C, you get 20 GPIO's to play with (22 if we use the 'hat eeprom' pins 30 and 31)!!! the board still needs some refinement, all those pins are a bit squished, and i would like to have more power/gnd pins available
Get a small cheep LCD in your project https://www.sudomod.com/forum/viewtopic.php?f=22&t=2312
Wrap it all round a battery https://www.sudomod.com/forum/viewtopic.php?f=13&t=2292
Or use a custom PCB to make it really small https://www.sudomod.com/forum/viewtopic.php?f=13&t=2512
or make it really really really really tiny!! https://www.sudomod.com/forum/viewtopic.php?f=13&t=2919

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2811
Joined: Thu May 05, 2016 8:33 am
Location: Rogers, AR
Has thanked: 1420 times
Been thanked: 3081 times

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by Helder » Wed Feb 01, 2017 3:55 am

Mischief wrote:Can PWM audio still be used with these screens? I do like the screen/Pi Zero combo PCB so much space saved :D
PWM Audio can be used out of the other pwm pin as combined Stereo on 1 pin. Also aren't there 2 PWM1 or PWM0 pins? So theoretically 3 PWM pins?
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!

User avatar
moosepr
Posts: 523
Joined: Wed Jan 25, 2017 6:18 am
Has thanked: 69 times
Been thanked: 241 times
Contact:

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by moosepr » Wed Feb 01, 2017 4:12 am

Helder wrote:
Mischief wrote:Can PWM audio still be used with these screens? I do like the screen/Pi Zero combo PCB so much space saved :D
PWM Audio can be used out of the other pwm pin as combined Stereo on 1 pin. Also aren't there 2 PWM1 or PWM0 pins? So theoretically 3 PWM pins?

You can use the ALT5 pin confiuration to get the PWM audio, you only get the 2 i think, there looks to be 3 on the standard config, but thats on pins the zero doesnt have access to

http://elinux.org/RPi_BCM2835_GPIOs
Get a small cheep LCD in your project https://www.sudomod.com/forum/viewtopic.php?f=22&t=2312
Wrap it all round a battery https://www.sudomod.com/forum/viewtopic.php?f=13&t=2292
Or use a custom PCB to make it really small https://www.sudomod.com/forum/viewtopic.php?f=13&t=2512
or make it really really really really tiny!! https://www.sudomod.com/forum/viewtopic.php?f=13&t=2919

User avatar
Mischief
Posts: 225
Joined: Sat May 21, 2016 7:50 am
Location: Wolverhampton, UK
Has thanked: 29 times
Been thanked: 68 times

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by Mischief » Wed Feb 01, 2017 5:56 am

I just wasn't sure as I only follow the guides, from the pinout images I have seen (many of them) there are 2 PWM1 pins (GPIO 13 and 19 physical pins 33 and 35) and only 1 PWM0 (GPIO 18 physical pin 12) as this screen method will save space it's a shame to take up the gained space by using a USB DAC.

As these screens seem to be cheap I may just get one to play around with, I have a couple of spare zero's to test with.

User avatar
moosepr
Posts: 523
Joined: Wed Jan 25, 2017 6:18 am
Has thanked: 69 times
Been thanked: 241 times
Contact:

Re: [Guide] ili9341 SPI TFT Screen on Retropie

Post by moosepr » Wed Feb 01, 2017 6:15 am

Mischief wrote:I just wasn't sure as I only follow the guides, from the pinout images I have seen (many of them) there are 2 PWM1 pins (GPIO 13 and 19 physical pins 33 and 35) and only 1 PWM0 (GPIO 18 physical pin 12) as this screen method will save space it's a shame to take up the gained space by using a USB DAC.

As these screens seem to be cheap I may just get one to play around with, I have a couple of spare zero's to test with.
Go for it!! for £10 you can make a pocket pi!!

the 4 main pins for the screen cant be changed (they are the hardware spi pins)
SCK------------pin 23 (GPIO 11)
MISO----------pin 21 (GPIO 9)
MOSI----------pin 19 (GPIO 10)
CS--------------pin 24 (GPIO 8)

but the other 3 can, just change the parameters in the fbtft.conf
BL--------------pin 12 (GPIO 18)
RST------------pin 22 (GPIO 25)
D/C-------------pin 18 (GPIO 24)

i think its only the backlight pin that clashes with PWM audio ability
Get a small cheep LCD in your project https://www.sudomod.com/forum/viewtopic.php?f=22&t=2312
Wrap it all round a battery https://www.sudomod.com/forum/viewtopic.php?f=13&t=2292
Or use a custom PCB to make it really small https://www.sudomod.com/forum/viewtopic.php?f=13&t=2512
or make it really really really really tiny!! https://www.sudomod.com/forum/viewtopic.php?f=13&t=2919

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest