I have followed some online tutorials for this display and official IDF-Component but seems that it is not working properly. The configuration that this display has is as follows in the code
https://circuitlabs.net/lcd-oled-displa ... h-esp-idf/
Also the reset is connected to 3v3 via resistor and other side to capacitor to GND. There is no specific pin for Reset.
Code: Select all
static void display_init() {
spi_bus_config_t spi_bus = {
.sclk_io_num = LCD_SCLK,
.mosi_io_num = LCD_MOSI,
.miso_io_num = -1,
.quadwp_io_num = -1,
.quadhd_io_num = -1,
.max_transfer_sz = 240 * 80 * sizeof(uint16_t),
};
ESP_ERROR_CHECK(spi_bus_initialize(LCD_HOST, &spi_bus, SPI_DMA_CH_AUTO));
esp_lcd_panel_io_spi_config_t io_config = {
.dc_gpio_num = LCD_DC,
.cs_gpio_num = LCD_CS,
.pclk_hz = 40*1000*1000,
.lcd_cmd_bits = LCD_CMD_BITS,
.lcd_param_bits = LCD_PARAM_BITS,
.spi_mode = 0,
.trans_queue_depth = 10,
.on_color_trans_done = NULL,
.user_ctx = NULL,
};
esp_lcd_new_panel_io_spi((esp_lcd_spi_bus_handle_t)LCD_HOST, &io_config, &io_handle);
esp_lcd_panel_dev_config_t panel_config = {
.reset_gpio_num = -1,
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR,
.bits_per_pixel = 16,
};
// Create LCD panel handle for ILI9341, with the SPI IO device handle
ESP_ERROR_CHECK(esp_lcd_new_panel_ili9341(io_handle, &panel_config, &panel_handle));
esp_lcd_panel_reset(panel_handle);
esp_lcd_panel_init(panel_handle);
esp_lcd_panel_disp_on_off(panel_handle, true);
}