Uncategorized

st7789 LCD forum record

Asked 
Viewed 79 times
1

I’m trying to connect to this LCD ( sry 4 japanese page:( use translate plz ) This monitor driver is ST7789, 7pins.[GND VCC SCL SDA RES DC BLK] And now I’m connecting to pi like this https://imgur.com/a/BFWUAXN

I’m using Python_ST7789 library. The installation was success and The example program is running correctlly, but display is blank. is my wiring incorrect ? is this display garbage?

PS: Sry for my Stup1d English help me plz.


(1) Pimonori 1.3″ IPS SPI 240×240 pixel Colour LCD Breakout – £15

pimoroni lcd


ST7789 Python Libraries For Rpi

(1) solinnovay/Python_ST7789 (AdaFruit GPIO, PIL/Pillow, 2018sep)

(2) pimoroni/st7789-python (Pimoroni, RPI.GPIO, spidev, 2019sep)


ST7789 LDC Wiring Diagram

wiring


ST7789 LCD 7/12 pin Description for troubleshooting

pin descriptions


ST7789 7 pin and 12 pin Layout

TaoBao ST7789 1.3″ TFT IPS LCD Module – ¥18

7/12pin layout


ST7789 LCD Wiring For Second Screen Using SPI Chip Select CS1

How to connect ST7789 LCD to SPI Bus 1 as 2nd screen?


 New contributor

Your Answer

 ichirow is a new contributor. Be nice, and check out our Code of Conduct.
community wiki
Post Your Answer

 

Q: How to connect ST7789 LCD to Raspberry Pi

ichirowI’m trying to connect to this LCD ( sry 4 japanese page:( use translate plz ) This monitor driver is ST7789, 7pins.[GND VCC SCL SDA RES DC BLK] And now I’m connecting to pi like this imgur.com/a/BFWUAXN I’m using Python_ST7789 library. The installation was success and The example progra…

tlfong01

tlfong01
2309
Hi @ichirow, Welcome and nice to meet you. You might find my answer to the following question helpful to newbies getting started: How to connect ST7789 LCD to SPI Bus 1 as 2nd screen? raspberrypi.stackexchange.com/questions/104846/…. Please feel free to ask me more newbie questions! 🙂
Google does not know how to translate your LCD Japanese spec into English or Chinese, but I compare your IPS with what I am studying seems to be the same config. So I think my answer referred above should still be helpful to you. (1) TFT LCD 240×240 IPS 65K 3.3V SPI ST7789 -¥1,069 amazon.co.jp/gp/product/B07P7W8D8J/… (2) DisplayModule ST7789VW 1.3″ 240×240 IPS TFT SPI – $10 displaymodule.com/products/…
ichirow

ichirow
@tifong01 Hi thank you for answer for my question, I read that question, but I couldn’t see first picture so I couldn’t get know how to connect LCD to Pi sry:(
@tifong01 thank you for tell me the product, I checked it. it seems exactly same
tlfong01

tlfong01
2309
About the connection, you might like to read Refs 2, 3 of my answer. They include wiring instructions. Let me know if you find which connection confuses you. PS – Actually my answer also includes a wiring chart and a schematic.
Or do you need this pinout picture: pinout.xyz ?
ichirow

ichirow
4
@tlfong01 the confusing point is wiring…. I think SPI is correct, DC and VCC are suspect. 18 is a good pin for DC, Pi is providing power correctly? How to find the wiring errors, and what is the BLK(I know use as turn to backlight but signals)
@tlfong01 Mercy me about missspell your name btw…. thx about pinout.xyz. I can find pics like that and wiring to pi everytimes.
tlfong01

tlfong01
2309
Ah, no problem about misspelling my user name. Actually I did not notice it! 😦 I usually cut and paste the user name, especially when the username is long, to prevent typo errors and also to save time. About the wiring problem: (1) There are two kinds of connectors: (a) 7 pin, and (b) 12 pin. I think you are using the 7 pin version. Correct me if otherwise. Now let me take a look and come back to you later.
Ah, I read the schematic again and found it badly drawn and not well commented for newbies. So I improved it. Please read my updated answer and let me know if it is all clear now. Thanks. Cheers.
Hi @ichirow, By the way, your username reminds me of the world famous 铃木一朗 and 王貞治. I know 王貞治 better because he has “only one foot”! 🙂
ichirow

ichirow
yst 0:30
@tlfong01 sry, late response, Yes I’m using 7 pin version. sry where is updated comment. yep, same name, this name came from real name (It is not real name) 一 meaning a first male of family and 郎 meaning a man. I like this name.
tlfong01

tlfong01
It is my answer to the question, already referred in my first comment above. See update at the bottom of answer: raspberrypi.stackexchange.com/questions/104846/…. Ah, jogging time for me, see you late this evening or tomorrow. Cheers. Ah yes, I am 次郎, second son of the family.
joan

joan
You need to find out if the Adafruit library is using hardware SPI or software SPI. Given a speed of 40 MHz is mentioned in the code that suggests hardware SPI (software SPI in Python would be about 50 kHz, not 40 MHz). If it is using hardware SPI you are using the wrong GPIO.
ichirow

ichirow
4
@tlfong01 reviewed wiring and some fix and debug but blank….. maybe hardware is dead. good luck jogging! cu later
@joan hi, thank you for reviewing but some people have already works with this program…. wondering asking only my probrem?
@joan sry, I got misunderstand, what is the hardware SPI and software SPI in Adafruits libraries. Can I find and fix it?
joan
joan
I do not know. I do not use the Adafruit libraries.
ichirow
ichirow
@joan okay, I referred the source code. It seems hardware gpio.github.com/adafruit/Adafruit_Python_GPIO/blob/master/… it is wrong…?
joan

joan
yst 0:30
The code can do hardware (using spidev) or software (using bit bang). I don’t know which it is doing in your case. If you are using SPI hardware you need to use the dedicated SPI GPIO. See pinout.xyz GPIO 7-11.
ichirow

ichirow
4
@joan I figured…. Okay, I’m using hardware SPI GPIO (may be misunderstanding…. its about learning progress.) and I am testing this Device(LCD) connect to Arduino with another reference (simple-circuit.com/arduino-st7789-ips-tft-display-example) but it is still blank, so this LCD is garbage’s probability is very high. So, I ordered other screens with Amazon….
tlfong01

tlfong01
2309
Hi @ichirow, Ah, I think even your ST7789 does not work in both Rpi and Arduino, the probability of your LCD module faulty is NOT very high. I think the probability is lower than other things, like software bug etc. I have taken the liberty to compile your wiring into one compete diagram, and pasted into your question, so that everybody can help double check if every end to end wiring is correct.
Hi @ichirow, I googled and found 2 python libraries for Rpi. I have included them in your question. The second library looks better, but I not tried either. One potential problem is that the driver is originally from AdaFruit, modified for Rpi, but there might be OS incompatibility problems, eg, work for jessie, but not stretch, or buster.
ichirow

ichirow
4
@tlfong01 I slept well and read well your answer of another question. thank you for adding the figures editting from my figures. I cannot running examples so wirings is the points. I am trying anything wiring in the progress. ST7789 is endure miswiring btw? e.g. overvoltage, reverse currents etc.
@tlfong01 Thank you for googled, I couldn’t find the second library. I’m going to test that. gracias. grazie. merci.
11 hours later…
tlfong01

tlfong01
2309
yst 11:19
@ichirow (1) I have also taken liberty to add a pin description to your question, so that (a) Other newbies can share your success/failure experience, and avoid reinventing new wheels, or frying more LCD modules! 🙂 (b) Other ninjas can look at your pin description and suggest you how to troubleshoot, eg, (i) After initialization, how to use a multi-meter to measure the pin voltage levels (should RST High or Low, DC Hig or Low?)
(ii) When getting a blank screen, or picture too slow, how to use a multi-meter (Note 1) to measure the SPI signal pins (Should CS be very Low, CLK middle, …? Note 1 – Of course rich guys should use a oscilloscope, but poor guys can use blinking LEDs, push buttons, multi-meter to also do the troubleshooting job effectively.
2 hours later…
tlfong01

tlfong01
2309
yst 12:54
You asked what is the use what chip select signal CS0 and CS1. This is what I answered in the answer I referred. You need to wiki and google SPI to understand everything. But for my dual ST7789 LCD project, it is something like this. I am connecting two LCD modules to the same SPI0 bus, each module as the same SCLK, MOSI, MISO wires connected. The only difference is that module A CS pin is connected to SPI CS0 pin, and Module B’s CS pin is connected to SPI CS1 pin.
Now if I set CS0 Low, and CS1 High, then Module A will be selected, and will talk to Rpi through SPI CLK, MOSI, MISO wires. At the same time, Module B is NOT selected, and will not respond to SPI signals.
Now the catch is this. For your 7 pin module, the LCD’s CS wire is CONNECTED TO GROUND, therefore ALWAYS SELECTED, no matter Rpi’s CS0, CS1 are High or Low, LCD does not care, always respond. So what I suggested to the OP of that question is suggesting him to extract the LCD’s CS wire, DO NOT CONNECT TO GROUND, but connect to Rpi SPI CS1, then this modified LCD will be selected if Rpi SPI CS1 is low.
I have been trying to explain this to a coople of other user asking why they can not use two LCDs. But they don’t try to understand what I am talking about, and gave up, … 😦
ichirow
ichirow
yst 13:29
@tlfong01 I copy that. will do commander. check the broken or not.
ichirow

ichirow
yst 13:47
@tlfong01 I never give up. Thank you for explain. I understood it. chipselect is sending signal for select the device. I going to try to again. I found good to wiring reference for 7pin device in japanese. He got the library and same probrem.
9 hours later…
tlfong01

tlfong01
2309
yst 22:20
@ichirow Yes, it is a good idea to try out different alternatives before you finally decide how to start, and you can always change direction if you found you have made a wrong decision. About the st7789 python library, I found the Pimoroni one more promising, because it is NOT that AdaFruit oriented, or more compatible to Rpi. AdaFruit st7789 python libraries uses AdaFruit.GPIO, and microPython/circuitPython, which are not that compatible to Rpi.
I have not made my final decision which library to start. Perhaps you can google harder and see if there any better st7789 libraries than the two we are talking. Ha a nice day. See you tomorrow.
14 hours later…
tlfong01

tlfong01
2309
12:04
@ichirow Yes, never give up, BUT in case of difficulties, you need to look back and see if you have the prerequisites to overcome them. For example, I don’t know that much about image tools PIL, I need to google and read about it, to get at least a rough idea, because I start installing it.
Anyway, I have just installed Pimoroni st7789python library, without any problem, except I found PIL seems preinstalled in my Rpi buster 2019sep26 release. Here is the installation record you might like to compare and contrast later, when you try it: (1) st7789 library install record: penzu.com/p/2283cf99
My weblinks here seems incorrectly shortened by the forum. In case you find my link broken again, you may like to try the following: “h t t p s://penzu.com/public/2283cf99”. Good luck, cheers/

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: