周公你好,我现在用LPC2478驱动一款夏普640*480的彩色液晶屏,发现驱动起来后屏幕很闪,我参数调了很久,都没有什么效果。液晶屏的型号是LQ104V1DG51_SHARP,以下是我的参数:
/* Structure containing the parameters for the LCD panel */ typedef struct { INT8U h_back_porch; /* Horizontal back porch in clocks */ INT8U h_front_porch; /* Horizontal front porch in clocks */ INT8U h_sync_pulse_width; /* HSYNC pulse width in clocks */ INT16U pixels_per_line; /* Pixels per line (horizontal resolution) */ INT8U v_back_porch; /* Vertical back porch in clocks */ INT8U v_front_porch; /* Vertical front porch in clocks */ INT8U v_sync_pulse_width; /* VSYNC pulse width in clocks */ INT16U lines_per_panel; /* Lines per panel (vertical resolution) */ INT8U invert_output_enable; /* Invert output enable, 1 = invert*/ INT8U invert_panel_clock; /* Invert panel clock, 1 = invert*/ INT8U invert_hsync; /* Invert HSYNC, 1 = invert */ INT8U invert_vsync; /* Invert VSYNC, 1 = invert */ INT8U ac_bias_frequency; /* AC bias frequency in clocks */ INT8U bits_per_pixel; /* Maximum bits per pixel the display supports */ INT32U optimal_clock; /* Optimal clock rate (Hz) */ LCD_PANEL_T lcd_panel_type; /* LCD panel type */ INT8U dual_panel; /* Dual panel, 1 = dual panel display */ } LCD_PARAM_T;
const LCD_PARAM_T dh240 = { 60,//48, /* Horizontal back porch */ 10,//16, /* Horizontal front porch */ 10,//96, /* HSYNC pulse width */ 640, /* Pixels per line */ 33,//33, /* Vertical back porch */ 10,//10, /* Vertical front porch */ 10,//2, /* VSYNC pulse width */ 480, /* Lines per panel */ 0, /* Do not invert output enable */ 0,//0, /* Invert panel clock */ 0,//0, /* Do not Invert HSYNC */ 0, /* Do not invert VSYNC */ 1, /* AC bias frequency (not used) */ 16, /* Bits per pixel */ 6500000, /* Optimal clock rate (Hz) */ TFT, /* LCD panel type */ 0, /* Single panel display */ }; |