[ARM] Displaying array to LCD ?

Status
Not open for further replies.

bianchi77

Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Activity points
9,442
Guys,

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

I tried :
Code:
void LCD_DrawBMPFromFile()
 {											 
   	char temp_buffer[100],line[512];
	int count,bmpData,bmpAddr;

  	const int icon[220] =
    {
	0x42,0x4D,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x0A,
	0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x80,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x00,0x80,0x00,
	0x80,0x00,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0xC0,0xC0,0xC0,0x00,0x00,0x00,0xFF,0x00,0x00,
	0xFF,0x00,0x00,0x00,0xFF,0xFF,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0xFF,0xFF,0x00,0x00,
	0xFF,0xFF,0xFF,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,
	0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00,0x99,0x99,
	0x99,0x9F,0xFF,0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,
	0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00,0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00,
	0x99,0x99,0x99,0x9F,0xFF,0x00,0x00,0x00};


  //write LCD RAM here
			LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
		  	LCD_Clear(Yellow);
		 for (bmpAddr; bmpAddr < 100; bmpAddr += 2)
		  {
		    bmpData = (uint16_t)(*(icon + bmpAddr)) + (uint16_t)((*(icon + bmpAddr + 1)) << 8);
		    LCD_WriteRAM( bmpData );
		  }


 __inline void LCD_WriteRAM(uint16_t RGB_Code)					 
				 
{
  /* Write 16-bit GRAM Reg */
  LCD_RAM = RGB_Code;
}

but got no response, any clues ? thanks
 

What TFT is it? Have you tried a hello world code to make sure there is communication?
 

It's SD1289, I have tested with GUI_Text and it's working fine...any clues ? thanks
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…