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

Pepe

It's not mine, it's being developed by Joesaliba, I just reformed it with the universal library to help it, it all started with transparent fonts

Pepe

Quote from: top204 on Mar 21, 2022, 06:37 PMExcellent coding Atomix, and many thanks.

If using a USB device, but no USB peripheral is being used, the compiler can be told that the device does not contain a USB peripheral and it will free up all the dual port RAM available on it, because it no longer needs the USB buffer to be implemented. Use the declare:

Declare Onboard_USB = 0

I only now realize that it was actually wrong to have used the $Define freeram and Declare Onboard_USB off statements together because of the risk of overlapping ram addresses.

Maxi

@atomix thank you for your wonderfull code.

top204

My apologies Joesaliba, and thanks Pepe. It looks excellent Joesaliba, and reminds me so much of the good old flight simulator programs from the 1980s. :-)

I still remember the first flight simulator I saw on an 8-bit machine. It was for the Sinclair ZX81, in about 1982, and for its time and for the machine it was working on it was very, very good! Very limited by the 16K RAM and crude graphics capabilities of the machine, but brilliantly written.

joesaliba

Quote from: top204 on Mar 22, 2022, 09:23 PMMy apologies Joesaliba, and thanks Pepe. It looks excellent Joesaliba, and reminds me so much of the good old flight simulator programs from the 1980s. :-)

I still remember the first flight simulator I saw on an 8-bit machine. It was for the Sinclair ZX81, in about 1982, and for its time and for the machine it was working on it was very, very good! Very limited by the 16K RAM and crude graphics capabilities of the machine, but brilliantly written.

Hi Les,

I cannot take credit for this artificial horizon as I converted a code I found on the internet. Having said that, it was Pepe that unlocked an anomaly in the ST7735 library for it to work great.

The original library was a bit too slow, but this library that @atomix did is faster.

This shows what a great community this forum is.

I need to add speed, and altitude but it is not happening soon. I will post the project on the wiki once done.

This is the 2.3m helicopter that these artificial horizon is going in. Currently designing the cockpit for 3D print.

Sorry @atomix for hijacking this thread. In future I will be looking how I can read from an image from an SD card and load it into the ST7735.

I have seen some Arduino examples loading sprites and able to rotate them. This will simulate a compass. Another display will simulate a map etc...

Regards

Joe

Bell 412.jpg

top204

#65
As soon as I can get some time, I am going to look at creating a set of procedures that use DMA to fill or read a window on an LCD. It should make things a lot faster when creating fonts, images or sprites etc...

When I first started writing code for the colour graphic LCDs, about 12 years ago with an ILI9320, I was amazed at how fast the 8-bit parallel interface is on them. For anything with moving images, SPI is quite slow, and I2C is a waste of time because it is soooo slow. :-) It has to be parallel.

Yasin

Hardware serial communication has improved a lot lately.  :o


joesaliba

Hi,

I have a variable that is printing to a different position. How can I erase, (or print on it) without effecting the background please?

As the background is moving and change colour, I cannot set background text to LCD background colour.

Is there a way or I have to live with it?

Thank you

Regards

Joe

atomix

I do not quite understand what you want can show an example.

Pepe

Joesaliba you need this?

joesaliba

Sorry for late answer. I will check when at my pc.

Joe

atomix

Soon I will post an update, it will support images:

  • 16 bit without compression
  • 8 Bit with compression
  • 4 Bit with compression

atomix

New Release.

- Images are supported 16-Bit ( RGB565 ) and 8-Bit, 4-Bit ( Palette, RLE compression ).
- RLE compression is based on the format of PCX graphic files and is significantly improved.
- Fully rewritten program (Lib\LCD\Image\Image_Converter.mf) for converting images.

Pepe

#73
Joesaliba you need this?
In the simulation in proteus I have to re-initialize the screen because when the values of the gram are read, then it does not return to the command mode, I think it is a proteus error,
I create two procedures, one getwindow and the other putwindow
that uses the video area that needs to be protected but takes up a lot of ram.
the version 4.0.2 is for simulation in proteus and the 4.0.2 is for test in hardware I don't have a display for test it.

Pepe

Atomix is it a proteus bug when I use rotation 2 and 3?

joesaliba

Pepe,

I can see that with v4.0.1, which I think is for hardware, looks promising, however background is of multiple different colour.

Joe

joesaliba

Atomix,

Thank you for the library which include the image converter.

Can you please share a small code how to include the image on a screen once converted?

I am using an ST7735 128 x 160.

I have seen examples on the internet where an image can be turned around on a pivot point. Is this possible with your library?

Thank you
Regards

Joe

atomix

QuoteCan you please share a small code how to include the image on a screen once converted?
Look in the example UGL.ZIP -> example.inc -> Lines: 52 and 175

QuoteI have seen examples on the internet where an image can be turned around on a pivot point. Is this possible with your library?
No, it is too difficult and slow.

To Pepe: I'll see the other day that the problem.

Pepe

Thank you Atomix for your consideration.

Pepe

#79
Joesaliba test this