|
LCD控制器是什么,你说的太笼统;
若背光电压、数字电源电压稳定,下面是我的配置参数(WINCE5.0+2440):
s2440IOP->GPCUP = 0xFFFFFFFF;
s2440IOP->GPCCON = 0xAAAAAAAA;
s2440IOP->GPDUP = 0xFFFFFFFF;
s2440IOP->GPDCON = 0xAAAAAAAA; //0xAAAAAAA1;
/*
* GPG4 is lcd power enable pin.set GPG4 high.
*/
s2440IOP->GPGCON &= ~(3 << 8);
s2440IOP->GPGCON |= (1 << 8);
s2440IOP->GPGDAT |= (1 << 4);
s2440LCD->LCDCON1 = (CLKVAL_TFT << 8) | /* VCLK = HCLK / ((CLKVAL + 1) * 2) -> About 7 Mhz */
(LCD_MVAL_USED << 7) | /* 0 : Each Frame */
(3 << 5) | /* TFT LCD Pannel */
(12 << 1) | /* 16bpp Mode */
(0 << 0) ; /* Disable LCD Output */
s2440LCD->LCDCON2 = (LCD_VBPD << 24) | /* VBPD : 1 */
(LCD_LINEVAL_TFT << 14) | /* Vertical Size : 320 - 1 */
(LCD_VFPD << 6) | /* VFPD : 2 */
(LCD_VSPW << 0) ; /* VSPW : 1 */
s2440LCD->LCDCON3 = (LCD_HBPD << 19) | /* HBPD : 6 */
(LCD_HOZVAL_TFT << 8) | /* HOZVAL_TFT : 240 - 1 */
(LCD_HFPD << 0) ; /* HFPD : 2 */
s2440LCD->LCDCON4 = (LCD_MVAL << 8) | /* MVAL : 13 */
(LCD_HSPW << 0) ; /* HSPW : 4 */
s2440LCD->LCDCON5 = (0 << 12) | /* BPP24BL : LSB valid */
(1 << 11) | /* FRM565 MODE : 5:6:5 Format */
(0 << 10) | /* INVVCLK : VCLK Falling Edge */
(1 << 9) | /* INVVLINE : Inverted Polarity */
(1 << 8) | /* INVVFRAME : Inverted Polarity */
(0 << 7) | /* INVVD : Normal */
(0 << 6) | /* INVVDEN : Normal */
(0 << 5) | /* INVPWREN : Normal */
(0 << 4) | /* INVENDLINE : Normal */
(0 << 3) | /* PWREN : Disable PWREN */
(0 << 2) | /* ENLEND : Disable LEND signal */
(0 << 1) | /* BSWP : Swap Disable */
(1 << 0) ; /* HWSWP : Swap Enable */
s2440LCD->LCDSADDR1 = ((IMAGE_FRAMEBUFFER_DMA_BASE >> 22) << 21) |
((M5D(IMAGE_FRAMEBUFFER_DMA_BASE >> 1)) << 0);
s2440LCD->LCDSADDR2 = M5D((IMAGE_FRAMEBUFFER_DMA_BASE + (LCD_XSIZE_TFT * LCD_YSIZE_TFT * 2)) >> 1);
s2440LCD->LCDSADDR3 = (((LCD_XSIZE_TFT - LCD_XSIZE_TFT) / 1) << 11) | (LCD_XSIZE_TFT / 1);
//s2440LCD->TCONSEL |= 0x3;
s2440LCD->TCONSEL &= (~7);
//s2440LCD->TCONSEL |= (0x1<<4);
s2440LCD->TPAL = 0x0;
s2440LCD->LCDCON1 |= 1; |
|