LPC54608 Board cannot display RGB565 image

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC54608 Board cannot display RGB565 image

884件の閲覧回数
zhixiangzeng
Contributor II

when I use SDK_2.2_LPC54608J512 - copy\boards\lpcxpresso54608\driver_examples\lcdc\lcdc_cursor demo  to display a RGB565 image .in the lcdc_cursor.c  I do these modifies:

1.I define a image array   : unsigned const char image[153600]={.0X29,0X64,0XC9,0X5B,0X8A,......}, 320*240 image ,16bbp565.

2.I define two functions :

void lcd_SetPixel(int x, int y, unsigned int uicolor);//piexl  position and  color
void lcd_DrawBmp (int ix0,int iy0, int iwidth, int iheight, unsigned short *pucBmp);// image position ,size,and  image data

void lcd_SetPixel(int x, int y, unsigned int uicolor)
{
while(1)
{
if((x < LCD_WIDTH) && (y < LCD_HEIGHT))
{
s_frameBufs[y][x] = uicolor & 0xff;
s_frameBufs[y][x+1] = (uint8_t)uicolor >>8;

// s_frameBufs[y][x] = uicolor ;
}
}

}

void lcd_DrawBmp(int ix0,int iy0, int iwidth, int iheight, unsigned short *pucBmp)
{
uint16_t ix, iy;
uint16_t uicolor;

for (iy = iy0; iy < iheight + iy0; iy++)
{
for (ix = ix0; ix < iwidth + ix0; ix = ix+2)
{
uicolor = *pucBmp++;
lcd_SetPixel(ix, iy, uicolor);
}
}

}

 

 

3.I  do not use the APP_FillBuffer function instead of   lcd_DrawBmp (0,0,320,240,(unsigned short *)image)

then  lcdConfig.bpp=kLCDC_16BPP565 instead of 1BPP.

the lcd other configs are the same as the demo.

 

but ,download  this  program ,the TFT lcd do not show image,even nothing.

Original Attachment has been moved to: image.c.zip

ラベル(1)
0 件の賞賛
返信
1 返信

688件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Zhixiang,

    I got your updated information about this question in our Chinese EEFOCUS forum, that you already solved this problem.

    You said, the official code about color palette have problem, you write your own function then solved the problem.

   So, could you also share the details about your solutions?

   Thanks a lot.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信