ili9225

aster
Wed Aug 30, 2017 6:21 am
does anyone have a lib for the ili9225? it is present on cheap 2.0″ tft

i found this: https://github.com/Nkawu/TFT_22_ILI9225
and if no one have nothing i will make it working


stevestrong
Wed Aug 30, 2017 7:39 am
It looks very similar to what we already have: https://github.com/rogerclarkmelbourne/ … LI9341_STM

david.prentice
Thu Aug 31, 2017 1:08 pm
No, the ILI9225 is very different to the ILI9341.

It is closer to the ILI9325 i.e. registers with 16-bit data.

I think that the current Release of MCUFRIEND_kbv supports the ILI9225 in parallel mode. The Beta certainly does.
I have an unpublished ILI9225_kbv which uses SPI interface.

Please post a link to your actual display.
The photo in your link is for a write-only SPI interface.

David.


aster
Thu Aug 31, 2017 4:42 pm
it is this one
https://it.aliexpress.com/item/2-0-inch … 0.0.K8JluY

nicola.simeoni70
Sat Nov 25, 2017 8:12 am
Hi,
I tried the library, but to allow it to compile I had to modify some files:

file: TFT_22_ILI9225.h:
line 12: #if defined(ARDUINO_STM32_FEATHER) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1) || defined(STM32F1)

file: DefaultFonts.c:
line 7: #if defined(ARDUINO_ARCH_SAM) || defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1) || defined(STM32F1)

file Basic_demo:
#if defined (ARDUINO_ARCH_STM32F1)
#define TFT_RST PA1
#define TFT_RS PA2
#define TFT_CS PA0 // SS
#define TFT_SDI PA7 // MOSI
#define TFT_CLK PA5 // SCK
#define TFT_LED 0 // 0 if wired to +5V directly
#else
#define TFT_RST 8
#define TFT_RS 9
#define TFT_CS 10 // SS
#define TFT_SDI 11 // MOSI
#define TFT_CLK 13 // SCK
#define TFT_LED 3 // 0 if wired to +5V directly
#endif


RogerClark
Sat Nov 25, 2017 10:42 am
Did it work with those changes ?

rmdMoba
Sat Nov 25, 2017 5:15 pm
Hi,
currently I’m working on this library too. The most easiest way to get it running seems to define ARDUINO_STM32_FEATHER in the header file if STM32F1 is defined.#ifdef __STM32F1__
#define ARDUINO_STM32_FEATHER
#define PROGMEM
#endif

RogerClark
Sat Nov 25, 2017 7:38 pm
Thanks

rmdMoba
Wed Nov 29, 2017 9:14 am
Hi,
I forked the original library from post #1 and created a branch ‘stm32F1’ to do my changes. This now works with STM32F1 ( tested on blue pill and maple mini). I did some improvements to speed the lib up, but this is not complete so far, optimizing of drawing X-bitmaps and GFX fonts is still missing. But I think you can see the difference in speed. This is not STM32F1 specific, the speedup works with all supported platforms.

I’ve attached a sketched based on the Basic_Demo example, which you can use to see the difference. All delays are removed, so you see the pure drawing speed.

il9225Basic_DemoStm32.zip
(3.4 KiB) Downloaded 176 times

RogerClark
Wed Nov 29, 2017 9:28 am
Thanks

I don’t think I have a display with that controller, but perhaps some else has and can test it on their system


stevestrong
Wed Nov 29, 2017 9:47 am
[rmdMoba – Wed Nov 29, 2017 9:14 am] –
I did some improvements to speed the lib up, but this is not complete so far, optimizing of drawing X-bitmaps and GFX fonts is still missing. But I think you can see the difference in speed. This is not STM32F1 specific, the speedup works with all supported platforms.

In which files did you make the changes for speed up?


rmdMoba
Wed Nov 29, 2017 10:07 am
The changes are in the src/TFT_22_ILI9225.h and src/TFT_22_ILI9225.cpp files. The speedup can be done mainly bei an efficient use oft the window function (with auto incrementing/decrementing pixel addresses) of the controller. But it is very inefficient if you use this function when drawing a single pixel.
So I deleted its use in the drawPixel function, and added it in drawCharacter and drawBitmap.

Leave a Reply

Your email address will not be published. Required fields are marked *