rzeldent / esp32-smartdisplay

PlatformIO library LVGL Drivers for Sunton Smart display boards (CYD Cheap Yellow Display). This library supports these boards without any effort. ESP32-2432S024N/R/C, ESP32-2432S028R/C, ESP32-3248S035R/C, ESP32_8048S070N/C
https://github.com/rzeldent/platformio-espressif32-sunton
GNU General Public License v3.0
385 stars 69 forks source link

Support for JC4827W543C (successor of Sunton 4827S043C) #160

Open ohlolol opened 4 months ago

ohlolol commented 4 months ago

Hi Folks,

i just got my new Display i think its a new revision of the 4827S043C.

details of the board in my other post: https://github.com/HASwitchPlate/openHASP/issues/713

Arduino_DataBus bus = new Arduino_ESP32QSPI( 45 / cs /, 47 / sck /, 21 / d0 /, 48 / d1 /, 40 / d2 /, 39 / d3 */);

would be nice

ange007 commented 2 months ago

I am also waiting for support. This screens are essentially like a CYD and i want to use one set of libraries. Unfortunately I was unable to understand the configuration parameters.

Board examples: https://github.com/profi-max/JC4827W543_4.3inch_ESP32S3_board

rzeldent commented 2 months ago

Hi,

I made a quick attempt, as I do not own this board, so this might also be a goog starting point for you..

The changes are in the branch nv3041a of https://github.com/rzeldent/esp32-smartdisplay and https://github.com/rzeldent/platformio-espressif32-sunton.

Maybe this works?

ange007 commented 2 months ago

Hi @rzeldent , thanks. I try build this version.

  1. Wrong declared variables: NV3401A => NV3041A image

  2. Class for other lvgl version? image

rzeldent commented 2 months ago

Fixed these issues. Am/Was having some issues with PlatformIO handing and unable to compile locally....

ange007 commented 2 months ago

After your updates and changes JC4827W543C.json:

{
  "build": {
    ...
    "extra_flags": [
     ...
      "'-D DISPLAY_NV3041A_SPI'",
      "'-D NV3041A_SPI_HOST=SPI2_HOST'",
      "'-D NV3041A_SPI_DMA_CHANNEL=SPI_DMA_CH_AUTO'",
      "'-D NV3041A_SPI_BUS_MOSI_IO_NUM=21'",
      "'-D NV3041A_SPI_BUS_MISO_IO_NUM=48'",
      "'-D NV3041A_SPI_BUS_SCLK_IO_NUM=47'",
      "'-D NV3041A_SPI_BUS_QUADWP_IO_NUM=40'",
      "'-D NV3041A_SPI_BUS_QUADHD_IO_NUM=39'",
      "'-D NV3041A_SPI_BUS_MAX_TRANSFER_SZ=(LVGL_BUFFER_PIXELS*sizeof(lv_color16_t))'",
      "'-D NV3041A_SPI_BUS_FLAGS=0'",
      "'-D NV3041A_SPI_BUS_INTR_FLAGS=0'",
      "'-D NV3041A_SPI_CONFIG_CS_GPIO_NUM=45'",
      "'-D NV3041A_SPI_CONFIG_DC_GPIO_NUM=2'",
      "'-D NV3041A_SPI_CONFIG_SPI_MODE=SPI_MODE0'",
      "'-D NV3041A_SPI_CONFIG_PCLK_HZ=24000000'",
      "'-D NV3041A_SPI_CONFIG_TRANS_QUEUE_DEPTH=10'",
      "'-D NV3041A_SPI_CONFIG_LCD_CMD_BITS=8'",
      "'-D NV3041A_SPI_CONFIG_LCD_PARAM_BITS=8'",
      "'-D NV3041A_SPI_CONFIG_FLAGS_DC_AS_CMD_PHASE=false'",
      "'-D NV3041A_SPI_CONFIG_FLAGS_DC_LOW_ON_DATA=false'",
      "'-D NV3041A_SPI_CONFIG_FLAGS_OCTAL_MODE=false'",
      "'-D NV3041A_SPI_CONFIG_FLAGS_LSB_FIRST=false'",
      "'-D NV3041A_DEV_CONFIG_RESET_GPIO_NUM=GPIO_NUM_NC'",
      "'-D NV3041A_DEV_CONFIG_COLOR_SPACE=ESP_LCD_COLOR_SPACE_BGR'",
      "'-D NV3041A_DEV_CONFIG_BITS_PER_PIXEL=16'",
      "'-D NV3041A_DEV_CONFIG_FLAGS_RESET_ACTIVE_HIGH=false'",
      "'-D NV3041A_DEV_CONFIG_VENDOR_CONFIG=NULL'",
     ...
    ],
    ...
  },
  ...
  "upload": {
    "flash_size": "4MB",
    "maximum_ram_size": 327680,
    "maximum_size": 4194304,
    ...
  },
}

The firmware is loaded, but the display is empty (although the backlight works). COM monitor - also empty and does not even show the DEBUG information.

01GOD commented 2 months ago

Been trying to get any of the demos that board came with to function. Sigh...seemingly did everything in the PDF it came with, but the Arduino IDE still has sadly shown many errors when trying to compile anything. And yes, did put the lv_config.h into the main dir of the libraries dir. Is it necessary to copy paste that lv_config file from a specific demo folder to main Arduino lib folder when compiling a specific demo's .ino?

Thanks in advance for answering soon and posting any relevant links about how to use that board.

prashantchawla commented 1 month ago

@01GOD The demos for the board are only compatible with lvgl version 8 (and not 9). Can you try to install version 8 from arduino libraries? By default it installs version 9.

01GOD commented 1 month ago

@01GOD The demos for the board are only compatible with lvgl version 8 (and not 9). Can you try to install version 8 from arduino libraries? By default it installs version 9.

Saw now. Been visiting china and moved to another city and was sadly attacked by crowds of hateful chinese yelling anti-non-chinese profanity and so on, and My body was also violently attacked by four of those chinese men.

I have been using LVGL 8.3.3 for a while. I can try flashing the newest edition of [esp32-smartdisplay] today.

Had found out part of the issue was that the shop I bought that board from in china supplied the wrong zip file with it. So after that got the correct zip file and tried the 3 LVGL demos that do thankfully function.

rzeldent commented 1 week ago

Terrible to hear that. Hope you're well and take care!

And nice to hear it works now!

ange007 commented 1 week ago

@rzeldent I do not know what the conversation but this fee is still not working (and cannot for the reason I pointed above - the wrong description of the board). I added PR for compilation (although the board still does not start as it should).