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

atomix

Universal Graphic Library - allows you to work with a variety of displays (monochrome or color).

Interface:
- Software SPI, I2C, 8080 MCU 8-Bit Bus.    (maximum fast implementation)
- Custom User Hardware.

Buffer:
- Monochrome used:  Bytes = (Width * Height) / 8
- Color used: None

Image:
- Supported 16-Bit ( RGB565 ) and 8-Bit, 4-Bit ( Palette with RLE compression )
- RLE compression is based on the format of PCX graphic files and is significantly improved.

Fonts:
- Used X axis fonts
- To create fonts:
If cannot save font with GLCD Font Creator. In order to do that: right click on GLCD Font Creator -> Properties -> Compatibility check Run this program in compatibility mode for: Windows XP.

To use the program "Image_Converter.mf" or "Font_Converter.mf" you need to install LangMF Engine - https://langmf.ru/ftp/LangMF_setup.exe


atomix

#1
Examples of monochrome displays  -  https://protoncompiler.com/index.php?msg=6832

atomix

#2
Examples of color displays  -  https://protoncompiler.com/index.php?msg=6832

Yasin

@Atomiks I appreciate you very much. Very successful.

Yasin

I insist, I recommend. It is absolutely necessary to use this library. Transparent text works perfectly.

top204

#5
Nice code Atomix, and many thanks for creating and sharing it.

It is always pleasurable to see my baby (compiler) working fully, and being able to perform tasks in such a simple and efficient way.

Just one querk with the code. It does not have enough comments to say what is happening, or headers above the procedures for their operation. i.e. The parameter functions and what it will return, if anything etc.. So a user cannot tell how to use it, or what it is actually doing, and why it is doing it. :-)

My favourite way of performing that task, is:

'---------------------------------------------------------
' What the Procedure will do
' Input    : Parameter descriptions, otherwise "None" if no parameters or Global variables required as its input
' Output   : What it will return, otherwise "None" if no return or global variables loaded etc...
' Notes    : Any requirement or interesting things that happen in the procedure, otherwise "None", if nothing interesting to say about the procedure
'

Proc MyProc(pParam1 As Byte, pParam2 As Word), Float
EndProc


With the texts and the seperator lines, it makes a code's operations so much easier to understand and scan.

Pepe

#6
does it have procedures for sprites?

Yasin

#7
Proteus does not run the bas file using this library. But the generated hex works.

But proteus may be running old version.

Pepe

I could not simulate in oled ssd1306 with the hex in proteus

Yasin

I am currently compiling for nokia5110 (monochrome). The hardware is on my desk. I will give ssd1306 a try for you.

Pepe

show this

Yasin

The model files we use are not the same. I simulated in I2C mode.


Pepe

Show the same.

atomix

Quote from: top204Just one querk with the code. It does not have enough commments to say what is happening, or headers above the procedures for their operation. i.e. The parameter functions and what it will return, if anything etc.. So a user cannot tell how to use it, or what it is actually doing, and why it is doing it. :-)

I just wrote this library for myself and did not think that she was published here.
I unfortunately very little time and therefore I rarely write a comment.
When my time appears, I will try to write a comments.
If something is incomprehensible to the work of the library, then ask, I will answer.

Yasin

Dear @Pepe. This is link proteus simulation file. It's Normal working.

https://dosya.co/9b9j915124wj/Pepe.zip.html

Pepe

Thank you for your answer but it does not enable the option to download

Yasin

Interesting, it activates after waiting for a while on my computer. I uploaded it to a different location.

https://we.tl/t-sUZyBaLlNC

atomix

Pepe can you attach the file with Proteus.

Pepe

test works fine, example doesn't

Pepe

Atomix the problem is the version of the compiler with Positron works, with Proton 3.7.5.5 it doesn't