-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for GC9503V LCD Driver (Panlee and WirelessTag 86 Box) #2417
Comments
+1. I bought 2 of them, by accident. INstead of gathering dust in a box, it would be nice to have it supported. |
+1 and also needs the touch sensor FT6336U |
Yeah i also bought 4inch ESP32 S3 Touchable Screen Durable WiFi 86 Central Control Panel Widely Use on eBay. This device also have the Display GC9503V on board. https://www.ebay.de/itm/355184665406 Looking forward for support of that device. PS: There is support for Arduino https://github.com/moononournation/Arduino_GFX/blob/master/library.properties |
+1 |
OpenHASP seems to work on these too. |
+1 |
2 similar comments
+1 |
+1 |
Hello, any progress with gc9503v support so far? This chip becomes pretty popular driver for inexpensive boards and more of them appear on the market. It already has Arduino support which can be used as a reference design point as I understand. |
The st7701s driver should work for it, probably just need a custom init sequence. |
any progress? I got it working but over MQTT through custom sketch in Arduino IDE |
So you must have the init sequence - you can configure that in YAML with the ST7701S driver. |
Can the init sequences (or the ST7701S component) be debugged in some way or is it just trial and error? This is my configuration, mainly referenced on openhasp as that works great (but the poor homeassistant integration and old lvgl makes it a pain to work with in my setup): display:
- platform: st7701s
show_test_card: true
id: GC9503V
color_order: RGB
dimensions:
width: 480
height: 480
reset_pin:
number: 41 # LCD autoreset, use RGB_VS (TFT_VSYNC) signal to keep working
allow_other_uses: true
de_pin: 40
hsync_pin:
number: 42
inverted: false
vsync_pin:
number: 41
inverted: false
allow_other_uses: true
pclk_pin: 39
pclk_inverted: true
pclk_frequency: 15MHz
data_pins:
red:
- 18 # R1
- 8 # R2
- 3 # R3
- 46 # R4
- 10 # R5
green:
- 14 # G0
- 13 # G1
- 12 # G2
- 11 # G3
- 16 # G4
- 17 # G5
blue:
- number: 45 # B1
allow_other_uses: true
- number: 48 # B2
allow_other_uses: true
- 47 # B3
- 0 # B4
- 21 # B5
# SPI
cs_pin: 38
data_rate: 10MHz ## should be 15, not supported
spi_mode: 0
hsync_pulse_width: 10
hsync_front_porch: 8
hsync_back_porch: 40
vsync_pulse_width: 10
vsync_front_porch: 8
vsync_back_porch: 40
init_sequence:
- [ 0xF0, 0x58, 0x05, 0x00 ]
- [ 0xF1, 0x00, 0x00, 0x00 ]
- [ 0xF2, 0x00, 0x00, 0x00 ]
- [ 0xF6, 0x00, 0x20, 0x00 ]
- [ 0xF9, 0x44, 0x3F, 0x00 ]
- [ 0xF8, 0x22, 0x22, 0x22 ]
- [ 0xF3, 0x00, 0x00, 0x00 ]
- [ 0xF4, 0x00, 0x00, 0x00 ]
- [ 0xF5, 0x00, 0x00, 0x00 ]
- [ 0x71, 0x55 ]
- [ 0x6F, 0x00 ]
- [ 0x62, 0x01 ]
- [ 0x63, 0x00 ]
- [ 0x64, 0x01 ]
- [ 0x65, 0x00 ]
- [ 0x66, 0x20 ]
- [ 0x67, 0x00 ]
- [ 0x68, 0x20 ]
- [ 0x69, 0x00 ]
- [ 0x6A, 0x20 ]
- [ 0x6B, 0x00 ]
- [ 0x6C, 0x20 ]
- [ 0x6D, 0x00 ]
- [ 0x6E, 0x20 ]
- [ 0x6F, 0x00 ]
- [ 0x70, 0x00 ]
- [ 0x61, 0x00 ]
- [ 0x82, 0xB0 ]
- [ 0x83, 0x00 ]
- [ 0x84, 0xC4 ]
- [ 0x85, 0x00 ]
- [ 0x86, 0xC4 ]
- [ 0x87, 0x00 ]
- [ 0x88, 0xC4 ]
- [ 0x89, 0x00 ]
- [ 0x8A, 0xC4 ]
- [ 0x8B, 0x00 ]
- [ 0x8C, 0x00 ]
- [ 0x81, 0x00 ]
- [ 0xB1, 0x10 ]
- [ 0xB2, 0x10 ]
- [ 0xB3, 0x10 ]
- [ 0xB4, 0x10 ]
- [ 0xB5, 0x10 ]
- [ 0xB6, 0x10 ]
- [ 0xB7, 0x10 ]
- [ 0xB8, 0x10 ]
- [ 0xB9, 0x10 ]
- [ 0xBA, 0x10 ]
- [ 0xBB, 0x05 ]
- [ 0xBC, 0x05 ]
- [ 0xBD, 0x05 ]
- [ 0xBE, 0x05 ]
- [ 0xBF, 0x05 ]
- [ 0xC0, 0x05 ]
- [ 0xC1, 0x05 ]
- [ 0xC2, 0x05 ]
- [ 0xC3, 0x05 ]
- [ 0xC4, 0x05 ]
- [ 0x11 ]
- delay 120ms
- [ 0x29 ]
# Alternative from https://github.com/smartpanle/PanelLan_esp32_arduino/blob/master/src/board/bc02/bc02_rgb_spi_init.hpp, doesn't work either
# - [ 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x00 ]
# - [ 0xF6, 0x5A, 0x87 ]
# - [ 0xC1, 0x3F ]
# - [ 0xC2, 0x0E ]
# - [ 0xC6, 0xF8 ]
# - [ 0xC9, 0x10 ]
# - [ 0xCD, 0x25 ]
# - [ 0xF8, 0x8A ]
# - [ 0xAC, 0x45 ]
# - [ 0xA0, 0xDD ]
# - [ 0xA7, 0x47 ]
# - [ 0xFA, 0x00, 0x00, 0x00, 0x04 ]
# - [ 0x86, 0x99, 0xA3, 0xA3, 0x51 ]
# - [ 0xA3, 0xEE ]
# - [ 0xFD, 0x28, 0x28, 0x00 ]
# - [ 0x71, 0x48 ]
# - [ 0x72, 0x48 ]
# - [ 0x73, 0x00, 0x44 ]
# - [ 0x97, 0xEE ]
# - [ 0x83, 0x93 ]
# - [ 0x9A, 0x72 ]
# - [ 0x9B, 0x5A ]
# - [ 0x82, 0x2C, 0x2C ]
# - [ 0xB1, 0x10 ]
# - [ 0x6D, 0x00, 0x1F, 0x19, 0x1A, 0x10, 0x0E, 0x0C, 0x0A, 0x02, 0x07, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x08, 0x01, 0x09, 0x0B, 0x0D, 0x0F, 0x1A, 0x19, 0x1F, 0x00 ]
# - [ 0x64, 0x38, 0x05, 0x01, 0xDB, 0x03, 0x03, 0x38, 0x04, 0x01, 0xDC, 0x03, 0x03, 0x7A, 0x7A, 0x7A, 0x7A ]
# - [ 0x65, 0x38, 0x03, 0x01, 0xDD, 0x03, 0x03, 0x38, 0x02, 0x01, 0xDE, 0x03, 0x03, 0x7A, 0x7A, 0x7A, 0x7A ]
# - [ 0x66, 0x38, 0x01, 0x01, 0xDF, 0x03, 0x03, 0x38, 0x00, 0x01, 0xE0, 0x03, 0x03, 0x7A, 0x7A, 0x7A, 0x7A ]
# - [ 0x67, 0x30, 0x01, 0x01, 0xE1, 0x03, 0x03, 0x30, 0x02, 0x01, 0xE2, 0x03, 0x03, 0x7A, 0x7A, 0x7A, 0x7A ]
# - [ 0x68, 0x00, 0x08, 0x15, 0x08, 0x15, 0x7A, 0x7A, 0x08, 0x15, 0x08, 0x15, 0x7A, 0x7A ]
# - [ 0x60, 0x38, 0x08, 0x7A, 0x7A, 0x38, 0x09, 0x7A, 0x7A ]
# - [ 0x63, 0x31, 0xE4, 0x7A, 0x7A, 0x31, 0xE5, 0x7A, 0x7A ]
# - [ 0x69, 0x04, 0x22, 0x14, 0x22, 0x14, 0x22, 0x08 ]
# - [ 0x6B, 0x07 ]
# - [ 0x7A, 0x08, 0x13 ]
# - [ 0x7B, 0x08, 0x13 ]
# - [ 0xD1, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2A, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xE5, 0x01, 0x68, 0x01, 0xD5, 0x01, 0xD7, 0x02, 0x36, 0x02, 0xA6, 0x02, 0xEE, 0x03, 0x48, 0x03, 0xA0, 0x03, 0xBA, 0x03, 0xC5, 0x03, 0xD0, 0x03, 0xE0, 0x03, 0xEA, 0x03, 0xFA, 0x03, 0xFF ]
# - [ 0xD2, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2A, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xE5, 0x01, 0x68, 0x01, 0xD5, 0x01, 0xD7, 0x02, 0x36, 0x02, 0xA6, 0x02, 0xEE, 0x03, 0x48, 0x03, 0xA0, 0x03, 0xBA, 0x03, 0xC5, 0x03, 0xD0, 0x03, 0xE0, 0x03, 0xEA, 0x03, 0xFA, 0x03, 0xFF ]
# - [ 0xD3, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2A, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xE5, 0x01, 0x68, 0x01, 0xD5, 0x01, 0xD7, 0x02, 0x36, 0x02, 0xA6, 0x02, 0xEE, 0x03, 0x48, 0x03, 0xA0, 0x03, 0xBA, 0x03, 0xC5, 0x03, 0xD0, 0x03, 0xE0, 0x03, 0xEA, 0x03, 0xFA, 0x03, 0xFF ]
# - [ 0xD4, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2A, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xE5, 0x01, 0x68, 0x01, 0xD5, 0x01, 0xD7, 0x02, 0x36, 0x02, 0xA6, 0x02, 0xEE, 0x03, 0x48, 0x03, 0xA0, 0x03, 0xBA, 0x03, 0xC5, 0x03, 0xD0, 0x03, 0xE0, 0x03, 0xEA, 0x03, 0xFA, 0x03, 0xFF ]
# - [ 0xD5, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2A, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xE5, 0x01, 0x68, 0x01, 0xD5, 0x01, 0xD7, 0x02, 0x36, 0x02, 0xA6, 0x02, 0xEE, 0x03, 0x48, 0x03, 0xA0, 0x03, 0xBA, 0x03, 0xC5, 0x03, 0xD0, 0x03, 0xE0, 0x03, 0xEA, 0x03, 0xFA, 0x03, 0xFF ]
# - [ 0xD6, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2A, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xE5, 0x01, 0x68, 0x01, 0xD5, 0x01, 0xD7, 0x02, 0x36, 0x02, 0xA6, 0x02, 0xEE, 0x03, 0x48, 0x03, 0xA0, 0x03, 0xBA, 0x03, 0xC5, 0x03, 0xD0, 0x03, 0xE0, 0x03, 0xEA, 0x03, 0xFA, 0x03, 0xFF ]
# - [ 0x3A, 0x66 ]
# - [ 0x11 ]
# - delay 200ms
# - [ 0x29 ]
spi:
- id: lcd_spi
clk_pin:
number: 45
allow_other_uses: true
mosi_pin:
number: 48
allow_other_uses: true``` |
Pretty much. First make sure the backlight is on. Leave the SPI data rate at the default (1MHz) - it's only for setup so it doesn't have to be fast. Try SPI mode 3. |
That didn´t work either. I made another few tries but without luck. Then I found this project https://github.com/strange-v/ha_deck which is a custom component that adds another layer on top of the displays themselves but supports this exact model (WT32S3-86S/ZX3D95CE01S) and it works. My understanding, looking a bit at the code, is that the changes required to get it working with the ST7701S are more than just an init sequence (which I also tried). I was trying to make some sort of custom component Frankenstein but couldn´t make it work, I'm too rusty with C and making a display driver as the first custom component seems a bit too much |
Well, if you want any more help, you'll need to show what you've tried so far. I'd suggest providing links to the device documentation, i.e. the schematic if available, the demo code where the GPIO assignments and init code are specified, and the yaml that you have tried so far. Links to any other drivers for the display chip will also be helpful. Oh, I see much of that already above. More information is better. I'll have a further look when I have a little time. |
Sure, thanks! Here's everything I found so far:
# Rest of the yaml from the comment above
data_rate: 1MHz
init_sequence:
#HA_DECK
- [ 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x00 ]
- [ 0xF6, 0x5A, 0x87 ]
- [ 0xC1, 0x3F ]
- [ 0xC2, 0x0E ]
- [ 0xC6, 0xF8 ]
- [ 0xC9, 0x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A, 0x7A ]
- [ 0x63, 0x31, 0xe4, 0x7A, 0x7A, 0x31, 0xe5, 0x7A, 0x7A ]
- [ 0x6B, 0x07 ]
- [ 0x7A, 0x08, 0x13 ]
- [ 0x7B, 0x08, 0x13 ]
- [ 0xD1, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD2, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD3, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD4, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD5, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD6, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0x3a, 0x66 ]
# - [ 0x11, CMD_INIT_DELAY, 200 ] // Sleep Out . CMD_INIT_DELAY=0x80, so this should translate to the next line?
- [ 0x11, 0x80, 200 ]
- [ 0x29 ]
# - [ 0xFF, 0xFF ] // This is the edge case where the length would be 0xFF, so is it enough to just send a single 0xFF?
- [ 0xFF ]
I'm basically overwhelmed with all of this and not really sure on how to piece all of this together with the esphome way of doing the external components (or anything really, again way too rusty on my basic C skills) |
Only looked quickly, but this is wrong, it should just be:
The 0x29 is not needed, the driver does that. And the FF FF is just an end marker for the table, it's not to be sent. The 0x11 and delay may not be necessary but shouldn't do any harm. |
hi Clyde This is the init_sequence I tried, and there is no output on the screen. It's worth noting that the GPIO is shared. |
YAML,The backlight and touch are working properly. |
This is the yaml I'm using without success, with the correct init sequence. I checked again all the pin definitions for what should be inverted and what not. I added a reference to where I got that, hopefully I didn´t do exactly the opposite, but I think I might have tried all the combinations by now 😆 esphome:
platformio_options:
board_build.arduino.memory_type: qio_opi
board_build.arduino.psram_type: opi
board_build.f_flash: 80000000L
psram:
mode: octal
speed: 80MHz
logger:
baud_rate: 115200
level: VERBOSE
tx_buffer_size: 1024
hardware_uart: UART0
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
framework:
# type: arduino
type: esp-idf
sdkconfig_options:
# From: https://github.com/wireless-tag-com/ZX3D95CE01S-TR-4848/blob/master/sdkconfig
CONFIG_SOC_SPI_MEM_SUPPORT_OPI_MODE: "y"
CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT: "y"
CONFIG_ESPTOOLPY_FLASHMODE_QIO: "y"
flash_size: 16MB
output:
- platform: ledc
pin: 5
id: backlight_led
frequency: 1kHz
light:
- platform: monochromatic
output: backlight_led
name: Backlight
id: backlight
restore_mode: ALWAYS_ON
default_transition_length: 200ms
sensor:
- platform: htu21d
model: sht21
temperature:
name: "Temperature"
humidity:
name: "Humidity"
heater:
name: "Heater"
i2c:
sda: 15
scl: 6
frequency: 400kHz
touchscreen:
- platform: ft63x6
interrupt_pin: 4
spi:
- id: lcd_spi
clk_pin:
number: 45
allow_other_uses: true
mosi_pin:
number: 48
allow_other_uses: true
color:
- id: COLOR_CSS_TOMATO
red: 1.0000
green: 0.3882
blue: 0.2784
white: 0.0000
display:
- platform: st7701s
# update_interval: 5s
show_test_card: true
lambda: |-
it.fill(id(COLOR_CSS_TOMATO));
id: GC9503V
color_order: RGB
dimensions:
width: 480
height: 480
reset_pin:
number: 41 # LCD autoreset, use RGB_VS (TFT_VSYNC) signal to keep working
allow_other_uses: true
de_pin:
number: 40
inverted: false # https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L115
hsync_pin:
number: 42
inverted: true # hsync_polarity = 1; Means idle high. https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L106
vsync_pin:
number: 41
inverted: true # vsync_polarity = 1; Means idle high. https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L110
allow_other_uses: true
pclk_pin: 39
pclk_inverted: false # https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L116
pclk_frequency: 15MHz
data_pins:
red:
- 18 # R1
- 8 # R2
- 3 # R3
- 46 # R4
- 10 # R5
green:
- 14 # G0
- 13 # G1
- 12 # G2
- 11 # G3
- 16 # G4
- 17 # G5
blue:
- number: 45 # B1
allow_other_uses: true
- number: 48 # B2
allow_other_uses: true
- 47 # B3
- 0 # B4
- 21 # B5
# SPI
cs_pin:
number: 38
inverted: true # Active low? https://github.com/lovyan03/LovyanGFX/blob/55a0f66d9278faa596c8d51a8e8a3e537dd8f44f/src/lgfx/v1/platforms/esp32s3/Panel_RGB.cpp#L541-L548
data_rate: 1MHz # Could be up to 15
spi_mode: 0 # Idle low. https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L114
hsync_pulse_width: 10
hsync_front_porch: 8
hsync_back_porch: 40
vsync_pulse_width: 10
vsync_front_porch: 8
vsync_back_porch: 40
init_sequence:
#HA_DECK
- [ 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x00 ]
- [ 0xF6, 0x5A, 0x87 ]
- [ 0xC1, 0x3F ]
- [ 0xC2, 0x0E ]
- [ 0xC6, 0xF8 ]
- [ 0xC9, 0x10 ]
- [ 0xCD, 0x25 ]
- [ 0xF8, 0x8A ]
- [ 0xAC, 0x45 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0x7A, 0x7A ]
- [ 0x6B, 0x07 ]
- [ 0x7A, 0x08, 0x13 ]
- [ 0x7B, 0x08, 0x13 ]
- [ 0xD1, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD2, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD3, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD4, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD5, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD6, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0x3a, 0x66 ]
- [ 0x11 ]
- delay 200ms # To be possibly removed after we get it working Isn´t the ST7701S driver adding more stuff to the init sequence that shouldn't be there for the GC9503V? https://github.com/esphome/esphome/blob/dev/esphome/components/st7701s/st7701s.cpp#L163-L177 |
Again, only a quick look, but remove the inverted GPIO pin specifications. The only one that may be inverted is PCLK and if so you specify that differently. CS is definitely not inverted (it's active low, but the SPI driver handles that.) Remove the reset pin from the display - it's not connected. |
Add this to the init sequence
That sets the signal polarities. It should be the power on default, but won't hurt. |
And another suggestion - any time you try something different, make sure to power cycle the board. |
display:
- platform: st7701s
# update_interval: 5s
show_test_card: true
lambda: |-
it.fill(id(COLOR_CSS_TOMATO));
id: GC9503V
color_order: RGB
dimensions:
width: 480
height: 480
# reset_pin:
# number: 41 # LCD autoreset, use RGB_VS (TFT_VSYNC) signal to keep working
# # inverted: true
# allow_other_uses: true
de_pin:
number: 40
# inverted: false # https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L115
hsync_pin:
number: 42
# inverted: true # hsync_polarity = 1; Means idle high. https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L106
vsync_pin:
number: 41
# inverted: true # vsync_polarity = 1; Means idle high. https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L110
# allow_other_uses: true
pclk_pin: 39
pclk_inverted: false # https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L116
pclk_frequency: 15MHz
data_pins:
red:
- 18 # R1
- 8 # R2
- 3 # R3
- 46 # R4
- 10 # R5
green:
- 14 # G0
- 13 # G1
- 12 # G2
- 11 # G3
- 16 # G4
- 17 # G5
blue:
- number: 45 # B1
allow_other_uses: true
- number: 48 # B2
allow_other_uses: true
- 47 # B3
- 0 # B4
- 21 # B5
# SPI
cs_pin:
number: 38
# inverted: true # Active low? https://github.com/lovyan03/LovyanGFX/blob/55a0f66d9278faa596c8d51a8e8a3e537dd8f44f/src/lgfx/v1/platforms/esp32s3/Panel_RGB.cpp#L541-L548
data_rate: 1MHz ## should be 15, not supported
spi_mode: 0 # Idle low. https://github.com/strange-v/ha_deck/blob/main/components/hd_device_wt32s3_86s/LGFX.hpp#L114
hsync_pulse_width: 10
hsync_front_porch: 8
hsync_back_porch: 40
vsync_pulse_width: 10
vsync_front_porch: 8
vsync_back_porch: 40
init_sequence:
#HA_DECK
- [ 0xF0, 0x55, 0xAA, 0x52, 0x08, 0x00 ]
- [ 0xF6, 0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x08, 0x15, 0x08, 0x15, 0x7A, 0x7A ]
- [ 0x60, 0x38, 0x08, 0x7A, 0x7A, 0x38, 0x09, 0x7A, 0x7A ]
- [ 0x63, 0x31, 0xe4, 0x7A, 0x7A, 0x31, 0xe5, 0x7A, 0x7A ]
- [ 0x6B, 0x07 ]
- [ 0x7A, 0x08, 0x13 ]
- [ 0x7B, 0x08, 0x13 ]
- [ 0xD1, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD2, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD3, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD4, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD5, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0xD6, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xE0, 0x03, 0xea, 0x03, 0xFa, 0x03, 0xFF ]
- [ 0x3a, 0x66 ]
- [ 0x11 ]
- delay 200ms # To be possibly removed after we get it working
- [ 0xB0, 0 ] This is the log output for the display section. I see the data pins order is mixed up by the st7701s driver, does the gc9503v need the same treatment?
About the power cycling, I'll do that thanks |
I suspect you have the data pins in the wrong order, but that will only affect the color, you should still see an image of some sort. though it could be very dark. |
Another point - I believe there are multiple hardware variants of the board. It would pay to double check that you are using the right data for the board you have. Also have you actually compiled any other firmware and got a display? |
The backlight is at full brightness, so I think even if dark, I should be able to see something.
And OpenHASP: |
To add to @GiorgioAresu working firmware list, I am currently experimenting with using this display using Tasmota firmware (using this already previously mentioned Issue as a how to arendst/Tasmota#19489) and it works almost perfectly, there are some weird wobbly-like artifacts around the image though that I am trying to understand the cause of. |
After a few days of struggling with the code, I managed to achieve a small success. |
That's a good step forward! |
Check my code: https://github.com/sEbola76/gc9503v |
This turns out to be caused by a recent change that was meant to automate the setting of |
Describe the problem you have/What new integration you would like
Would like to add support for the GC9503V LCD Driver so ESPHome can be installed on all current generation Panlee and Wireless Tag ESP32 3.95" Displays. These look identical to the Sonoff NSpanel Pro.
Please describe your use case for this integration and alternatives you've tried:
Would like to use ESPHome as a base for a home automation thermostat with this Panlee panel.
Additional context
The text was updated successfully, but these errors were encountered: