Go Down

Topic: Ucglib: Color OLED and TFT Library... (Read 6840 times) previous topic - next topic

MarekB

#45
Aug 19, 2014, 01:50 am Last Edit: Aug 19, 2014, 01:53 am by MarekB Reason: 1
Hi Oliver,
just started to use your library with ILI9341 today, had to change the spi clock divider to SPI_CLOCK_DIV4 as SPI_CLOCK_DIV2 gave me white screen (I am on breadboard with CD4050 so maybe that's why). Anyway, the library looks great but I would like to use my own fonts (or at least bigger ones). Is there any chance you release a font generator that one can use to convert fonts to .c files (or at least parts of it)? I assume you did not write those 2MB fonts files manually.
And one more thing, setting the font mode to solid renders the text very slowly (using font of height 62). Anything I can do to speed it up? I tried setting clipping region but it did not help.

olikraus

Hi

The font converter is abilable here:
https://code.google.com/p/ucglib/source/browse/tools/font/bdf2ucg/bdf2ucg.c
I will create an issue on this to make bdf2ucg available as exe also.

BDF is a text based format, which is created by fony (windows font editor) or fontforge (another font editor) and also otf2bdf (ttf to bdf converter).

The font has some size restrictions. One glyph must not contain more then 255 bytes. This limits the size of a charcter to 32x64 pixel max. The logisoso font already is at the maximum of what is possible with ucglib.

Maybe it is faster instead of solid mode to draw a background box first and then use the transparent font mode. Also, the solid mode still has some bugs (see issue list).

Oliver

MarekB

Thanks Oliver. I am attaching the exe in case somebody needs it. I hope that's fine, let me know if it's not and I'll remove it.

olikraus


MarekB

#49
Aug 22, 2014, 05:40 pm Last Edit: Aug 28, 2014, 11:17 am by MarekB Reason: 1
Oliver, from what I read, your lib should support ILI9341 on Arduino Due. I assume that it works in HW SPI mode, right? Have you considered (or may you consider) adding Due's Extended SPI functionality? I have not found a library for ILI9341 that uses it. I am not sure how much it would speed things up but maybe it's worth a try.

olikraus

Hi

Acording to the Arduino SPI description, the extended SPI functionality includes automatic generation of the CS signal and precise controll of the SPI bus speed.

Ucglib makes use of the extended functionaly, the SPI bus speed is increased to the maximum what is allowed by the chipset, see line 1028 of Ucglip.cpp.

The CS signal is still set manually, but it does not toggle very often and the use of the extended SPI functionality will not increase speed but will instead put additional restrictions on which pins are allowed as CS signal.

So the answer is: Extended SPI functionality is already used.

From my perspective, Ucglib is very fast. Maybe you could compare Ucglib with the Adafruit Lib and UTFT. I think still Ucglib is as fast (or maybe faster) the the other two libraries. Only font rendering is slower, but this is mainly because of the much more powerful font functions.

Oliver

MarekB

Ok, that's fine, I'm not saying that Ucglib is slow, I was just wondering if Extended SPI mode would make it faster. I am going to try it now with Due and see how that goes. Thanks for the reply.

olikraus

Hi All

I have released version 1.01 of Ucglib. Follow the download link on the project page: https://code.google.com/p/ucglib/.

This release fixes a problem with the solid mode for font rendering. I have also added some more functions: drawGlyph, drawString and also functions to modify the reference position for strings.

Oliver

MarekB

Hi Oliver, I would need to debug something in one of the .c files you have under utility folder. Obviously Serial.print will not work and I've noticed that you were using printf. But where does it output to? What would I need to do to see the output messages?

olikraus

I have developed most of the procedures with SDL and Ubuntu Linux first. Some instructions are given here: https://code.google.com/p/ucglib/wiki/sdl

Oliver

TonyMach

Hello olikraus,

I used your U8glib a little bit with a small SSD1306 / I2C display, and I have to say I liked it a lot. Now I want to use a ILI9340 and ILI9341 based displays, so your Ucglib was a natural choice for me.

Unfortunately the displays I have offer no 3-/4-wire interface, but only parallel interface (8080 8-bit and 16-bit)... But I would be willing to add to the ILI9341 source. However, I am a little bit at loss what I should do to add a parallel interface. Should I follow the example from the ILI9325DS/itdb02 with regards to interface, and copy into a new file?

Tony

olikraus

Hi

In principle, you could use the ili9325 example. However the problem is much more complicated. If i remember correctly the ili9341 has a different 8 bit protocol which is not compatoble with the ili9325 8 bit protocol. Are you sure you have a ili9341 with 8 bit? it is very rare.

Additionally i finnaly decided to concentrate on SPI displays mostly with ucglib. There is good support for 8 bit devices by UTFT.

Oliver

Go Up