Pages: 1 2 3 [4]   Go Down
Author Topic: Ucglib: Color OLED and TFT Library...  (Read 5942 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: August 18, 2014, 06:53:49 pm by MarekB » Logged

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

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
Logged

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

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.

* bdf2ucg.zip (15.55 KB - downloaded 5 times.)
Logged

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

Thanks for attaching.

Oliver
Logged

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

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.
« Last Edit: August 28, 2014, 04:17:43 am by MarekB » Logged

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

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
Logged

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

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

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

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
Logged

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

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?
Logged

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

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
Logged

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