/* E43GB-I-MW1000-N MIPI DSI TFT Display Driver File Created on August 29, 2025, 15:10 AM @Company Focus LCDs LCDs Made Simple www.focuslcds.com @File Name E43GB-I-MW1000-N-init.txt @Summary This is the driver source file for the TFT Display Display: 4.3" TFT LCD 480 x 800 Controller Chip: ILI9806E Interface: MIPI DSI 2-Lane MCU/MPU: Generic @Version Version 1.0.0 (Semantic Versioning 2.0.0) @Description This source file provides initialization for the 4.3" TFT display. */ /*******************************************************************************/ /******************************************************************************* (c) 2023 Focus LCDs and its subsidiaries. You may use this software and any derivatives exclusively with Focus LCDs products. THIS SOFTWARE IS SUPPLIED BY FOCUS LCDS "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE, OR ITS INTERACTION WITH FOCUS LCDS PRODUCTS, COMBINATION WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION. IN NO EVENT WILL FOCUS LCDS BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF FOCUS LCDS HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, FOCUS LCDS' TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO FOCUSLCDS FOR THIS SOFTWARE. FOCUS LCDS PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE TERMS. *******************************************************************************/ #ifndef E43GB_I_MW1000_N_H #define E43GB_I_MW1000_N_H #include /* * E43GB-I-MW1000-N 4.3" IPS LCD Panel Configuration * * Physical Specifications: * - Diagonal Size: 4.3 inches * - Resolution: 480 x 800 (WVGA) * - Aspect Ratio: 3:5 (Portrait) * - Display Type: IPS (In-Plane Switching) * - Polarizer: Transmissive * - Operating Temperature: -20°C to +70°C * * Interface Specifications: * - Interface: 2-Lane MIPI DSI * - TFT Controller: ILI9806E (based on initialization commands) * - Touch Panel Type: None * - Video Mode: Burst mode * * This file contains timing parameters and initialization commands for the * E43GB-I-MW1000-N 4.3" IPS LCD panel. These parameters are critical for proper * display timing and synchronization. * * Electrical Specifications: * - VDD: 1.8V (Digital supply) * - RESET: VDD (Active low reset) * - STBYB: VDD (Standby control, active high) * - VGH: 18V (Gate high voltage) * - VGL: -6V (Gate low voltage) * - AVDD: 9.6V (Analog supply) * - VCOM: 3.2V (Common voltage, typical) * * MIPI Configuration: * - Clock Speed: 15MHz (15000 kHz) * - Data Lane: 2-lane MIPI DSI * - DSI Flags: 0x10c */ /* * LCD Timing Parameters * * These parameters define the blanking intervals and synchronization pulses * required for proper LCD timing. They are specified in pixel clocks (horizontal) * or scan lines (vertical). * * Timing Diagram: * * Horizontal Timing: * |<-- HSPW --><-- HBPD --><-- Active Display (480px) --><-- HFPD -->| * | | | | | * | Sync Pulse | Back | | Front | * | | Porch | | Porch | * * Vertical Timing: * |<-- VSPW --><-- VBPD --><-- Active Display (800 lines) --><-- VFPD -->| * | | | | | * | Sync Pulse | Back | | Front | * | | Porch | | Porch | */ /* Vertical Timing Parameters */ #define VBPD 14 /* Vertical Back Porch - 14 scan lines before active display */ #define VFPD 14 /* Vertical Front Porch - 14 scan lines after active display */ #define VSPW 4 /* Vertical Sync Pulse Width - 4 scan lines sync pulse */ /* Horizontal Timing Parameters */ #define HBPD 5 /* Horizontal Back Porch - 5 pixel clocks before active display */ #define HFPD 5 /* Horizontal Front Porch - 5 pixel clocks after active display */ #define HSPW 4 /* Horizontal Sync Pulse Width - 4 pixel clocks sync pulse */ /* * ILI9806E Initialization Commands * * These commands configure the ILI9806E TFT controller for proper operation * with the 4.3" IPS panel. Commands are sent using the GP_COMMAD_PA and W_D * macros which handle the command parameter and data writing. */ #define LCD_INIT_COMMANDS_COUNT 120 /* ILI9806E initialization command structure */ typedef struct { uint8_t command; uint8_t parameter_count; uint8_t parameters[8]; /* Maximum 8 parameters per command */ } ili9806e_init_cmd_t; /* LCD initialization commands for E43GB-I-MW1000-N 4.3" IPS panel */ static const ili9806e_init_cmd_t ili9806e_init_commands[] = { /* Command Set 1: Extended Function Control */ {0xFF, 6, {0xFF, 0xFF, 0x98, 0x06, 0x04, 0x01}}, /* Command Set 2: Display Control */ {0x08, 2, {0x10, 0x00}}, {0x21, 2, {0x01, 0x00}}, {0x30, 2, {0x01, 0x00}}, {0x31, 2, {0x00, 0x00}}, {0x60, 2, {0x06, 0x00}}, {0x61, 2, {0x00, 0x00}}, {0x62, 2, {0x07, 0x00}}, {0x63, 2, {0x00, 0x00}}, {0x40, 2, {0x16, 0x00}}, {0x41, 2, {0x44, 0x00}}, {0x42, 2, {0x00, 0x00}}, {0x43, 2, {0x83, 0x00}}, {0x44, 2, {0x89, 0x00}}, {0x45, 2, {0x8A, 0x00}}, {0x46, 2, {0x44, 0x00}}, {0x47, 2, {0x44, 0x00}}, {0x50, 2, {0x88, 0x00}}, {0x51, 2, {0x88, 0x00}}, {0x52, 2, {0x00, 0x00}}, {0x53, 2, {0x47, 0x00}}, {0x54, 2, {0x00, 0x00}}, {0x55, 2, {0x47, 0x00}}, {0x56, 2, {0x00, 0x00}}, /* Command Set 3: Gamma Control (Positive) */ {0xA0, 2, {0x00, 0x00}}, {0xA1, 2, {0x10, 0x00}}, {0xA2, 2, {0x0C, 0x00}}, {0xA3, 2, {0x06, 0x00}}, {0xA4, 2, {0x03, 0x00}}, {0xA5, 2, {0x07, 0x00}}, {0xA6, 2, {0x06, 0x00}}, {0xA7, 2, {0x04, 0x00}}, {0xA8, 2, {0x09, 0x00}}, {0xA9, 2, {0x08, 0x00}}, {0xAA, 2, {0x12, 0x00}}, {0xAB, 2, {0x06, 0x00}}, {0xAC, 2, {0x0E, 0x00}}, {0xAD, 2, {0x0E, 0x00}}, {0xAE, 2, {0x09, 0x00}}, {0xAF, 2, {0x00, 0x00}}, /* Command Set 4: Gamma Control (Negative) */ {0xC0, 2, {0x00, 0x00}}, {0xC1, 2, {0x00, 0x00}}, {0xC2, 2, {0x08, 0x00}}, {0xC3, 2, {0x08, 0x00}}, {0xC4, 2, {0x01, 0x00}}, {0xC5, 2, {0x07, 0x00}}, {0xC6, 2, {0x05, 0x00}}, {0xC7, 2, {0x04, 0x00}}, {0xC8, 2, {0x09, 0x00}}, {0xC9, 2, {0x0C, 0x00}}, {0xCA, 2, {0x16, 0x00}}, {0xCB, 2, {0x0B, 0x00}}, {0xCC, 2, {0x11, 0x00}}, {0xCD, 2, {0x21, 0x00}}, {0xCE, 2, {0x0F, 0x00}}, {0xCF, 2, {0x00, 0x00}}, /* Command Set 5: Extended Function Control */ {0xFF, 6, {0xFF, 0xFF, 0x98, 0x06, 0x04, 0x06}}, {0x00, 2, {0x21, 0x00}}, /* Command Set 6: Display Control */ {0x01, 2, {0x0A, 0x00}}, {0x02, 2, {0x60, 0x00}}, {0x03, 2, {0x0F, 0x00}}, {0x04, 2, {0x01, 0x00}}, {0x05, 2, {0x01, 0x00}}, {0x06, 2, {0x98, 0x00}}, {0x07, 2, {0x06, 0x00}}, {0x08, 2, {0x01, 0x00}}, {0x09, 2, {0x00, 0x00}}, {0x0A, 2, {0x00, 0x00}}, {0x0B, 2, {0x00, 0x00}}, {0x0C, 2, {0x23, 0x00}}, {0x0D, 2, {0x23, 0x00}}, {0x0E, 2, {0x00, 0x00}}, {0x0F, 2, {0x00, 0x00}}, {0x10, 2, {0xF7, 0x00}}, {0x11, 2, {0xF0, 0x00}}, {0x12, 2, {0x00, 0x00}}, {0x13, 2, {0x00, 0x00}}, {0x14, 2, {0x00, 0x00}}, {0x15, 2, {0xC0, 0x00}}, {0x16, 2, {0x08, 0x00}}, {0x17, 2, {0x00, 0x00}}, {0x18, 2, {0x00, 0x00}}, {0x19, 2, {0x00, 0x00}}, {0x1A, 2, {0x00, 0x00}}, {0x1B, 2, {0x00, 0x00}}, {0x1C, 2, {0x00, 0x00}}, {0x1D, 2, {0x00, 0x00}}, /* Command Set 7: Color Control */ {0x20, 2, {0x01, 0x00}}, {0x21, 2, {0x23, 0x00}}, {0x22, 2, {0x44, 0x00}}, {0x23, 2, {0x67, 0x00}}, {0x24, 2, {0x01, 0x00}}, {0x25, 2, {0x23, 0x00}}, {0x26, 2, {0x45, 0x00}}, {0x27, 2, {0x67, 0x00}}, /* Command Set 8: Gamma Control */ {0x30, 2, {0x01, 0x00}}, {0x31, 2, {0x00, 0x00}}, {0x32, 2, {0x76, 0x00}}, {0x33, 2, {0x88, 0x00}}, {0x34, 2, {0x22, 0x00}}, {0x35, 2, {0x55, 0x00}}, {0x36, 2, {0x23, 0x00}}, {0x37, 2, {0x11, 0x00}}, {0x38, 2, {0xBC, 0x00}}, {0x39, 2, {0xAD, 0x00}}, {0x3A, 2, {0xDA, 0x00}}, {0x3B, 2, {0xCB, 0x00}}, {0x3C, 2, {0x22, 0x00}}, {0x3D, 2, {0x22, 0x00}}, {0x3E, 2, {0x22, 0x00}}, {0x3F, 2, {0x22, 0x00}}, {0x40, 2, {0x22, 0x00}}, /* Command Set 9: Power Control */ {0x52, 2, {0x10, 0x00}}, /* Default */ {0x53, 2, {0x10, 0x00}}, /* Default */ {0x54, 2, {0x13, 0x00}}, /* Default */ /* Command Set 10: Extended Function Control */ {0xFF, 6, {0xFF, 0xFF, 0x98, 0x06, 0x04, 0x07}}, {0x17, 2, {0x22, 0x00}}, /* Default */ {0x18, 2, {0x1D, 0x00}}, /* Default */ {0x02, 2, {0x77, 0x00}}, {0xE1, 2, {0x79, 0x00}}, {0x06, 2, {0x13, 0x00}}, /* Command Set 11: Extended Function Control */ {0xFF, 6, {0xFF, 0xFF, 0x98, 0x06, 0x04, 0x00}}, /* Command Set 12: Display Control */ {0x35, 1, {0x00}}, /* TE On */ {0x36, 2, {0x00, 0x00}}, /* Memory Access Control */ {0x3A, 2, {0x77, 0x00}}, /* Pixel Format Set */ {0x34, 2, {0x01, 0x00}}, /* Tearing Effect Line ON */ {0x11, 1, {0x00}}, /* Sleep Out */ {0x29, 1, {0x00}} /* Display On */ }; /* * Display Control Functions * * These functions provide a clean interface for LCD panel control. * They should be called in the proper sequence during system initialization. */ /** * @brief Initialize the LCD panel via ILI9806E commands * * Sends all required initialization commands to configure the ILI9806E panel. * Must be called before any display operations. */ void lcd_panel_init(void); /** * @brief Send ILI9806E initialization commands to the LCD panel * * Example implementation showing how to send the initialization commands * for the ILI9806E controller. This function demonstrates the proper sequence * and timing for panel initialization. * * @note This is an example implementation. The actual command functions * (GP_COMMAD_PA, W_D, delay_ms) need to be provided by your * platform's ILI9806E driver implementation. */ void lcd_send_init_commands(void) { /* Send all initialization commands */ for (int i = 0; i < LCD_INIT_COMMANDS_COUNT; i++) { /* Send command with parameter count */ GP_COMMAD_PA(ili9806e_init_commands[i].parameter_count); /* Send parameters */ for (int j = 0; j < ili9806e_init_commands[i].parameter_count; j++) { W_D(ili9806e_init_commands[i].parameters[j]); } /* Small delay between commands as required by the panel */ delay_ms(1); } /* Additional delay after initialization */ delay_ms(10); } /** * @brief Example complete panel initialization sequence * * This function demonstrates the complete initialization sequence * including reset, sleep out, command sending, and display enable. * * @note This is an example implementation. Replace the function calls * with your platform's actual implementation. */ void lcd_complete_init_sequence(void) { /* 1. Hardware reset sequence */ lcd_reset_low(); delay_ms(10); lcd_reset_high(); delay_ms(120); /* 2. Send initialization commands */ lcd_send_init_commands(); /* 3. Exit sleep mode */ lcd_sleep_out(); delay_ms(120); /* 4. Enable display */ lcd_display_on(); delay_ms(10); /* 5. Enable tear effect if needed */ lcd_enable_tear_effect(); delay_ms(10); } /** * @brief Enable the LCD display * * Sends the Display On command (0x29) to activate the panel. * Should be called after initialization and any sleep mode. */ void lcd_display_on(void); /** * @brief Put LCD panel into sleep mode * * Sends the Sleep In command (0x10) to put the panel into low power mode. * Useful for power saving when display is not needed. */ void lcd_sleep_in(void); /** * @brief Wake LCD panel from sleep mode * * Sends the Sleep Out command (0x11) to wake the panel from sleep mode. * Required before Display On command if panel was in sleep mode. */ void lcd_sleep_out(void); /** * @brief Enable Tear Effect (TE) signal * * Sends the TE On command (0x35) to enable vertical sync signal output. * This can be used for frame synchronization with the host processor. */ void lcd_enable_tear_effect(void); /* * Panel Information Constants */ #define LCD_PANEL_MODEL "E43GB-I-MW1000-N" #define LCD_PANEL_VENDOR "Focus LCDs" #define LCD_PANEL_CONTROLLER "ILI9806E" #define LCD_PANEL_TYPE "IPS" #define LCD_PANEL_WIDTH 480 #define LCD_PANEL_HEIGHT 800 #define LCD_PANEL_PIXELS (LCD_PANEL_WIDTH * LCD_PANEL_HEIGHT) #define LCD_PANEL_ASPECT_RATIO "3:5" #define LCD_PANEL_INTERFACE "MIPI DSI 2-lane" #define LCD_PANEL_CLOCK_SPEED 15000000 /* 15 MHz */ #define LCD_PANEL_DIAGONAL_SIZE 4.3 /* inches */ #define LCD_PANEL_MODULE_WIDTH 56 /* mm */ #define LCD_PANEL_MODULE_HEIGHT 93 /* mm */ #define LCD_PANEL_VIEWING_WIDTH 56 /* mm (assuming full viewing area) */ #define LCD_PANEL_VIEWING_HEIGHT 93 /* mm (assuming full viewing area) */ #define LCD_PANEL_BRIGHTNESS 800 /* Nits (typical) */ #define LCD_PANEL_TFT_CONTROLLER "ILI9806E" #define LCD_PANEL_TOUCH_CONTROLLER "GT911" #define LCD_PANEL_TOUCH_TYPE "Capacitive" #define LCD_PANEL_POLARIZER "Transmissive" #define LCD_PANEL_TEMP_MIN -20 /* °C */ #define LCD_PANEL_TEMP_MAX 70 /* °C */ #define LCD_PANEL_VIDEO_MODE "Burst" /* Video mode: burst mode */ #define LCD_PANEL_DSI_FLAGS 0x10c /* DSI flags */ /* * Contact Information * * Focus LCDs * 162 W. Boxelder, Suite 1 * Chandler, AZ 85225 * M-F 7:30am to 4:00pm (Arizona Time) * * Phone: 480-503-4295 * Email: LCD@FocusLCDs.com */ #endif /* E43GB_I_MW1000_N_H */