Jump to content
RobG

[Library] Color LCD graphics library

Recommended Posts

Here are 2 graphics libraries that can be used with my Color LCD BoosterPacks as well as some other LCDs

 

ugl8tiva works with:

1.8" JD-T1800 ST7735

2.2" ILI9225 (with touch panel or without, but touch is not implemented yet.)

ugl8tiva.zip

 

ugl16tiva works with:

2.2" 320x240 ILI9341

2.4" 320x240 ILI9341

ugl16tiva.zip (updated 4/27/15, new pinout)

 

MSP430 versions are here

 

Share this post


Link to post
Share on other sites

By default, all my LCD BPs have RC reset circuit. However, there's usually a jumper that allows reset to be connected to MCU. In software, all you have to do is configure pin as output and pull it low for a specified time before configuration.

Share this post


Link to post
Share on other sites

Not sure what the questions is, but

1) my first LCD was advertised as ILI9340, not ILI9341, so I just left it as 9340, it works with both,

2) this library was initially written to work with other controllers (<256 pixels,) but they were removed. I left this define in case I add new controllers.

Share this post


Link to post
Share on other sites

Please tell me how to convert FLOAT to CHAR and bring it to the screen? I read out data with external sensors. I write indications of the sensor in a variable (float type) and this value it is necessary to display on the screen.

Share this post


Link to post
Share on other sites

You can use an itoa function to convert an integer to a char, I have never tried this with a float though so not sure how the decimal point would work.

Share this post


Link to post
Share on other sites

Hey guys! I can't get this to compile for some reason on CCS 6. I've got the following errors:

"../tiva.c", line 40: error #20: identifier "GPIO_PB4_SSI2CLK" is undefined
"../tiva.c", line 42: error #20: identifier "GPIO_PB7_SSI2TX" is undefined

Any ideas? I've created a new project specifically for this launchpad, moved everything in, etc. and still no go!

Share this post


Link to post
Share on other sites

@@juchong, I just imported project from ccs5 to ccs6 and it worked.

The define you are missing is in [TiwaWare install dir]/driverlib/pin_map.h, so check your project settings.

I went ahead and checked the directories in my project settings tonight and wasn't able to find any issues with it.. I'm not getting any #define errors and it looks like CCS is finding everything. Any other ideas?

 

1_zps50637f6a.png

 

2_zps91761672.png

Share this post


Link to post
Share on other sites

Hi Rob,

 

 

I am using a TI TM4C123GH6PM microcontroller running @ 50MHz to interface to your 2.2 Color LCD with touch Booster pack.

 

Is there a quicker method for executing the "drawPixel" function? . I calculated the time it takes to execute this function is 187 microseconds @ 50MHz. But I need it to be faster cause I am creating a graphing application and the update rate is slow and the screen flickers. Right now it takes about 30ms to draw the data across the screen (157 pixels). Trying to cut it in half to around ~16ms (60 frames/sec)

 

 Does the "setArea" function need to be called every time the drawPixel function is executed or is there a way to bypass it so the setPixel function executes quicker.

 

Also, is it possible to change the SPI clock freq to make it clock in data faster to the LCD?

 

Where would I get the documentation for the LCD (LCD driver IC doc, NameBrand of LCD, electrical specs, etc.)?

 

 

Thanks for the help,

 

Brock

Share this post


Link to post
Share on other sites

drawPixel is used for drawing single, non-consecutive pixels, so you need to setArea before each pixel.

If the pixels are on the same row or column, use drawLine or fillRect, which call setArea only once.

 

You could improve the speed by removing function calls and duplicating SPI functions inside drawPixel.

Another thing you could do is utilize Tx buffer (my code was written to be universal, so I had to make some sacrifices.)

 

In my test code, I can draw about 750 pixels/30ms using drawPixel, so 157 sounds little low.

 

ILI9225 data sheet claims SPI clock speed up to 50MHz, but I have never tested it at those speeds.

 

 

 

LCD spec sheet may not be 100% accurate (I know for sure it was edited by the vendor.)

ILI9225DS_V022.pdfSQC22006A00NO_TP-spec1.0.pdf

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