News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Universal Graphic Library

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

Previous topic - Next topic

joesaliba

Quote from: Pepe on Apr 07, 2022, 02:15 AMJoesaliba test this

@Pepe

That is fenominal. Wow. That is what I am looking for.

Regards

Joe

Pepe

#81
Joesaliba I have created a procedure called putwindow that saves in a matrix the colors of the pixels of the window to be created to be able to overlay text and be able to redraw it keeping the previous background, for this I had to modify the LCD_Pixel() procedure of the created library by Atomix LCD_GFX, I don't know if Atomix would agree to include it and if so, optimize it with their higher knowledge than mine.
Attached a demonstration in proteus

atomix

#82
New Release.

- Added functions to work with the display graphics memory (GRAM).
- Added more examples.


To Pepe: Proteus has a bug when working with the display ST7735 (incorrect read memory).

Pepe

.
#83
Joesaliba do you need your modified code?

atomix

Yes, it would be nice if you publish the code.

Pepe

.
#85
Then I'll give it to whoever needs it.

atomix

#86
This code is just correcting the bug in Proteus, so under specific cases of use you can change it as you need.

JohnB

This may be a stupid question, but where do I find the definitive library, is it UGL.ZIP at the beginning of this Topic?
Would it not be a better solution and make it more accessible if you placed it in downloads  in the User Files section.?

JohnB

atomix

Yes, the latest version is in the first post.

tnencon

Can you share a simple program snippet for ST7789?

atomix

An example of display used can be seen in the file - example.bas in UGL.zip

Declare the display you want in lines (7 and 62) - example.inc

tnencon

Quote from: atomix on Jun 15, 2022, 06:46 AMAn example of display used can be seen in the file - example.bas in UGL.zip
Declare the display you want in lines (7 and 62) - example.inc

Thanks Atomiks for your quick response;
Even though I made the following changes in Example.inc, I couldn't get any images. Since there is no CS pin on the OLED LCD, I did not define it. Could this be the problem?

'$define LCD_USE_TFT_096_80_160
$define LCD_USE_TFT_130_240_240
'$define LCD_USE_TFT_114_135_240

$define LCD_RST    PORTD.5
'$define LCD_CS      PORTD.1
$define LCD_DC      PORTD.4
$define LCD_CLK    PORTD.7 
$define LCD_DAT    PORTD.6

'LCD_Select(LCD_TFT_096_80_160)
LCD_Select(LCD_TFT_130_240_240)
'LCD_Select(LCD_TFT_114_135_240)

atomix

#92
If you have a display - https://protoncompiler.com/index.php/topic,907.0.html#gallery_msg_6883_footer-7

Then he still needs to install SPI Mode 3, i.e. add

$define LCD_CLK_HIGH        ' set for display 1.3 inches 240x240

tnencon

Quote from: atomix on Jun 15, 2022, 08:13 AMIf you have a display - https://protoncompiler.com/index.php/topic,907.0.html#gallery_msg_6883_footer-8

Then he still needs to install SPI Mode 3, i.e. add

$define LCD_CLK_HIGH        ' set for display 1.3 inches 240x240

This line did not catch my attention. now everything is fine.
Thanks for the library.

Yves

Brilliant, very helpful elegant LCD and Oled drivers Atomix. It will be great to write a simple explanation for each LCD functions.

Regards,

Yves
Yves

tnencon

#95


Hello everyone, I get an error when I want to convert the picture I want to show on the oled screen with Image Converter. How can I solve this problem?

atomix

#96
1) What version of the OS do you have?
2) Try reinstalling .Net Framework -> https://www.microsoft.com/en-us/download/details.aspx?id=30653
3) Is there a file -> c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.VisualBasic.Compatibility.dll

@Yves: Later I will do this, but for now I am very busy at work to feed my family.

tnencon

Quote from: atomix on Jun 19, 2022, 04:18 PM1) What version of the OS do you have?
2) Try reinstalling .Net Framework -> https://www.microsoft.com/en-us/download/details.aspx?id=30653
3) Is there a file -> c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.VisualBasic.Compatibility.dll

@Yves: Later I will do this, but for now I am very busy at work to feed my family.
1)Windows10
2)Yes
3)It does not allow Net.Framework installation because Windows 10 is installed.
I'll try on a different computer today.

atomix

#98
Try a new file, tell me if there are errors or not.

tnencon

Quote from: atomix on Jun 21, 2022, 07:11 AMTry a new file, tell me if there are errors or not.

I'm at work right now so I can't test it. When I get home tonight, I'll test it and let you know the result.