Created
May 4, 2025 17:19
-
-
Save Ierlandfan/6b61a1b6063197917cb9530b07867f02 to your computer and use it in GitHub Desktop.
Spotpear ESP32-S3-N16R8-AI-DeepSeek-XiaoZhi-XiaGe-Qwen-DouBao-1.85-inch-Round-LCD-esphome-display-test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: guition-360x360-jc3636w518 | |
friendly_name: Guition 360x360 jc3636w518 | |
platformio_options: | |
friendly_name: JC3636W518CN | |
board_build.flash_mode: dio | |
board_build.f_flash: 80000000L | |
board_build.f_cpu: 240000000L | |
esp32: | |
board: esp32-s3-devkitc-1 | |
framework: | |
type: esp-idf | |
sdkconfig_options: | |
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y" | |
CONFIG_ESP32S3_DATA_CACHE_64KB: "y" | |
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y" | |
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y | |
CONFIG_SPIRAM_RODATA: y | |
advanced: | |
enable_idf_experimental_features: "true" //For 120mhz | |
psram: | |
mode: octal | |
speed: 120MHz | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
encryption: | |
key: "" | |
ota: | |
- platform: esphome | |
password: "6" | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "Guition-360X360-Jc3636W518" | |
password: "" | |
captive_portal: | |
output: | |
- platform: ledc | |
pin: GPIO05 | |
id: backlight | |
light: | |
- platform: monochromatic | |
name: "Backlight" | |
output: backlight | |
restore_mode: ALWAYS_ON | |
# QSPI peripheral for DBI4‑wire interface | |
spi: | |
id: display_qspi | |
type: quad | |
clk_pin: GPIO40 | |
data_pins: [GPIO46, GPIO45, GPIO42, GPIO41] | |
display: | |
- platform: qspi_dbi | |
id: main_display | |
model: CUSTOM | |
spi_id: display_qspi | |
data_rate: 80MHz | |
# NOTE: color_order: RGB is handled automatically by ESPHome | |
# It sets MADCTL Bit 3 = 0. Do NOT manually send 0x36. | |
color_order: RGB | |
# NOTE: invert_colors: true is handled automatically by ESPHome | |
# It sends the INVON (0x21) command. Do NOT manually send 0x21. | |
invert_colors: true | |
dimensions: | |
width: 360 | |
height: 360 | |
# NOTE: transform: section (mirror_x/y, swap_axes) would also modify | |
# MADCTL (0x36). Since none are specified here, default orientation | |
# is assumed (no mirror, no swap). | |
# chip‑select and reset | |
cs_pin: GPIO21 | |
# Reset is on EXIO2 -> PCA9554 pin #2 | |
reset_pin: | |
pca9554: pca9554a_device | |
number: 2 # EXIO2 | |
auto_clear_enabled: false | |
update_interval: 10s | |
lambda: |- | |
it.fill(Color(0, 255, 0)); // Test with solid green fill | |
# Initialization sequence based STRICTLY on the provided Arduino sequence, | |
# omitting commands handled by ESPHome settings (like 0x36 MADCTL, 0x21 INVON/OFF). | |
init_sequence: | |
# Standard Init: Sleep Out (with delay), Pixel Format | |
- [0x11, 120] # Sleep Out, 120ms delay (from end of Arduino list) | |
- [0x3A, 0x55] # Pixel Format: 65K RGB (565), 16 bit/pixel (from end of Arduino list) | |
# Start of main Arduino sequence block | |
- [0xF0, 0x28] | |
- [0xF2, 0x28] | |
- [0x7C, 0xD1] | |
- [0x83, 0xE0] | |
- [0x84, 0x61] | |
- [0xF2, 0x82] | |
- [0xF0, 0x00] | |
- [0xF0, 0x01] | |
- [0xF1, 0x01] | |
- [0xB0, 0x49] | |
- [0xB1, 0x4A] | |
- [0xB2, 0x1F] | |
- [0xB4, 0x46] | |
- [0xB5, 0x34] | |
- [0xB6, 0xD5] | |
- [0xB7, 0x30] | |
- [0xB8, 0x04] | |
- [0xBA, 0x00] | |
- [0xBB, 0x08] | |
- [0xBC, 0x08] | |
- [0xBD, 0x00] | |
- [0xC0, 0x80] | |
- [0xC1, 0x10] | |
- [0xC2, 0x37] | |
- [0xC3, 0x80] | |
- [0xC4, 0x10] | |
- [0xC5, 0x37] | |
- [0xC6, 0xA9] | |
- [0xC7, 0x41] | |
- [0xC8, 0x01] | |
- [0xC9, 0xA9] | |
- [0xCA, 0x41] | |
- [0xCB, 0x01] | |
- [0xD0, 0x91] | |
- [0xD1, 0x68] | |
- [0xD2, 0x68] | |
- [0xF5, 0x00, 0xA5] | |
- [0xF1, 0x10] | |
- [0xF0, 0x00] | |
- [0xF0, 0x02] | |
# Gamma Settings P/N (Positive/Negative) | |
- [0xE0, 0x70, 0x09, 0x12, 0x0C, 0x0B, 0x27, 0x38, 0x54, 0x4E, 0x19, 0x15, 0x15, 0x2C, 0x2F] | |
- [0xE1, 0x70, 0x08, 0x11, 0x0C, 0x0B, 0x27, 0x38, 0x43, 0x4C, 0x18, 0x14, 0x14, 0x2B, 0x2D] | |
# Enter Extended Command Set + Specific Extended Settings | |
- [0xF0, 0x10] | |
- [0xF3, 0x10] | |
- [0xE0, 0x08] | |
- [0xE1, 0x00] | |
- [0xE2, 0x0B] | |
- [0xE3, 0x00] | |
- [0xE4, 0xE0] | |
- [0xE5, 0x06] | |
- [0xE6, 0x21] | |
- [0xE7, 0x00] | |
- [0xE8, 0x05] | |
- [0xE9, 0x82] | |
- [0xEA, 0xDF] | |
- [0xEB, 0x89] | |
- [0xEC, 0x20] | |
- [0xED, 0x14] | |
- [0xEE, 0xFF] | |
- [0xEF, 0x00] | |
- [0xF8, 0xFF] | |
- [0xF9, 0x00] | |
- [0xFA, 0x00] | |
- [0xFB, 0x30] | |
- [0xFC, 0x00] | |
- [0xFD, 0x00] | |
- [0xFE, 0x00] | |
- [0xFF, 0x00] | |
# Panel Voltage & Timing (0x60–0x7B) | |
- [0x60, 0x42] | |
- [0x61, 0xE0] | |
- [0x62, 0x40] | |
- [0x63, 0x40] | |
- [0x64, 0x02] | |
- [0x65, 0x00] | |
- [0x66, 0x40] | |
- [0x67, 0x03] | |
- [0x68, 0x00] | |
- [0x69, 0x00] | |
- [0x6A, 0x00] | |
- [0x6B, 0x00] | |
- [0x70, 0x42] | |
- [0x71, 0xE0] | |
- [0x72, 0x40] | |
- [0x73, 0x40] | |
- [0x74, 0x02] | |
- [0x75, 0x00] | |
- [0x76, 0x40] | |
- [0x77, 0x03] | |
- [0x78, 0x00] | |
- [0x79, 0x00] | |
- [0x7A, 0x00] | |
- [0x7B, 0x00] | |
# Gate & Source Driver Settings (0x80–0xBF) - Using Arduino values | |
- [0x80, 0x38] # Corrected from 0x48 | |
- [0x81, 0x00] | |
- [0x82, 0x04] # Corrected from 0x05 | |
- [0x83, 0x02] | |
- [0x84, 0xDC] # Corrected from 0xDD | |
- [0x85, 0x00] | |
- [0x86, 0x00] | |
- [0x87, 0x00] | |
- [0x88, 0x38] # Corrected from 0x48 | |
- [0x89, 0x00] | |
- [0x8A, 0x06] # Corrected from 0x07 | |
- [0x8B, 0x02] | |
- [0x8C, 0xDE] # Corrected from 0xDF | |
- [0x8D, 0x00] | |
- [0x8E, 0x00] | |
- [0x8F, 0x00] | |
- [0x90, 0x38] # Corrected from 0x48 | |
- [0x91, 0x00] | |
- [0x92, 0x08] # Corrected from 0x09 | |
- [0x93, 0x02] | |
- [0x94, 0xE0] # Corrected from 0xE1 | |
- [0x95, 0x00] | |
- [0x96, 0x00] | |
- [0x97, 0x00] | |
- [0x98, 0x38] # Corrected from 0x48 | |
- [0x99, 0x00] | |
- [0x9A, 0x0A] # Corrected from 0x0B | |
- [0x9B, 0x02] | |
- [0x9C, 0xE2] # Corrected from 0xE3 | |
- [0x9D, 0x00] | |
- [0x9E, 0x00] | |
- [0x9F, 0x00] | |
- [0xA0, 0x38] # Corrected from 0x48 | |
- [0xA1, 0x00] | |
- [0xA2, 0x03] # Corrected from 0x04 | |
- [0xA3, 0x02] | |
- [0xA4, 0xDB] # Corrected from 0xDC | |
- [0xA5, 0x00] | |
- [0xA6, 0x00] | |
- [0xA7, 0x00] | |
- [0xA8, 0x38] # Corrected from 0x48 | |
- [0xA9, 0x00] | |
- [0xAA, 0x05] # Corrected from 0x06 | |
- [0xAB, 0x02] | |
- [0xAC, 0xDD] # Corrected from 0xDE | |
- [0xAD, 0x00] | |
- [0xAE, 0x00] | |
- [0xAF, 0x00] | |
- [0xB0, 0x38] # Corrected from 0x48 | |
- [0xB1, 0x00] | |
- [0xB2, 0x07] # Corrected from 0x08 | |
- [0xB3, 0x02] | |
- [0xB4, 0xDF] # Corrected from 0xE0 | |
- [0xB5, 0x00] | |
- [0xB6, 0x00] | |
- [0xB7, 0x00] | |
- [0xB8, 0x38] # Corrected from 0x48 | |
- [0xB9, 0x00] | |
- [0xBA, 0x09] # Corrected from 0x0A | |
- [0xBB, 0x02] | |
- [0xBC, 0xE1] # Corrected from 0xE2 | |
- [0xBD, 0x00] | |
- [0xBE, 0x00] | |
- [0xBF, 0x00] | |
# Panel Timing (0xC0–0xC9) - Using Arduino values | |
- [0xC0, 0x22] # Corrected from 0x12 | |
- [0xC1, 0xAA] | |
- [0xC2, 0x65] | |
- [0xC3, 0x74] | |
- [0xC4, 0x47] | |
- [0xC5, 0x56] | |
- [0xC6, 0x00] | |
- [0xC7, 0x88] | |
- [0xC8, 0x99] | |
- [0xC9, 0x33] | |
# Gate Driver Timing (0xD0–0xD9) - Using Arduino values | |
- [0xD0, 0x11] # Corrected from 0x21 | |
- [0xD1, 0xAA] | |
- [0xD2, 0x65] | |
- [0xD3, 0x74] | |
- [0xD4, 0x47] | |
- [0xD5, 0x56] | |
- [0xD6, 0x00] | |
- [0xD7, 0x88] | |
- [0xD8, 0x99] | |
- [0xD9, 0x33] | |
# Final commands from Arduino sequence | |
- [0xF3, 0x01] | |
- [0xF0, 0x00] | |
# Display ON (from end of Arduino list) | |
# Note: ESPHome also sends Display ON automatically after init_sequence, | |
# but including it here ensures it happens exactly at this point if needed. | |
- [0x29] | |
i2c: | |
- id: dummy_i2c | |
sda: GPIO0 | |
scl: GPIO1 | |
pca9554: | |
- id: pca9554a_device | |
i2c_id: dummy_i2c # shares the same bus | |
address: 0x20 # check your board’s EXIO I²C address! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment