Is it possible to use LCDs with ST7735&ST7739 controllers??

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
JohnW
Normal user
Posts: 10
Joined: 19 Oct 2019, 20:27

Is it possible to use LCDs with ST7735&ST7739 controllers??

#1 Post by JohnW » 17 Nov 2019, 09:25

Hello,

Is it possible to use LCDs with ST7735 or ST7739 with ESP Easy? I have several of them: some with I2C, some with SPI.

Thanks!

dieter114
New user
Posts: 1
Joined: 02 Feb 2017, 11:55

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#2 Post by dieter114 » 18 May 2020, 16:54

Hi John,

i wrote a driver for a ST7735 Controller.
You can see it here: https://forum.fhem.de/index.php/topic,1 ... 9.html#new
this is a Forum in german.
Please write if y intrested in it.

Greetings Wolfdieter

Ostoja
New user
Posts: 2
Joined: 21 Mar 2018, 09:30
Location: Russia

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#3 Post by Ostoja » 10 Aug 2020, 06:53

Good day! I still couldn't find your driver on the forum.

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#4 Post by Ath » 10 Aug 2020, 10:42

Ostoja wrote: 10 Aug 2020, 06:53 Good day! I still couldn't find your driver on the forum.
I hope to start a plugin (or extend an existing one) for ST7735 (128x128px/128x160px/80x160px) soon (a.o. waiting for hardware from Ali), and I'll investigate if ST7789 (240x240px/320x240px) can also be supported (but often that last resolution is driven by ILI9341 -> Plugin P095).

Edit: ST7739 either doesn't exist or is a display panel only (45 pin connection, won't work on any ESP without support-hardware), so I assume ST7789 is intended
Edit2: Corrected resolutions per chip.
/Ton (PayPal.me)

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#5 Post by Ath » 13 Aug 2021, 22:19

Back, one year later :D

I've just added a PR #3761, adding a ST7735/ST7789 TFT driver.

Downloads can be made available for testing, if desired, either download yourself from the Github Actions build, or request here. It is included in the DISPLAY builds.
/Ton (PayPal.me)

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#6 Post by Ath » 15 Aug 2021, 20:36

For those interested in testing one of the supported displays (ST7735: 128x128, 128x160, 80x128, ST7789 240x320, 240x240, 240x280, all connected via SPI), here are .bin files from the Github Actions build:
ESPEasy_display_ESP8266_4M1M.zip
(2.3 MiB) Downloaded 294 times
ESPEasy_display_ESP32_4M316k.zip
(2.03 MiB) Downloaded 219 times
/Ton (PayPal.me)

Quart
Normal user
Posts: 45
Joined: 16 Jul 2019, 10:08
Location: Sweden
Contact:

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#7 Post by Quart » 07 Sep 2021, 13:38

Thanks, got the screen to work.
But must I send a command for each value I need to show on the display.
I have OLED SSD1306/SH1106 Framed that I can easy tell what to show on screen when editing the screen

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#8 Post by Ath » 07 Sep 2021, 14:15

There is an interval setting on that page (nearly at the bottom), that is set to 0 by default, but when set to any reasonable value, like 30 or 60 (seconds), every interval the information you entered, including [taskname#valuename] replacements, will be updated on the display.
If you only want to update when an actual value changes, then a rule would be helpful:

Code: Select all

on bme#temperature do
  TaskRun,ST7735 // Use the name of your task, of course, you can also use the task number :-)
endon
Did you get the latest update from Github, or just the 3 weeks old build above?
Just for fun I've uploaded the latest, currently available, build here:
ESPEasy_display_ESP8266_4M1M.zip
(2.31 MiB) Downloaded 253 times
ESPEasy_display_ESP32_4M316k.zip
(2.02 MiB) Downloaded 212 times
If you need a special ESP32 build that supports User-defined SPI pins (needed for some TTGO units with color display, available from a separate PR, only applicable for ESP32), you can download that from the linked issue
/Ton (PayPal.me)

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#9 Post by plin2 » 07 Mar 2024, 11:47

Hi,

even though this post is a little bit older, maybe somebody can help me. I got myself a LilyGO/TTGO T-display (https://de.aliexpress.com/item/1005005970553639.html). According to https://espeasy.readthedocs.io/en/lates ... /P116.html this device is supported. The delivered device had the demo sketch running.

My Display isn't showing any reaction to the ESPEasy commands that I'm sending to the device.

I successfully flashed ESP_Easy_mega_20240229_display_ESP32_4M316k.factory.bin. I could configue everything in ESPEasy using the https://ae01.alicdn.com/kf/Sf3a09022885 ... 9a744p.png pinout explanation.

Hardware
SPI Interface
Init SPI: User-defined ...
GPIO → CLK: GPIO-18
GPIO ← MISO: GPIO-17 (just to park it here)
GPIO → MOSI: GPIO-19

Device
Device: Display - ST77xx TFT

Actuator
GPIO → CS (optional): GPIO-5
GPIO → DC: GPIO-16
GPIO → RES (optional): GPIO-23

Device Settings
GPIO → Backlight (optional): GPIO-4

TFT display model: ST7789 135 x 240px

Is my defintion of the SPI-Interface and GPIO-pins correct?

Any suggestion?

Thanks
Peter

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#10 Post by TD-er » 07 Mar 2024, 13:41

GPIO 16 and 17 can be a bit tricky as those are also used for PSRAM.
If there is no PSRAM present, those pins can still have some high frequency signal on them every now and then.

See: https://espeasy.readthedocs.io/en/lates ... e-on-esp32

Do you see the backlight light up when you toggle its GPIO pin manually using the gpio command (tools page, just enter "gpio,4,1" and "gpio,4,0" )

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#11 Post by Ath » 07 Mar 2024, 13:44

You could check if the BL (Backlight) is actually working (there is usually some extra light visible when peeking behind the lcd), or force the BL pin to on by sending the command gpio,4,1 (the percentage configured is sent using PWM, but manually switching it on should bring it into 'visible' range).

NB: Is your board actually equipped with 16MB Flash, as the link you used suggests? If so then you could have used a MAX build, as that includes all plugins and features, but it will require you to completely re-configure the unit, as the flash layout is different, so settings won't be migrated. When picking a MAX build, please use one that has LittleFS in the name, as in the near future, all ESP32 builds will have to migrate to LittleFS, SPIFFS is deprecated and will be removed from newer releases in the underlying framework.
/Ton (PayPal.me)

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#12 Post by plin2 » 07 Mar 2024, 17:21

Quick response in-between:

When I enter "gpio,4,1" and "gpio,4,0" on the tools page the display goes from black to dark grey and vice versa.

I tried to change GPIO ← MISO: from 17 to 'None', that gave me an error saying that SPI is not configured properly. So I tried GPIO-37 instead. Changed Device GPIO → DC to 'None'.
Resetted device. Still the same problem.

Next steps:
  • install a demp sktech, to see if the device is still functional
  • validate if it's a 16MB device and then flash an ESP Mega sketchl

bidrohini
Normal user
Posts: 101
Joined: 03 Nov 2022, 16:24

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#13 Post by bidrohini » 07 Mar 2024, 17:32

ST7735 is compatible with ESPeasy. Here I found this document: https://espeasy.readthedocs.io/en/lates ... /P116.html

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#14 Post by TD-er » 07 Mar 2024, 17:41

Maybe also check if it really is this display controller chip.
Wouldn't be the first time a seller sells something different from what was advertised.

bidrohini
Normal user
Posts: 101
Joined: 03 Nov 2022, 16:24

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#15 Post by bidrohini » 07 Mar 2024, 19:16

If you ever think of switching to any other display, you can choose the TFT 2.4 inches ILI9341/XPT2046 or TFT ILI934x/ILI948x: https://www.theengineeringprojects.com/ ... tions.html
These are compatible with Espeasy:
https://espeasy.readthedocs.io/en/lates ... /P095.html
https://home.nobbo.de/home/doku-espeasy ... /P095.html

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#16 Post by plin2 » 07 Mar 2024, 20:31

TD-er wrote: 07 Mar 2024, 17:41 Maybe also check if it really is this display controller chip.
Wouldn't be the first time a seller sells something different from what was advertised.
Well, I took a picture of the device and enlarged it. I only can identify the ESP32, the CP2102 and the Flash storage. I guess the graphics chip is underneath the display ...
Any other way/tool to identify the chip or test the SPI interface?

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#17 Post by plin2 » 07 Mar 2024, 20:37

bidrohini wrote: 07 Mar 2024, 19:16 If you ever think of switching to any other display, ...
Well, I have other displays already :D. Just shopped around Aliexpress and found this interesting combination of controller plus display.

As an engineer giving up is no option, I want to know where the problem is or which mistake I made ;) ;

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#18 Post by Ath » 07 Mar 2024, 20:48

plin2 wrote: 07 Mar 2024, 11:47 ... a LilyGO/TTGO T-display (https://de.aliexpress.com/item/1005005970553639.html).
This is the exact model you are using? If so, what hardware version you have (should be on the silk-screen somewhere), as LiliGO has a 'habit' of changing some, sometimes crucial, details on newer hardware revision. :o (but they're not unique at that...), as TD-er suggested, they may have their product documentation 'incomplete' or not yet updated for this revision.
Last edited by Ath on 07 Mar 2024, 20:55, edited 1 time in total.
/Ton (PayPal.me)

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#19 Post by Ath » 07 Mar 2024, 20:52

plin2 wrote: 07 Mar 2024, 17:21
  • validate if it's a 16MB device and then flash an ESP Mega sketchl
That should be available at the Info page, similar to this:
Screenshot - 07-03-2024 , 20_51_28.png
Screenshot - 07-03-2024 , 20_51_28.png (7.66 KiB) Viewed 1019 times
BTW, this is a screenshot of my (4MB) TTGO T-Display ;)
/Ton (PayPal.me)

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#20 Post by Ath » 07 Mar 2024, 21:04

Have you tried to put some plain text, or variables from the Tools/System Variables page like %ip% or %sysbuild_filename%, in a few of the Line 1..Line 24 fields? That's the easiest way to put some content on the display 8-)
/Ton (PayPal.me)

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#21 Post by plin2 » 07 Mar 2024, 21:33

Ath wrote: 07 Mar 2024, 20:48
plin2 wrote: 07 Mar 2024, 11:47 ... a LilyGO/TTGO T-display (https://de.aliexpress.com/item/1005005970553639.html).
This is the exact model you are using? If so, what hardware version you have (should be on the silk-screen somewhere), as LiliGO has a 'habit' of changing some, sometimes crucial, details on newer hardware revision. :o (but they're not unique at that...), as TD-er suggested, they may have their product documentation 'incomplete' or not yet updated for this revision.
>This is the exact model you are using?
Well, that is what I ordered.

> If so, what hardware version you have?
Well, I can offer you the attached photo.Ogn the front it only says TTGO, just like this one https://espeasy.readthedocs.io/en/lates ... 0_ttgo.png

And from the Device info

ESP Board
ESP Chip ID: 13504596 (0xCE1054)
ESP Chip Frequency: 240 MHz
ESP Crystal Frequency: 40 MHz
ESP APB Frequency: 80 MHz
ESP Chip Model: ESP32-D0WDQ6
ESP Chip Features: Wi-Fi bgn / BLE
ESP Chip Revision: 3.1
ESP Chip Cores: 2
ESP Board Name: Espressif Generic ESP32 16M Flash ESPEasy 4M Code/OTA 8M FS

Storage
Flash Chip ID: Vendor: 0xEF Device: 0x4018
Flash Chip Real Size: 16384 kB
Flash IDE Size: 16384 kB
Flash Chip Speed: 80 MHz
Flash IDE Speed: 40 MHz
Flash IDE Mode: DIO
Flash Writes: 0 daily / 0 boot
Sketch Size: 2274 kB (4096 kB free)
Max. OTA Sketch Size: 4096 kB (4194304 bytes)
Little FS Size: 8124 kB (7960 kB free)
Page size: 256
Block size: 8192
Number of blocks: 1015
Attachments
LiLyGO_TDisplay.jpg
LiLyGO_TDisplay.jpg (1011.93 KiB) Viewed 1011 times

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#22 Post by plin2 » 07 Mar 2024, 21:42

Ath wrote: 07 Mar 2024, 21:04 Have you tried to put some plain text, or variables from the Tools/System Variables page like %ip% or %sysbuild_filename%, in a few of the Line 1..Line 24 fields? That's the easiest way to put some content on the display 8-)
Just tried it, no luck.

I still have only a dark grey screen, so it's hard to read if (at all) anything is displayed. I changed the font size to factor 5 with white text on red background. I don't see any change.

Is my SPI configuration correct? Since the device was shown on the plugin page, I thought the correct configuration was just a question of looking it up and providing the information. Am I the only one using that device???

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#23 Post by TD-er » 07 Mar 2024, 21:49

The picture on Ali Express states "IPS ST7789V 1.14 Inch"
So that's a different display.

Just for the record, it also states these pins:
MOSI: 19
SCLK: 18
CS: 5
DC: 16
RST: 23
BL: 4

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#24 Post by Ath » 07 Mar 2024, 22:07

plin2 wrote: 07 Mar 2024, 21:42 I still have only a dark grey screen, so it's hard to read if (at all) anything is displayed. I changed the font size to factor 5 with white text on red background. I don't see any change.
Hmm, setting GPIO,4,1 to lighten up the backlight (or setting the backlight percentage in the plugin configuration close to 100%) should show any content loud and clear.
plin2 wrote: 07 Mar 2024, 21:42 Is my SPI configuration correct? Since the device was shown on the plugin page, I thought the correct configuration was just a question of looking it up and providing the information. Am I the only one using that device???
That's the correct way to do that, and I assume you also enabled the plugin (that's quite obvious, I know, but still...)

The markings on the board are quite minimal, so not much to detect there. It does have 16MB Flash, as displayed, and the Winbond 25Q128 chip confirms that too.
At the official lilygo product page I think I've found this 16MB board, the one marked "T-Display [DE]" should be available in 4MB and 16MB, like yours, but there is no indication of other hardware differences. The flash chips are 1:1 pin-compatible, so it can still use a single board revision.

My board is probably the same revision, as it has the same XX1 printed near the antenna, it's just equipped with 4MB Flash. And that's working as intended :)

Technically, it's possible the display is broken.
/Ton (PayPal.me)

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#25 Post by plin2 » 08 Mar 2024, 10:15

Ath wrote: 07 Mar 2024, 22:07 Technically, it's possible the display is broken.
Well, that was one of my first thoughts. After delivery it was fine. I handled it carefully. Only possible option to me is a misconfiguration in ESPEasy ???
Ath wrote: 07 Mar 2024, 22:07 At the official lilygo product page I think I've found this 16MB board, the one marked "T-Display [DE]" should be available in 4MB and 16MB, like yours,
Interesting aspects from the LILYGO site:
  • TFT_MIS is mentionend, but connected to N/A. What should I use in ESPEasy if a 'wire'/connection is missing?
  • Support/Quick start: I started following the detailed example, until now without success. Have to find other sketches that might work. After reset I only see
    ets Jul 29 2019 12:21:46
    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0030,len:1184
    load:0x40078000,len:13232
    load:0x40080400,len:3028
    entry 0x400805e4
    Nothing on the screen, nothing on serial print.

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#26 Post by Ath » 08 Mar 2024, 13:07

plin2 wrote: 08 Mar 2024, 10:15
  • TFT_MIS is mentionend, but connected to N/A. What should I use in ESPEasy if a 'wire'/connection is missing?
ESPEasy checks if all pins are configured for the Userdefined SPI configuration, so None is not an option. I usually select an otherwise unused input pin like GPIO34 if it's not needed, but your GPIO37 would be just as fine.
plin2 wrote: 08 Mar 2024, 10:15
  • Support/Quick start: I started following the detailed example, until now without success. Have to find other sketches that might work. After reset I only see
    ets Jul 29 2019 12:21:46
    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0030,len:1184
    load:0x40078000,len:13232
    load:0x40080400,len:3028
    entry 0x400805e4
    Nothing on the screen, nothing on serial print.
Have you disabled the Serial logging, in the Tools/Advanced setting? That's usually the cause for not showing any logs. For logging via the web log interface, it's required to have the Javascript loaded on that page, that retrieves the logging from the unit (the MAX build has that embedded and serves it when needed), so it's also important to not block any Javascript execution for ESPEasy.

Is the unit still responding to the Web UI?
/Ton (PayPal.me)

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#27 Post by plin2 » 08 Mar 2024, 17:38

ok, sorry. I should have been clearer. "Support/Quick start: I started following the detailed example ..." was referring to the description on the LILYGO product website.

Right now the situation is as follows:

ESPEasy Mega is working on the device. The NodeMCU is working, I can configure everything necessary, only the display remains so dark that I can't see/read anything on it. When I change the device brightness in ESPEasy to 1...10...100 I can see a difference on the display. 100% brings it to dark grey. But GPIO-4 isn't using SPI.

Right now I'm trying to figure out if the display is working with one of the standard sketches e.g. provided in the TFT_eSPI lib. I'm searching and testing to make sure the example has the right SPI interface settings and is suitable for the ST7789V. It's not always clear which pins are in effect in which example. Until now the screen remains black/dark grey.

Well, off course there is the option that the display is gone. At least the ESP32 is still usable. I bought the device for 5.09 EUR in a sale. Right now the device is at 9.80 EUR as a sale down from 29,87 EUR. I could buy myself a new T-Display, but who tells me that I'm not running into the same problem when trying the change the sketch and settings? I just would like to understand what went wrong (beside the natural cause of death by hardware defect).

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#28 Post by Ath » 08 Mar 2024, 21:39

Ah, that's clearing things up a bit. I thought we where exclusively talking about ESPEasy :roll:, but NP.

GPIO4 has nothing to do with SPI, it's configured in the plugin to control the backlight intensity for the display.

The TFT_eSPI library has been my source for some of the displays we support in P116 (ST77xx), as documentation for these chips is from sketchy to non-existent :o but AFAICS, the ST7789 shouldn't be too problematic, as the different variants (S, V) seem to be quite compatible.

For that kind of discount prices, I'd simply get another display just for fun, but you could ofcourse also source a different display board with one of the supported chips, and connect that to an ESP (preferably an ESP32 or one of the derived types like S3, C3 or C6).

It's really hard to do a post-mortem on this type of hardware, ESD (if that's the cause...) may have kicked in at some point, or maybe it still just ill-configured :?
/Ton (PayPal.me)

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#29 Post by TD-er » 08 Mar 2024, 21:48

Does LilyGo have some pre-compiled sketch for these displays you could try to upload?
Then you can verify if the display is still working.

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#30 Post by plin2 » 09 Mar 2024, 00:07

Hi guys,

I was about to give up, especially since the amount of similar devices and information might be misleading. During my working in IT my motto always was 'Giving up is not an option - but it's not always easy'. And guess what?

The display works again!

I had the same idea that TD-er had, but didn't find the right test sketch until just now. I found it at https://github.com/Xinyuan-LilyGO/TTGO-T-Display. That firmware is actually the one that was on the device at shipping.

Unfortunately that means degugging continues :D .

Now I'm on the road to ESPEasy again 8-) .
---

P.S. Output on the Arduino monitor reads:

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:8740
load:0x40080400,len:5788
entry 0x4008069c
Start
eFuse Vref:1121 mV

---

P.P.S. The factory test firmware sketch seems to be this one https://github.com/Xinyuan-LilyGO/TTGO- ... ryTest.ino

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#31 Post by plin2 » 09 Mar 2024, 10:18

It's the library.

Good morning. I tried to compile/flash the https://github.com/Xinyuan-LilyGO/TTGO- ... ryTest.ino with the help of Arduino - but got a compilation error. Currently installed was the TFT_eSPI lib from Bodmer.

When I substituted it with the lib from https://github.com/Xinyuan-LilyGO/TTGO-T-Display the sketch compiled fine, flashed and ran on the T-Display.

Didn't check out the difference between the TFT_eSPI libs yet, but the primary question is:

Is it possible to configure the device correctly with the distribution version of ESPEasy mega or would it be better to compile the ST77XX plugin with the LilyGO TFT_eSPI lib and update it on the device?

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#32 Post by TD-er » 09 Mar 2024, 10:31

LilyGo does make very nice boards, but they also have the tendency to make a single example barely working with the then current SDKs.
And repeat this every time they make a new board.
In the past they even updated the boards with different (incompatible) parts without even updating the version number printed on the board (e.g. early versions of the T-beam and other LoRa boards)

So I rather not include LilyGo libraries or patched versions of other libs to make it work with their boards.

Still we can have a look at what makes those boards work, document any specifics in the code and merge this into ESPEasy.
I got the feeling Ton is perhaps already looking into his drawers full of boards to see if it is available and if not with his other hand navigating to TinyTronics.nl or AliExpress to order one :)

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#33 Post by Ath » 09 Mar 2024, 18:07

I've opened a pull request #5003 that adds some alternative initialization sequences for ST7789 displays, as described in the PR.

A build is running for the PR, in this Actions run, where you can download the desired binary for testing, if you are logged in with your (free) GH account (or download the combined .zip file that's created as the last step in the build process).

Please report in the PR (or here) your findings with these alternative initializations.
/Ton (PayPal.me)

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#34 Post by Ath » 09 Mar 2024, 20:24

NB: I tried all configurations available for ST7789 on my 4MB T-Display unit, and all that changed for me was the display colors, the text was still readable, though in odd/unexpected colors. So I'm quite curious to hear how it works out on your hardware.

NB2: I've ordered the device you linked to, above, but it'll be a week to 10 days before it arrives.
/Ton (PayPal.me)

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#35 Post by plin2 » 09 Mar 2024, 21:48

Hi Ton,

thanks. I compared the LILYGO version of the TFT_eSPI lib with the one from Bodmer.

Code: Select all

-rw-r--r--  1 root  root   17787 Mar  9 13:18 User_Setup_Select.h.diff
-rw-r--r--  1 root  root     848 Mar  9 13:18 ST7789_2_Defines.h.diff
-rw-r--r--  1 root  root     920 Mar  9 13:18 ST7789_Defines.h.diff
-rw-r--r--  1 root  root     331 Mar  9 13:20 Setup25_TTGO_T_Display.h.diff
There are some minor changes in ST7789_2_Defines.h, ST7789_Defines.h and Setup25_TTGO_T_Display.h. User_Setup_Select.h got quit a lot of additional code for ST7789 starting approx. at line 260. Maybe that is where things take a new path that's not favorable for this device.

Anyway, I'll check your new version and let you know what's happening..

Later,
Peter

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#36 Post by plin2 » 09 Mar 2024, 23:04

Current state:

flashed Y:\Temp\Bin-ESP32-max_ESP32_16M8M_LittleFS-20240309_PR_5003_8215939347\ESP_Easy_mega_20240309_max_ESP32_16M8M_LittleFS.factory.bin

configured hardware and device

accidentially TFT display model was set to ST7735 -> bright screen, little white square, rest looke like tv snow after end of broadcast

corrected TFT display model to ST7789 -> the usual dark grey screen, can't identofy text in line 1
corrected TFT display model to ST7789 (alt 1)-> gpio,4,1-> no effect, st77xx,txt,Hallo -> no effect
corrected TFT display model to ST7789 (alt 2)-> gpio,4,1-> no effect, st77xx,txt,Hallo -> no effect
corrected TFT display model to ST7789 (alt 3)-> gpio,4,1-> no effect, st77xx,txt,Hallo -> no effect

changed to TFT display ST7735 again, at least I get a white square, gpio,4,1-> has effect, st77xx,txz,64,64,XXX -> shows text

looks like the ST7735 is working pretty well, just that the geometrics of the display is not correct and there is an offset

[Update]

ran some structured tests (see attached images):

##############################################

ST7735 128 x 128 px
-------------------
st77xx,txc,black,white

st77xx,clear

st77xx,rf,1,1,10,10,red -> no-show
st77xx,rf,1,118,10,10,orange -> no-show
st77xx,rf,118,1,10,10,yellow -> no-show
st77xx,rf,118,118,10,10,green,red -> yellow

st77xx,r,54,54,10,10,red -> yellow
st77xx,r,118,54,10,10,orange -> dark yellow
st77xx,r,54,118,10,10,yellow -> red

##############################################

ST7735 80 x 160 px
-------------------
st77xx,txc,black,white

st77xx,clear

st77xx,rf,1,1,10,10,red -> no-show
st77xx,rf,1,118,10,10,orange -> no-show
st77xx,rf,70,1,10,10,yellow -> no-show
st77xx,rf,118,118,10,10,green,red -> yellow

st77xx,r,54,54,10,10,red -> turquoise
st77xx,r,34,118,10,10,orange -> dark turquoise
st77xx,r,54,118,10,10,yellow -> blue
Attachments
ST7735_80x160.jpg
ST7735_80x160.jpg (760.39 KiB) Viewed 803 times
ST7735_128x128.jpg
ST7735_128x128.jpg (696.06 KiB) Viewed 803 times

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#37 Post by plin2 » 10 Mar 2024, 11:52

next checks:

flashed Y:\Temp\Bin-ESP32-display_ESP32_4M316k-20240309_PR_5003_8215939347\ESP_Easy_mega_20240309_display_ESP32_4M316k.factory.bin

no chnage vs. the max version. All ST7789 settings remain dead, ST7735 works better

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#38 Post by Ath » 10 Mar 2024, 14:34

To avoid having to type or copy a lot of commands to be executed for testing the display, you can put that information in the Line 1 .. Line 24 fields in the configuration.
My usual content, depending on the hardware, usually looks something like this:

Code: Select all

Line 1: ~txc,yellow,blue~~txs,3~ESPEasy
Line 2: ~txc,blue,white~~txs,2~ST7789
Line 3: ~txc,white,navy~~txs,1~%ip%
Line 4: %sysbuild_filename%
Line 5: Sunrise %sunrise% - sunset %sunset%
Line 6: RSSI: %rssi%
and for lines 6..24 the text Line with the number of the line, just to see the alignment
I've also set the rotation to +90, so the long %sysbuild_filename% fits within the width of the display, as even at font size 1 it's rather long, and the default colors to white (fg) and navy (bg), so the entire display gets a background color.

When trying the ST7735 configurations, I get similar results like you have shown, with a partially used display, also with the colors mapped wrong, like I have when testing the alternative ST7789 configurations.

Edit:
This is what it looks like, backlight 10%
PXL_20240310_133506470.jpg
PXL_20240310_133506470.jpg (188.66 KiB) Viewed 760 times
(the abc... after the sunset I didn't include in the code above ;))
/Ton (PayPal.me)

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#39 Post by plin2 » 11 Mar 2024, 14:44

Ath wrote: 10 Mar 2024, 14:34 To avoid having to type or copy a lot of commands to be executed for testing the display, you can put that information in the Line 1 .. Line 24 fields in the configuration.
My usual content, depending on the hardware, usually looks something like this:

Code: Select all

Line 1: ~txc,yellow,blue~~txs,3~ESPEasy
Line 2: ~txc,blue,white~~txs,2~ST7789
Line 3: ~txc,white,navy~~txs,1~%ip%
Line 4: %sysbuild_filename%
Line 5: Sunrise %sunrise% - sunset %sunset%
Line 6: RSSI: %rssi%
and for lines 6..24 the text Line with the number of the line, just to see the alignment
Good idea, thanks. In the meantime I got some more gadgets from China to play with ( Aliexpress is having some sort of sale). I realize that I'm loosing track of my devices (18 Wemos, 16 ESP), especially since there is a wider range of hardware variations in the NodeMCU family than in the Wemos D1 mini family. I started with some wget exports, got the idea that a database would help, maybe fed by an XML export of the sysinfo & configuration, looked at the config.dat, thought that you might have a similar problem.

Is there any way to create an XML file with all the relevant information from sysinfo and the device configuration? Should/could I open a feature request?

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#40 Post by TD-er » 11 Mar 2024, 14:57

You can have a look at the /json page.

plin2
Normal user
Posts: 15
Joined: 07 Mar 2024, 11:18

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#41 Post by plin2 » 15 Mar 2024, 13:33

While I'm waiting: How can I use the Sensor HX711 and SSD1306 on a WemosD1?
  • HX711 -> is in Collection A
  • SSD1396 -> is in NORMAL DISPLAY CLIMATE
I could use another hardware with 16 MB, but in terms of power/speed a WemosD1 would do.

The TTGO device has a Flash Chip Real Size of 16384 kB, which would allow me to flash the max version of ESP with all sensors/devices.

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#42 Post by Ath » 15 Mar 2024, 13:36

Collection A also includes all plugins from Normal, but with all debug logging and a few features (different per plugin, but not really documented) disabled to make it fit in the limited space.
/Ton (PayPal.me)

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

Re: Is it possible to use LCDs with ST7735&ST7739 controllers??

#43 Post by Ath » 17 Mar 2024, 22:26

I've been able to fix this issue, by adding the 135x240 resolution for the ST7735 driver, as that's what this T-Display unit seems to be using.
This GH Actions run can be used for testing.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests