Jump to content
Hassanul

Displaying .c Images Using Energia Sharp LCD BoosterPack Library

Recommended Posts

I have a MSP430FR5969 launchpad with the Sharp 96x96 LCD boosterpack. The out of the box application had a splash screen. I am aware that using CCS with the library, I could display .c images using the MSP430 image reformer that is included with the graphics library but I'm not really good at coding in C. I came from the Arduino, so I'm more familiar with the energia. Is there any way to display these .c image files on energia?

Share this post


Link to post
Share on other sites

@@chicken Inside the Graphics Library, there is an application 'image-reformer' . Its at \utils\image-reformer . It can convert a jpeg image to a .c file which can be used in CCS.  Here is a code of the TI logo I generated using that application

 
Thanks for your help. You guys are awesome!
 
#include "grlib.h"

static const unsigned char pixel_ti_logo11BPP_UNCOMP[] =
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0x81, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x3f, 0x80, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x0f, 0x81, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x0f, 0xe7, 0xc0, 0x1f, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x0e, 0x03, 0xc0, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x1e, 0x03, 0x80, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x1e, 0x07, 0x80, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x1e, 0x07, 0x80, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x1c, 0x07, 0x80, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x07, 0xfc, 0x07, 0xfc, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x0f, 0xfc, 0x0f, 0xfc, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x0f, 0xfc, 0x0f, 0xfc, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x0f, 0xf8, 0x0f, 0xf8, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xfe, 0x00, 0x0f, 0xf8, 0x0f, 0xf8, 0x00, 0x7f, 0xff, 
0xff, 0xf0, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x1f, 0xf8, 0x00, 0x7f, 0xff, 
0xff, 0xf0, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x1f, 0xf8, 0x00, 0x3f, 0xff, 
0xff, 0xf8, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x1f, 0xf0, 0x00, 0x1f, 0xff, 
0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1e, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1c, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3c, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3c, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x3c, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xff, 0x80, 0x00, 0x00, 0x01, 0xe0, 0x38, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xff, 0xc0, 0x00, 0x00, 0x01, 0xe0, 0x38, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xff, 0xe0, 0x00, 0x00, 0x01, 0xe0, 0x78, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xff, 0xf0, 0x00, 0x00, 0x01, 0xe0, 0x78, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xff, 0xf8, 0x00, 0x00, 0x01, 0xc0, 0x70, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xff, 0xf8, 0x00, 0x00, 0x01, 0xc0, 0x70, 0x00, 0x00, 0x0f, 0xff, 
0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xc0, 0x70, 0x00, 0x00, 0x1f, 0xff, 
0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xff, 0xf8, 0x00, 0x00, 0x1f, 0xff, 
0xff, 0xff, 0xfc, 0x00, 0x00, 0x03, 0xff, 0xff, 0x80, 0x00, 0x1f, 0xff, 
0xff, 0xff, 0xfe, 0x00, 0x00, 0x03, 0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 
0xff, 0xff, 0xfe, 0x00, 0x7c, 0x03, 0xff, 0xff, 0x80, 0x03, 0xff, 0xff, 
0xff, 0xff, 0xff, 0x00, 0xff, 0x03, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 
0xff, 0xff, 0xff, 0x81, 0xff, 0x01, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xc3, 0xff, 0x81, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xfe, 0x01, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x7f, 0xfc, 0x03, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0xe0, 0x07, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x01, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x01, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x01, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};

static const unsigned long palette_ti_logo11BPP_UNCOMP[]=
{
	0x000000, 	0xffffff
};

const tImage  ti_logo11BPP_UNCOMP=
{
	IMAGE_FMT_1BPP_UNCOMP,
	96,
	96,
	2,
	palette_ti_logo11BPP_UNCOMP,
	pixel_ti_logo11BPP_UNCOMP,
};

post-37441-0-87146100-1403020172_thumb.jpg

Share this post


Link to post
Share on other sites

Here you go @@Hassanul, I added a simple method to my Energia library that allows to display images like the TI logo.

 

https://github.com/astuder/MSP430-sharp-LS013B4DN02-memory-display/tree/master/energia

// display TI logo for 2 seconds
display.bitmap(pixel_ti_logo, 96, 96, 0);
delay(2000);

post-9974-0-28705900-1403312923_thumb.jpg

and yes, my SHARP display is literally catching dust [:rolleyes:]

Share this post


Link to post
Share on other sites

Thanks @@chicken

I uploaded the code, installed the library but nothing appeared on my screen. After reading the wiki I got it to work. 
Thanks alot for your help[emoji106][emoji106]

Sent from my GT-N7105 using Tapatalk

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...