Pages: 1 2 [3] 4   Go Down
Author Topic: Ucglib: Color OLED and TFT Library...  (Read 5523 times)
0 Members and 2 Guests are viewing this topic.
Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Has any further progress been made with the ILI9325C? Particularly using in SPI mode?
A display with such configuration has arrived, but i did not found time to work on this until now

Oliver

I was working for several hours on the ILI9325C with SW SPI.
Good news is, it should already work with:
Code:
Ucglib4WireSWSPI ucg(ucg_dev_ili9325_18x240x320_itdb02, ucg_ext_ili9325_18, /*sclk=*/ 13, /*data=*/ 11, /*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8)
If the ILI9325C is put into
IM0=1, IM1=1, IM2=1, IM3=0
mode.

But somehow it does not work. Any ideas?

Oliver
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Oliver,

I did play around with this as well as something similar in below, but could not get this working either.
Code:
Ucglib4WireSWSPI ucg(ucg_dev_ic_ili9325_18, ucg_ext_ili9325_18, /*scl=*/ 15, /*sda=*/ 14, /*cd=*/ 16, /*cs=*/ 13, /*reset=*/ 12);

I see in the below thread bauderline posted a video that is supposed to show this display working, but unfortunatly has not include any sample code. I have tried to raise him via email and on the forum but have yet to receive a response.
http://forum.arduino.cc/index.php/topic,210474.0.html
Logged

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Somehow this display does not respond in SPI mode with IM0=1, IM1=1, IM2=1 and IM3=0 at all. Probably i have to rewire all and test with a different SPI mode. 

Oliver
Logged

Oklahoma
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, I love U8glib and I'm really excited to see Ucglib as well. I wanted to mention that the C++ interface doesn't seem to have a method for getting the font line spacing as in U8glib.

Also, I was wondering what the best method of rendering a full screen of changing stuff on the SSD1351 would be without a tone of flickering? I'm trying to build a really nice display for a reverse geocaching box so the screen needs to update at least once a second.
Logged

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi tjpeden

hmmm... line spacing i did not add as of now. It could be easily derived by from ascent - decent value of the current font.

Flickering will be there with ucglib. I t can not be avoided. U8glib does not have this flickering, but requires the more complicated "picture loop".
Both libs support the SSD1351...

Oliver
Logged

Oklahoma
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What about sleep mode for the SSD1351. The datasheet says the commands are AE for sleep on and AF for sleep off, it doesn't look like you've implemented the sleep functions yet. I'm not sure how to go about it since there aren't even functions for it yet.
Logged

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, i have added issue 27 for this.

Oliver
Logged

Oklahoma
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

2 more questions:

First, is there any chance of 1.01 (issue 27) being released before June 15? I have a project that I'm deploying that could really benefit from the power reduction that enhancement would gain me.

Second, what do you think about parsing the string passed to print for '\n' and setting the print position to "x position from last setPrintPos call, y position from last setPrintPos call + 'font line spacing'"? Hope that makes sense. Not a big deal, just something I have wanted to ask for a while.

Lastly, I really enjoyed working with Ucglib (and U8glib), great work! I really appreciate the work you've put into your libraries :-)

TJ
Logged

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First, is there any chance of 1.01 (issue 27) being released before June 15? I have a project that I'm deploying that could really benefit from the power reduction that enhancement would gain me.
Unfortunately i will not be able to do this that fast. Job and family do have higher priority. And currently not much time is left.

Second, what do you think about parsing the string passed to print for '\n' and setting the print position to "x position from last setPrintPos call, y position from last setPrintPos call + 'font line spacing'"? Hope that makes sense. Not a big deal, just something I have wanted to ask for a while.

I think it should be possible to do this outside of ucglib. But i just notice that drawGlyph is missing as a function (at least it is not described). Added one more issue to ucglib.

Lastly, I really enjoyed working with Ucglib (and U8glib), great work! I really appreciate the work you've put into your libraries :-)

Thanks for your remarks and enhacement requests.

Oliver
Logged

Villeurbanne (France)
Offline Offline
Full Member
***
Karma: 2
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

Congratulation for you library. I load it on yesterday. I tried the programm hello world with a mega2560 and SWD SPI  (HWD gives only a white screen).
I change some lines so as to test functions and had a surprise : when using setRotate(270), it rotate text of 270° but rotate background color of another angle.

Here is my code :

Code:
void loop(void)
{
  ucg.setRotate90();
  ucg.setFont(ucg_font_ncenB24r);
  ucg.setColor(1, 255, 255, 255);   //  text background color
 
  ucg.setColor(255, 0, 0);    //  red
  ucg.setPrintPos(0,25);
  ucg.print("Hello World!");

  ucg.setRotate270();
  ucg.setColor(0, 0, 255);   //  blue
  ucg.setPrintPos(0, 75);
  ucg.print("Hello World!");

  delay(500); 
}

and here is the result :





Logged

*** Micol *** resolutly politically NOT correct

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great. Excellent error description. I will create an issue for this.
Meanwhile, UCG_FONT_MODE_TRANSPARENT could be used as a workaround.

K+

Oliver
Logged

Villeurbanne (France)
Offline Offline
Full Member
***
Karma: 2
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I tried other examples. All work with SWD spi only.
Scale runs since yesterday. It tells now 12982  12983 ...
I stop it à 13000.
Logged

*** Micol *** resolutly politically NOT correct

Villeurbanne (France)
Offline Offline
Full Member
***
Karma: 2
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To get rid of 4050 or resistors, I ordered ProMini 3.3Volts.
Now, all works fine (HwdSpi and SwdSpi).

I had a surprise with GraphicsTest.ino whose texts are upside down.


Logged

*** Micol *** resolutly politically NOT correct

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1515
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

Looks odd. What is the constructor call you use? Do you have a datasheet of this device?
Will UTFT work with your TFT?

Oliver
Logged

Villeurbanne (France)
Offline Offline
Full Member
***
Karma: 2
Posts: 126
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

My constructors are either
Ucglib_ILI9341_18x240x320_SWSPI ucg(/*sclk=*/ 13, /*data=*/ 11, /*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8 ) ;
or
Ucglib_ILI9341_18x240x320_HWSPI ucg(/*cd=*/ 9 , /*cs=*/ 10, /*reset=*/ 8 );

Now, it works well though I have not changed anything to wiring. I only tried and played other example programs.


I have not installed UTFT library.
Before your library, I tried 2 Adafruit libraries (9340 then 9341) and their examples. Some worked, other not, but I use ProMini 3.3V only today.
My TFT is a low cost ILI9341 one withour any datasheet.
Logged

*** Micol *** resolutly politically NOT correct

Pages: 1 2 [3] 4   Go Up
Jump to: