Jump to content


Photo

(Universal) Color LCD graphics library (2)

Color lcd ili9340 ili9342 ili9225 hx8340

  • Please log in to reply
116 replies to this topic

#101 jimchapman57

jimchapman57

    Noob Class

  • Members
  • 2 posts
  • LocationPalm Bay FL

Posted 26 July 2015 - 10:38 PM

I just received 2 of  the "Color LCD Booster Pack 2.4 320 x 240 opt touch panel". I am using CCS IDE with the display mounted on a MSP430F5529LP. 

 

Do you have a demo/library or know where I can find one that will help me get started working with this display board? 



#102 jimchapman57

jimchapman57

    Noob Class

  • Members
  • 2 posts
  • LocationPalm Bay FL

Posted 26 July 2015 - 11:22 PM

I was able to find success after changing the configuration pins in config.h and msp.h in the ugl16msp library. Thanks!


  • bluehash likes this

#103 hydra

hydra

    Noob Class

  • Members
  • 5 posts
  • LocationDublin

Posted 02 October 2015 - 05:10 PM

I decided to dust off my MSP430G2553 launchpad again and try and use it for a new proof of concept prototype application which needs either an OLED or small TFT display screen. So naturally one starts with a quick online google search to see what is out there currently. Searching for ILI9340 and MSP430 threw up this post. Happy day's I thought, this will speed things up on the TFT side as very little is out there. 

 

As you know there are 2 IDE's and coding methodologies I can use for the MSP430's. There is the quick and simple Energia and there is the more comprehensive Eclipse-based CCS.

 

So why is no one in the 43oh community being explicit in their documentation and explain to us users, who stumble across your fantastic work, as to exactly which IDE applies. The community needs to embrace Energia and not just assume that CCS is best for all things great and small, and then create their respective libraries in the correct format for both IDE's, and make mention of this in the readme files. I am left having to assume which IDE applies.

 

So if you have correctly formatted Energia libraries (typically just requires the right file structure) for ugl16msp and ugl8msp please could you let me know.

 

Thanks

 

-----------------------------------------------

 

Ok progress has been made.... and decided to update my own post.

 

So some 90 minutes later I eventually came across this post buried in this thread from @RobG (on page 4 written over a year ago) which explicitly makes comment that this library is for CCS and that if one wants to get an Energia compatible library then one must click on this link (http://forum.43oh.co...-library-suite/) which is yet another multipage forum post under section MSP Energia libraries. That takes you to this website:  http://embeddedcomputing.weebly.com/lcd_screen-download.html .

 

So thanks to those who created these libraries... your work is really appreciated.... we just need to find a better way to handle document structure and documentation to help us folks who decide to embark on proving a new idea navigate through this data overload.



#104 RobG

RobG

    Level 5

  • Members
  • 2,999 posts
  • LocationCary, NC, US


Posted 08 October 2015 - 11:08 AM

When I started ugl thread, Energia was in its infancy and your choice of IDE was either CCS or IAR.
I will try to find time to clean up some of my posts, but with so many things going on right now ( personal life, day job, hobby world, TI world,) that might take a long time.

#105 San66

San66

    Noob Class

  • Members
  • 4 posts
  • LocationSaint-Petersburg. Russia.

Posted 23 January 2016 - 04:48 PM

Thanks! Its working on MSP430G2553 and TFT177F254FPC from aliexpress. http://ru.aliexpress...1887213993.html

 * Pinout:
 LCD   MSP430
1 NC - NC
2 VSS - GND
3 LED - GND
4 LED - via 20Ohm to +VCC 3v3
5 VSS - GND
6 /RET +VCC 3v3
7 A0     - P1.4
8 SDA  - P1.7
9 SCK  - P1.5
10 VDDA +VCC 3v3
11 VDDIC +VCC 3v3
12 /CS - P1.0
13 VSS - GND
14 NC - NC


#106 San66

San66

    Noob Class

  • Members
  • 4 posts
  • LocationSaint-Petersburg. Russia.

Posted 01 February 2016 - 06:58 PM

Seems is the mistake with color here.

After "setColor(COLOR_16_RED);" digit printed be BLUE and vice versa. May be here reversing bit order?



#107 WilliamCampolina

WilliamCampolina

    Noob Class

  • Members
  • 2 posts

Posted 17 February 2016 - 01:24 PM

this is happening to me also, if someone has the solution would be happy.
I'm using msp430f5529LP
 
setColor(COLOR_16_RED);
 
 
 
duvida.jpg


#108 Tieri

Tieri

    Member

  • Members
  • PipPip
  • 18 posts

Posted 19 February 2016 - 09:58 AM

I had the same "issue" with some chinese displays. Could be the displays them self. Not that big issue to work around though.

Lähetetty minun X5 laitteesta Tapatalkilla

#109 RobG

RobG

    Level 5

  • Members
  • 2,999 posts
  • LocationCary, NC, US


Posted 01 March 2016 - 12:23 AM

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.


  • WilliamCampolina likes this

#110 ChristopheCloutierTremblay

ChristopheCloutierTremblay

    Noob Class

  • Members
  • 2 posts

Posted 08 March 2016 - 07:28 PM

Hi !

Is one of your library compatible with Kentec 3,5 inch using Energia (http://embeddedcompu...-stellaris.html) with TM4c123Gh6pm
 
Thanks !


#111 tripwire

tripwire

    Level 2

  • Members
  • 190 posts

Posted 08 March 2016 - 11:57 PM

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.



#112 WilliamCampolina

WilliamCampolina

    Noob Class

  • Members
  • 2 posts

Posted 23 March 2016 - 01:53 AM

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


#113 baslim

baslim

    Noob Class

  • Members
  • 1 posts

Posted 27 July 2016 - 06:32 PM

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



#114 zeke

zeke

    Level 5

  • Members
  • 1,666 posts
  • LocationCalgary, Canada

Posted 27 July 2016 - 07:38 PM

@baslim

 

You want to try using this other LCD library on the CC3200.


"Life is 10% of what happens to me and 90% of how I react to it" - Charles R. Swindoll

Electrons -> randomelectrons.com
Photons -> ninemicron.com


#115 Tieri

Tieri

    Member

  • Members
  • PipPip
  • 18 posts

Posted 23 November 2016 - 03:46 AM

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.


  • RobG and tripwire like this

#116 ulix

ulix

    Member

  • Members
  • PipPip
  • 18 posts

Posted 15 February 2017 - 10:16 PM

@RobG Sorry for bumping this up,

but somehow I get the error:

 

 

Error[e46]: Undefined external "_delay_cycles" referred in main ( C:\Users\ulix\Documents\MSP430\display\Debug\Obj\main.r43 )

 

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

 

thanks



#117 Tieri

Tieri

    Member

  • Members
  • PipPip
  • 18 posts

Posted 20 February 2017 - 11:38 PM

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







Also tagged with one or more of these keywords: Color, lcd, ili9340, ili9342, ili9225, hx8340

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users