Jump to content
43oh

(Universal) Color LCD graphics library (2)


Recommended Posts

  • 3 weeks later...
  • Replies 127
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

This is my new universal graphics library (original one is here.)   Supported boards (this is out of the "box" support, but the library will work with any board after small changes.)   TI's MSP430

This was the case, at least for me. According to the datasheet I have for this display, the RGB/BGR direction is controlled by HW pin, so I made the following changes to the code in graphics.c file.

Here's something you can use for testing (software SPI only.)   ugl16stella.zip

Posted Images

  • 2 weeks later...

I will take a look once I find some time, but this could be caused by different default settings of the display driver (I am setting only few basic things in configuration function.)

Should be an easy fix.

 

Yeah, it looks like RGB vs BGR colour ordering. I guess the displays that do this need some specific setup to pick the right mode. If they don't offer a setting for component order then the red and blue bits would need to be swapped in setColor.

Link to post
Share on other sites
  • 2 weeks later...
I have a msp430f5529'm using your lib ... however if I for example put

 

while (1) {

    clearscreen (1);

    setColor (COLOR_16_WHITE);

    drawString (5, 0, FONT_MD, "Menu");

}

 

in a while ... I can see it flashing ... is this normal? I thought it would blink so fast I could not see ...

 

if you can help me guide me too ... if I'm making a menu

Link to post
Share on other sites
  • 4 months later...

Hi Rob, 

 

I am trying to test your LCD on a CC3200 and the MSP430FR4133 launchpads - I have changed the pins for each board, however your code does not compile, giving such as "P1SEL is undefinded, P2SEL is undefined" and about 8 other definition errors. I'm not sure if there is a header file that I've misplaced or if the code is just not compatible with my boards.  Any help with getting the glass to work on my boards is appreciated!

 

Thanks

Link to post
Share on other sites
  • 3 months later...

Yeah, it looks like RGB vs BGR colour ordering. I guess the displays that do this need some specific setup to pick the right mode. If they don't offer a setting for component order then the red and blue bits would need to be swapped in setColor.

This was the case, at least for me. According to the datasheet I have for this display, the RGB/BGR direction is controlled by HW pin, so I made the following changes to the code in graphics.c file.

void setColor(u_int color) {
#if defined SWAP_TO_BRG
    colorLowByte = (color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11;
    colorHighByte = ((color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11) >> 8;
#else
    colorLowByte = color;
    colorHighByte = color >> 8;
#endif
}

void setBackgroundColor(u_int color) {
#if defined SWAP_TO_BRG
    colorLowByte = (color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11;
    colorHighByte = ((color & 0x07FF) << 11 | (color & 0x07E0) | (color & 0xFFE0) >> 11) >> 8;
#else
    bgColorLowByte = color;
    bgColorHighByte = color >> 8;
#endif
}

Then I just defined "SWAP_TO_BRG" and the colors work as they should.

I know this is old discussion, but decided to post this anyway in hope that it might be helpful to someone.

Link to post
Share on other sites
  • 2 months later...

@@RobG Sorry for bumping this up,

but somehow I get the error:

 

 

Where is the function: _delay_cycles defined and why do I get this error?

 

thanks

What IDE are you using? Function _delay_cycles() is part of the msp430 framework (<- I may not be using right word here?) in CCS (Code Composer Studio IDE).

Link to post
Share on other sites
  • 2 weeks later...
  • 4 months later...

Is there an Energia library that support ILI9341 running on CC3200 or other simplelink launchpad?

I was happy for a minute as I found this post by Rei Vilo but then I discovered that the libraries are no more available for download, also I am not sure if they would run on CC3200

Another related question is: has anyone succeeded to use adafruit GFX libraries for Arduino (I mean with TI simplelink launchpad using Energia)?

Or what does it take to port the library?

Any help would be appreciated,

Thanks

Guy

 

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...