News:

;) This forum is the property of Proton software developers

Main Menu

Universal Graphic Library

Started by atomix, Mar 09, 2022, 05:05 PM

Previous topic - Next topic

Teo

Hi  atomix,
Thank you very much !
Teo

Teo

Hi atomix,
Where can I download UGL ?
Thanks in advance,
Teo

atomix

In the first message of this topic.

RGV250

Hi,
I have just downloaded and had a look but I cannot see how you decide what display option to use.
For example in bigfont you have LCD_USE_TFT_280_240_320 which I am guessing is 2.8" 240 x 320 but what controller. Also if you have 8/16 bit as well?
I have a HX8352B display as well, is this covered or is it possible for me to add.

Regards,
Bob

RGV250

Hi,
Also noticed it is only for PIC18, if I comment out that line what are the chances of it running on PIC24 ?

Bob

atomix

The library only works on pic18

Supported Interfaces - I2C, SPI, 8080 8-bit

RGV250

Hi,
How do you select the interface. I have some displays that are similar but one uses spi and the other 8 bit. How do you select the controller type?

Bob

atomix

All examples are in the file - example.inc

I will be very busy now, so ask the forum members to help you.  :(

joesaliba

Need some help please. Using Windows 11 OS.

Positron 4.0.6.3.

Using this UGL library, I am creating fonts using the GLCD Font Creator. At first I had problems saving the .lcd, and after a Google search I ran it in Windows XP compatibility mode and it saved the file.

Now, when I do an include, i.e. Arial_16x16.inc, the include is being recognised by the compiler, but it is not being recognised by the LCD_SetFont(Arial_16x16).

What can I do to solve the issue please?

Also, I have an ST7789, 1.5", 240x240.

Am I correct to use the LCD_Select(LCD_TFT_130_240_240)? Seems that printing lines is ok at from position 0 to 240, but I discovered that I do not need to use any negative numbers for text / line position.

How can I select transparent background for text, and how to set full background colour to LCD?

atomix

#189
$define LCD_USE_TFT_130_240_240

$define LCD_RST     PORTC.3
$define LCD_CS      PORTC.7
$define LCD_DC      PORTC.2
$define LCD_CLK     PORTC.4
$define LCD_DAT     PORTC.5

Include "LCD\LCD_GFX.inc"
Include "LCD\Font\Arial_16x16.inc"

LCD_Select(LCD_TFT_130_240_240)

LCD_Init()
'LCD_Rotation(0)
LCD_Clear()

LCD_SetFont(Arial_16x16)

LCD_TextColor( YELLOW, YELLOW ) 'Font transparent
LCD_TextColor( GREEN,  BLACK ) 'Font opaque

if it doesn't help, then send the source code of your example to me in private messages.

joesaliba

Thank you Atomix,

Later today I will give it a try and let you know.

atomix

Proc LCD_CircleFill(X As Lcd_X, Y As Lcd_Y, R As Lcd_BR, F As WREG)

R - radius

F - flag mask for corner:  (1 - left top, 2 - right top, 4 - right bottom, 8 - left bottom, 15 - all)