ST77916 #3477
Replies: 37 comments 135 replies
-
Hello @Basitadam
From another project Because the library |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Basitadam, would be nice if you can share it, thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
|
I decided to post my files, but they are not working yet, only the display backlight turns on and that's it🙂
and
The archive contains files for the platformio and libraries By the way, a remark, when I compile under
then after loading the firmware
There are no reboots and only the display backlight turns on, because I can't yet write code for normal display initialization. Since the device |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, My solution is based on TFT_eSPI 2.5.43 and ESP32 3.0.4 board libraries. With Arduino IDE 2.3.2. My MCU is ESP32-S3 on an ESP32-S3-Zero board. Attached are the all TFT_eSPI files and an Arduino sample sketch.
I made some trials to run in DMA mode. There might be some extra lines commented in files. Hope these help and make it their way into the new version of TFT_eSPI (with professionally edited versions of course) BR, |
Beta Was this translation helpful? Give feedback.
-
|
@Basitadam I'm having studied your display a little, I realized that your solution is not suitable for the You are using a classic connection to the
Which changes things dramatically and is not yet supported by the library. |
Beta Was this translation helpful? Give feedback.
-
|
@brightproject you are correct. My display has 15pins but QSPI one has 20. I have QSPI module also: Hoped I could change the communication mode to simple SPI via These type of pins have pull-up / pull-down resistor located on display flat cable. But not on this one. Here are my setup, MCU and sample visuals: Tim |
Beta Was this translation helpful? Give feedback.
-
|
Hello, If i can a question, did you test it with all rotation ? (by your function setRotation). Maybe there is a little bug on it. For me Screen is not center on 2 kind of rotation (setRotation(2); and setRotation(1); i think). I make an example with a LVGL_METER, and it's not center on those rotation. And that make parasite en bottom or right on the screen. Did you see that too ? (sorry for my English) Julien |
Beta Was this translation helpful? Give feedback.
-
|
Hi @julienGowind. Thank you, I didn't check it really. I just checked that rotation works. Now I looked at the code, I realized I did not set TFT_HIGHT, TFT_WIDTH. They are in TFT processor init file, so should library should work but you can try these: 1- include height and width in user select file ( Setup27tk_1_8Round_ST77916_ESP32.h ) 2- include height and width in Arduino sketch 3- in Adruino sketch 4- Or maybe it is the nature of some rotations: Some rotations are like flip or mirror in nature. Defining absolute coordinates like tft.setCursor(90,120) might be causing to see as if not centered. To test this put a circle or rectangle at the middle of the screen. Center point of circle/rectangle must be (180,180). Try doing rotations now. The circle/rectangle should not change position. Let me know the results please. BR,
|
Beta Was this translation helpful? Give feedback.
-
|
Hi, great job! I’m really glad someone has tackled this topic. I bought the same 15-pin touchscreen display. However, before diving into the touch functionality, I first want to get it running in general. I'm having an issue, though. Despite placing the files in the correct folders — TFT_Drivers, User_Setups, and modifying TFT_eSPI.cpp and TFT_eSPI.h — the display remains black. Here’s how I’ve connected it: And the definition in User_Setup.h: #define TFT_MISO -1 I’m also not sure how to set it up so the display operates in SPI mode. Is that the default operating mode? How should I configure the jumper settings? Thank you for your response, and great job! I’m also looking forward to the part where you explain the touch setup. Take care! |
Beta Was this translation helpful? Give feedback.
-
|
TouchPad : Not tested yet |
Beta Was this translation helpful? Give feedback.
-
|
Hi, I have a question because I want to generate a 360x360 sprite (to cover the entire screen). However, I know that the sprite size is limited by the ESP32's RAM capacity. (Now I use it esp32 DevKitC) Do you know how to solve this problem? Is it possible to expand the RAM or cache size? In my project assumptions, I wanted to manage 3 such displays independently at the same time. Processing power wouldn’t be an issue, but I can see that the cache memory already is. |
Beta Was this translation helpful? Give feedback.
-
|
question: has anyone got the integrated 1.85" ESP32-S3 device from Waveshare: https://www.waveshare.com/wiki/ESP32-S3-LCD-1.85 to work with TFT_eSPI? |
Beta Was this translation helpful? Give feedback.
-
|
Good day @Basitadam and @uzi18 🙂
To easily connect to the display inside the It seemed to me that this is not such a difficult task, the main thing is to understand it correctly. The initial entry point is the file
Which includes the file
Which is where the main Declaring the library in the code
We include the settings files
Which have the display driver we need added
Inside which the required driver is specified
And the necessary pins.
initialization of the display and the After several attempts and code editing, it was successfully assembled.
but the display is not yet filled with red. If we think about this together, then perhaps display output will be implemented. I downloaded the project archive for I deleted the
Link to the archive
|
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately this is way beyond my skill set, but it would great if someone smarter than me would figure it out. |
Beta Was this translation helpful? Give feedback.
-
|
@ChrisZang0815 you see error - Invalid pin 23 |
Beta Was this translation helpful? Give feedback.
-
|
Hi, whats the latest set of patches for the TFT_eSPI library? I downloaded the zip by the OP, have the correct pins, even used the diagram by the OP, used 100Ω res on GND, connected LEDA to 3V (5V should also work as its 3 LEDs in series) have the correct verified GPIO to LCD pins, every single one, one by one, using ESP32-S3 Hardware SPI pins as per datasheet. LCD connected using FPC 15 Pin 0.5 PCB converter board (so, almost impossible to make a mistake with wrong pins) all tested with multimeter and I get a blank screen on both my LCDs. Seems the backlight is permanently ON, I can't turn it ON or OFF no matter if I connect directly to a pin. 100Ω Resistor is between LEDK and GND. So, I know I have everything setup correctly. Double checked my TFT_eSPI config file, USE_HSPI_PORT is also correctly defined. I have used this library with other displays with no issues, but going crazy with this ST77916 so either I have two bad units (very unlikely) or the zip file from the OP is not the most current patch to the library. Also have the "Exact" unit (no touch) from Aliexpress: |
Beta Was this translation helpful? Give feedback.
-
|
They seem to be in order. 2- Can you run this ino and send its serial output :
|
Beta Was this translation helpful? Give feedback.
-
|
2.7 V is about the forward voltage of some white LEDs, and it's also the
typical minimum voltage for a lot of mobile phone ICs.
Lohi
…On Wed, Jul 30, 2025, 17:40 Vladislav ***@***.***> wrote:
Would you agree with me that this points to the LCDs being defective?
The datasheet says 2.7 volt, a very strange voltage.
I have a st77916 with a QSPI bus and there are 3.3 volt.
Your initiative with a 5 volt resistor does not seem very good to me.
—
Reply to this email directly, view it on GitHub
<#3477 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBMPKS5QVMEFV3C3QGOJDD3LDRQTAVCNFSM6AAAAABN4C2PX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGOJTGYYDOMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Thanks!! really helpful! I will ditch the multimeter, just follow the traces and image reference here on a spare FPC and re-wire. |
Beta Was this translation helpful? Give feedback.
-
|
I'll try again next week. I believe they don't work because I fried them. I know this because on my tests I was noticing how hot the flex PCB was getting, after your re-wire suggestion LED now is more dim and flex PCB is cold to the touch, so yes, definitely fried, by me. Thanks anyway for the help, I'll follow up next week when I get the new ones I ordered. |
Beta Was this translation helpful? Give feedback.
-
|
@Basitadam & @brightproject just wanted to give you an update.... ended up following your advise. Was able to use LovyanGFX without modifications (there is clearly a typo in one of their drivers) they list it as ST77961 (which does NOT exists) is in reality ST77916 (our round 1.8 inch LCD) tested some of my gauges and they worked with no issues and the sprites/draw function is 3 times faster with LovyanGFX compared to TFT_eSPI which is impressive! again, thanks again for all the help. I ended up choosing LovyanGFX as it was an easier migration from TFT_eSPI considering I do sprites/rotate/pivot for my gauges which LovyanGFX supports out of the box. |
Beta Was this translation helpful? Give feedback.
-
|
@BojoteX Hi, could you please share the driver definition? I don't seem to be able to find it. |
Beta Was this translation helpful? Give feedback.
-
|
very general question: can someone tell me which Arduino graphic libraries support QSPI? |
Beta Was this translation helpful? Give feedback.
-
|
OK, I hope that someone can help me here: this board does not have a DC pin I copied the file libraries\LovyanGFX\src\lgfx\v1\panel\Panel_ST77916.hpp to Panel_ST77961.hpp and edited the file so that all references to "77916" inside the file got replaced with "77961" I am using an ESP32 Dev board Here is my code: #include <LovyanGFX.hpp> class LGFX : public lgfx::LGFX_Device public: LGFX(void) } LGFX display; int i=0; void setup(void) delay (1000); Serial.println (F(" ")); display.init(); display.setTextSize((std::max(display.width(), display.height()) + 255) >> 8); display.fillScreen(TFT_BLACK); uint32_t count = ~0; display.setTextColor(TFT_RED); display.setTextColor(0xFF0000U); display.drawRect(30,30,display.width()-60,display.height()-60,count*7); display.endWrite(); The sketch runs but the display stays black. |
Beta Was this translation helpful? Give feedback.
-
|
You’re right that the driver usually comes with the library. The confusion here is between two layers: Type (controller): ST77916 LovyanGFX includes a panel driver for ST77916, but its mainline path targets SPI variants. Your board is QSPI, which speaks a different wire protocol. Driving a QSPI module with an SPI config keeps the screen black even if the panel “type” is correct. I see only two possible options: A) Match TYPE + BUS B) Change hardware |
Beta Was this translation helpful? Give feedback.
-
|
Hmmmm, ok. All I'm really looking for is a round display that has a diameter that is between 1.5 and 1.6 inch. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Hello @ChrisZang0815 To embed According to the label on your display's cable,
You have a Do you agree that this makes the code more readable?😀 class LGFX : public lgfx::LGFX_Device
{
lgfx::Panel_ST77961 _panel_instance;
lgfx::Bus_SPI _bus_instance;
lgfx::Light_PWM _light_instance;
public:
LGFX(void)
{
{
auto cfg = _bus_instance.config();
cfg.spi_host = SPI2_HOST; // Select the SPI to use. ESP32-S2,C3: SPI2_HOST or SPI3_HOST /
// ESP32: VSPI_HOST or HSPI_HOST
cfg.spi_mode = 0; // Sets the SPI communication mode (0 to 3)
cfg.freq_write = 80000000; // 80000000
cfg.freq_read = 16000000; // 16000000
cfg.spi_3wire = false;
cfg.use_lock = true;
cfg.dma_channel = SPI_DMA_CH_AUTO; // 1
cfg.pin_mosi = 23; // same as SDA
cfg.pin_miso = -1;
cfg.pin_sclk = 18;
cfg.pin_dc = 27;
_bus_instance.config(cfg);
_panel_instance.setBus(&_bus_instance);
}
{
auto pcfg = _panel_instance.config();
pcfg.pin_cs = 5;
pcfg.pin_rst = 33;
pcfg.pin_busy = -1;
pcfg.memory_width = 360;
pcfg.memory_height = 360;
pcfg.panel_width = 360;
pcfg.panel_height = 360;
pcfg.offset_x = 0;
pcfg.offset_y = 0;
pcfg.offset_rotation = 0;
pcfg.invert = true;
pcfg.rgb_order = true;
_panel_instance.config(pcfg);
}
setPanel(&_panel_instance);
{
auto cfg = _light_instance.config(); // Set the backlight control. (Delete if not required.)
cfg.pin_bl = 14;
cfg.invert = false;
cfg.freq = 5000;
cfg.pwm_channel = 0;
_light_instance.config(cfg);
_panel_instance.setLight(&_light_instance);
}
setPanel(&_panel_instance);
}
};
#include <LovyanGFX.hpp>
#include <lgfx_user/LGFX_ESP32_ST77916.hpp>
LGFX display;
void setup(void)
{
display.init();
display.setTextSize((std::max(display.width(), display.height()) + 255) >> 8);
display.fillScreen(TFT_BLACK);
}
uint32_t count = ~0;
void loop(void)
{
display.startWrite();
display.setRotation(++count & 7);
display.setColorDepth((count & 8) ? 16 : 24);
display.setTextColor(TFT_RED);
//display.drawNumber(display.getRotation(), 16, 0);
display.drawNumber(display.getRotation(), 120, 120);
display.setTextColor(0xFF0000U);
display.drawString("R", 30, 16);
display.setTextColor(0x00FF00U);
display.drawString("G", 40, 16);
display.setTextColor(0x0000FFU);
display.drawString("B", 50, 16);
delay (500);
display.drawRect(30,30,display.width()-60,display.height()-60,count*7);
display.drawFastHLine(0, 0, 10);
display.endWrite();
}Can you tell me please, what this line of code does?😀 I looked at your code, and according to the lines:
Are you trying to electrical connect the display via I don't see where you assigned the Please also provide the file, which can be found by pressing You have a strange path to this file.
The library entry should be made once and written like this:
And finally, there are quite a few manufacturers of But I'm not using an In general, to work with displays, you must have sufficient qualifications and understanding of the code, otherwise it will be like walking in the dark. |
Beta Was this translation helpful? Give feedback.
-
|
Has anyone managed to get a 1.85" display working using lvgl and the UI from squareline studio? I want to make a speedometer on an esp32 wroom board and a 1.85" st77916 screen. 15pin. |
Beta Was this translation helpful? Give feedback.




























Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Made a working driver set for ST77916. I can share anyone interested
BR,
Tim
Beta Was this translation helpful? Give feedback.
All reactions