Content originally posted in LPCWare by szszjdb on Thu Jul 25 21:13:59 MST 2013
DERR FRIEND ,
I'm using the mcb4300 demo for LPC4357. The drive is for 4.3" TFT. When I move to 7" TFT and change some config , the TFT cann't work. The original 4,3" and the 7" config is as below:
//for 4.3"
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 */
//for 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
Any body can help me ?
Thanks!