|
如题,驱动4.3屏没问题,按照1788的例子将几个屏的参数改到4357,可是无法显示
以下是1788点7寸的配置
#define H_SIZE 800
#define V_SIZE 480
/* LCD Config */
#define LCD_H_SIZE H_SIZE
#define LCD_H_PULSE 2
#define LCD_H_FRONT_PORCH 17
#define LCD_H_BACK_PORCH 45
#define LCD_V_SIZE V_SIZE
#define LCD_V_PULSE 2
#define LCD_V_FRONT_PORCH 22
#define LCD_V_BACK_PORCH 22
以下是原始的4.3寸屏4357配置,
LPC_LCD->TIMH = (40 << 24) | /* Horizontal back porch */
(5 << 16) | /* Horizontal front porch */
(2 << 8) | /* Horizontal sync pulse width */
(29 << 2) ; /* Pixels-per-line 272=16*(16+1) 480=16*(29+1) */
LPC_LCD->TIMV = (8 << 24) | /* Vertical back porch */
(8 << 16) | /* Vertical front porch */
(2 << 10) | /* Vertical sync pulse width */
(271 << 0) ; /* Lines per panel */
LPC_LCD->POL = (1 << 26) | /* Bypass pixel clock divider */
(479 << 16) | /* Clocks per line: num of LCDCLKs */
(0 << 13) | /* Invert panel clock */
(1 << 12) | /* Invert HSYNC */
(1 << 11) ; /* Invert VSYNC */
LPC_LCD->LE = (1 << 16) | /* LCDLE Enabled: 1, Disabled: 0 */
(9 << 0) ; /* Line-end delay: LCDCLK clocks - 1 */
LPC_LCD->CTRL = (1 << 11) | /* LCD Power Enable */
(1 << 5) | /* 0 = STN display, 1: TFT display */
(6 << 1) | /* Bits per pixel: 16bpp */
(1 << 8); /* Red and blue swapped */
以下是我改后的7寸配置,不能正常显示
LPC_LCD->TIMH = (45 << 24) | /* Horizontal back porch */
(17 << 16) | /* Horizontal front porch */
(2 << 8) | /* Horizontal sync pulse width */
(49 << 2) ; /* Pixels-per-line 272=16*(16+1) 480=16*(29+1) 800=16*(49+1) */
LPC_LCD->TIMV = (22 << 24) | /* Vertical back porch */
(22 << 16) | /* Vertical front porch */
(2 << 10) | /* Vertical sync pulse width */
(479 << 0) ; /* Lines per panel */
LPC_LCD->POL = (1 << 26) | /* Bypass pixel clock divider */
(799 << 16) | /* Clocks per line: num of LCDCLKs */
(0 << 13) | /* Invert panel clock */
(1 << 12) | /* Invert HSYNC */
(1 << 11) ; /* Invert VSYNC */
LPC_LCD->LE = (1 << 16) | /* LCDLE Enabled: 1, Disabled: 0 */
(9 << 0) ; /* Line-end delay: LCDCLK clocks - 1 */
LPC_LCD->CTRL = (1 << 11) | /* LCD Power Enable */
(1 << 5) | /* 0 = STN display, 1: TFT display */
(6 << 1) | /* Bits per pixel: 16bpp */
(1 << 8); /* Red and blue swapped */
怎样修改才能驱动7寸屏?
望朋友们不吝赐教!多谢! |
|