BostonBatman
Posts: 3
Joined: Sun Jul 14, 2019 10:06 pm

Wiring 2.2" tft to pi zero w [Issues]

Sun Jul 14, 2019 11:27 pm

Hey everybody,

First time poster. I'm trying to wire up some tft lcds I got from China to my pi. I found the code to enable spi and add the screen-specific drivers, but I'm running into the rudimentary issue of not being confident in the wiring. All of adafruits walkthroughs are for 8 and 20 pin (iirc) screens and mine is only 7.

I'm adding the supporting files for the screen and what I thought the right configuration would be, but I have a few questions about whether the pin layout is correct for the zero. I won't be using I2C, so I'm just looking for clarity on that.

https://www.amazon.com/MakerFocus-Displ ... B07P9X3L7M is a near identical screen with the same pin layout, so if you use that pin out and the attached r pi zero w gpio pin layout for a 1:1 matching game, that would be the greatest thing ever, haha. Thanks!!!

User avatar
HermannSW
Posts: 1307
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Wiring 2.2" tft to pi zero w [Issues]

Thu Jul 18, 2019 1:48 am

You have the pin description on display board, and explanation of the pins on amazon product page (5th image).

I used instructions in Kolban's (free) ebook on Raspberry Pi to easily connect ili9341 SPI displays:
https://www.raspberrypi.org/forums/view ... p?t=157618

After you will have successfully connected your display, you might want to connect two SPI displays to Pi Zero[W]:
https://www.raspberrypi.org/forums/view ... 4#p1217930
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

BostonBatman
Posts: 3
Joined: Sun Jul 14, 2019 10:06 pm

Re: Wiring 2.2" tft to pi zero w [Issues]

Thu Jul 25, 2019 4:21 pm

HermannSW wrote:
Thu Jul 18, 2019 1:48 am
You have the pin description on display board, and explanation of the pins on amazon product page (5th image).
The issue is the screen is actually from aliexpress and just uses very similar pinouts. The main issue is the multiple locations for the pins to connect and whether they are required or can be either spot. I guess I was looking more for a guide like, "mosi -gpio 17" etc or a "gpio 23 can be either x or y, but it's typically the touchscreen input for most screens". The main issue is the difference in the pinout from the adafruit store products and their respective tutorials.

User avatar
HermannSW
Posts: 1307
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Wiring 2.2" tft to pi zero w [Issues]

Fri Jul 26, 2019 6:06 pm

BostonBatman wrote:
Thu Jul 25, 2019 4:21 pm
The main issue is the multiple locations for the pins to connect and whether they are required or can be either spot. I guess I was looking more for a guide like, "mosi -gpio 17" etc or a "gpio 23 can be either x or y, but it's typically the touchscreen input for most screens". The main issue is the difference in the pinout from the adafruit store products and their respective tutorials.
Your display has 7 connections:
GND, VCC, SCL, SDA, RES, DC, BLK

RES, DC, BLK can be connected to any GPIO you like and are specified in the modprobe statement:

Code: Select all

sudo modprobe fbtft_device name=rpi-display gpios=reset:23,dc:24,led:18 rotate=90
Besides VCC and GND these are the only fixed GPIOs for SPI0:

Code: Select all

(SDA=)MOSI_____19 MOSI
(SCL=)SCK______23 SCLK
https://www.raspberrypi.org/forums/view ... 6#p1213885

Finally I moved pins into central 8 pin group of GPIO pins (pins 17-24), started with this command:

Code: Select all

sudo modprobe fbtft_device name=rpi-display gpios=reset:25,dc:24,led:27 rotate=90
https://www.raspberrypi.org/forums/view ... 6#p1214626

I used those co-located pins to superglue the eight male connectors together in order to have my own GPIO connector (I did superglue the female pins as display connector as well):
Image
⇨https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://gitlab.freedesktop.org/HermannSW/gst-template
https://github.com/Hermann-SW/fork-raspiraw
https://twitter.com/HermannSW

Return to “Interfacing (DSI, CSI, I2C, etc.)”