求一个LPC4357驱动7寸屏的例子
如题,驱动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寸屏?
望朋友们不吝赐教!多谢! 原始例子是KEIL的,如下
学习学习哦 谢谢,再顶顶! 有没有朋友熟悉这个芯片?调了几天了,示波器看波形也没看出问题,一筹莫展中。 问题解决了,原来是硬件问题,7寸屏和软排插座接触不良,LCD_EN信号可以在软排插座上测到,但在软排上没有。将软排刮一刮去掉氧化就好了。
例程如上,可用,多谢各位关注了!
页:
[1]