I have an old TFT LCD SPI screen, which I believe uses ILI9341
and would like to use it on my (old) RPi A+. Unfortunately, it just stays blank. I am not even sure it is working...
My RPiA+ has a fresh Raspbian Stretch.
I have wired my screen following this blog and using this pin layout. Just in case I haven't understood correctly:
- I have wired VIN of the screen to 3.3 VDC power on the Pi (pin 1)
- I haven't wired MISO and SDCS: my understanding is that they are for the SD card on the screen - which I do not use
- The LED is my case is wired to GPIO 2
- MOSI goes to "MOSI SPI GPIO 12"
- SCK goes to "SCLK SPI GPIO 14"
- CS goes to CE0 SPI GPIO 10
- D/C goes to GPIO 24
- RST goes to GPIO 25
- GND goes to ground
I tried to load the driver fb_ili9341, but this isn't supported:
$ sudo modprobe fbtft_device name=fb_ili9341 gpios=reset:25,dc:24,led:2 speed=16000000 rotate=90 bgr=1
modprobe: ERROR: could not insert 'fbtft_device': Invalid argument
I listed the available modules with sudo modprobe fbtft_device name=list; dmesg | tail -30
and there was only one ili drivers: ili9481, so I decided to use that one (but I am not sure this is correct).
So, I tried again:
$ sudo modprobe fbtft_device custom width=320 height=240 name=ili9481 gpios=reset:25,dc:24,led:2,cs:10 speed=16000000 rotate=90 bgr=1
This loads correctly as we see in dmesg:
$ dmesg
...
2229.934312] graphics fb1: fb_ili9481 frame buffer, 240x320, 150 KiB video memory, 4 KiB buffer memory, fps=20, spi0.0 at 16 MHz
[ 2229.934512] fbtft_device: GPIOS used by 'ili9481':
[ 2229.934524] fbtft_device: 'reset' = GPIO25
[ 2229.934530] fbtft_device: 'dc' = GPIO24
[ 2229.934536] fbtft_device: 'led' = GPIO2
[ 2229.934542] fbtft_device: 'cs' = GPIO10
[ 2229.934562] spidev spi0.1: spidev spi0.1 125000kHz 8 bits mode=0x00
[ 2229.934578] fb_ili9481 spi0.0: fb_ili9481 spi0.0 16000kHz 8 bits mode=0x00
Then, according to the blog, I used con2fbmap 1 1
to redirect the console to my screen. It remains totally blank.
Also, I have enabled SPI in raspi-config.
So my questions are:
- Is my wiring correct?
- Is the driver I am using correct, and if not, which one should I use. There is no specific indication on the device itself...
- Is there a way to test if my screen is still working or damaged? SHould a LED be lighting up? (can't see one)
- If it is functional, Why isn't it showing anything?
Thanks !
sudo modprobe fbtft_device custom name=fb_ili9341 gpios=reset:25,dc:24,led:2 speed=16000000 rotate=90 bgr=1
in my case. The screen lights up, although nothing shows yet, but I think that's another issue.