AnsweredAssumed Answered

Displaying icon on TFT ?

Question asked by H.Rick on Apr 14, 2014
Latest reply on Aug 3, 2016 by Clive One
Guys,

Does anyone of you know on how to display array of bitmap to TFT LCD ?

I tried :
01.void LCD_DrawBMPFromFile()
02. {                                           
03.       char temp_buffer[100],line[512];
04.    int count,bmpData,bmpAddr;
05. 
06.      const int icon[220] =
07.    {
08.    0x42,0x4D,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x0A,
09.    0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
10.    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
11.    0x00,0x00,0x00,0x80,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
12.    0x80,0x00,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0xC0,0xC0,0xC0,0x00,0x00,0x00,0xFF,0x00,0x00,
13.    0xFF,0x00,0x00,0x00,0xFF,0xFF,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0x00,0x00,
14.    0xFF,0xFF,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,
15.    0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00,0x99,0x99,
16.    0x99,0x9F,0xFF,0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,
17.    0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00,
18.    0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00};
19. 
20. 
21.  //write LCD RAM here
22.            LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
23.              LCD_Clear(Yellow);
24.         for (bmpAddr; bmpAddr < 100; bmpAddr += 2)
25.          {
26.            bmpData = (uint16_t)(*(icon + bmpAddr)) + (uint16_t)((*(icon + bmpAddr + 1)) << 8);
27.            LCD_WriteRAM( bmpData );
28.          }
29. 
30. 
31. __inline void LCD_WriteRAM(uint16_t RGB_Code)                   
32.                 
33.{
34.  /* Write 16-bit GRAM Reg */
35.  LCD_RAM = RGB_Code;
36.}


but got no response, any clues ? thanks

Outcomes