ST7789 say nothing...

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
giorgino
Normal user
Posts: 63
Joined: 24 Oct 2022, 21:06

ST7789 say nothing...

#1 Post by giorgino » 04 Jul 2023, 00:27

excuse me, someone will become tired from my silly question but I'm going crazy...

After long time using LCD like 1306 (I2C) I was interested in the SPI family, as ST7789.
I connected this device but nothing appear :shock:

Spi configured as VSPI:
CLK: GPIO-18
MISO: GPIO-19
MOSI: GPIO-23
CS: GPIO-15
DC: GPIO-2
RES: GPIO-4

The display light on background lights on (I can fell the difference connecting BLK to GND)
but nothing appear, also using the direct command

Code: Select all

ST7789,txt,123
1209195: HTTP: st7789,txt,hello
1209264: static_file: /esp.css
1209265: Serve 304: 1688425635 /esp.css
1216874: Webserver 1 Arguments: 0: 'cmd' length: 14
1216875: HTTP: st7789,txt,123
1216937: static_file: /esp.css
1216938: Serve 304: 1688425635 /esp.css
I can read changes in the output:
CursorX:0
CursorY:205
so it seems to works, but the display doesnt show nothing.

Any ideas?

PS the displays are good, I've tested them with a direct Arduino sketch and they work

thank you in advance (as always)

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ST7789 say nothing...

#2 Post by Ath » 04 Jul 2023, 09:10

- Did you configure the correct display model/pixels? There are some differences in initialization, causing some models not to work with wrong settings.
- Can you also connect the BLK to a GPIO pin, and set the brightness (should be 100% by default)?
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ST7789 say nothing...

#3 Post by Ath » 04 Jul 2023, 22:21

I've just validated here with an ESP32 having a ST7789 135x240px display, updated to today's state of "mega" branch, and all is working as intended.

What TFT/graphics library did you use in your Arduino sketch?
/Ton (PayPal.me)

giorgino
Normal user
Posts: 63
Joined: 24 Oct 2022, 21:06

Re: ST7789 say nothing...

#4 Post by giorgino » 05 Jul 2023, 12:53

What TFT/graphics library did you use in your Arduino sketch?
It was the TFT espi

SOLVED:
My tft was a 240x240 without CS , I've bought another one from waveshare with more connection (CS too) and finally this works correctly

Perfect !

CS pin? I guess I need to study more about SPI protocol...

thank you
giorgio

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ST7789 say nothing...

#5 Post by TD-er » 05 Jul 2023, 12:59

When using SPI, you have a few pins (clock, MISO, MOSI) for the data in and out (Master In Slave Out and the other direction)
And a CS pin for each device connected to this SPI bus.
CS is Chip Select, meaning you need to select which device you want to address.

So if you didn't have a CS pin on the display, you can only use that device on the SPI bus and nothing else as it will probably react to all SPI data being sent on that bus.

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ST7789 say nothing...

#6 Post by Ath » 05 Jul 2023, 13:02

giorgino wrote: 05 Jul 2023, 12:53 SOLVED:
Great! :)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests