ili9225

Can someone help me port this library?
aster
Posts: 110
Joined: Thu Mar 30, 2017 2:41 pm
Location: bella italy
Contact:

ili9225

Post by 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
Posts: 1813
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: ili9225

Post by 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
Posts: 112
Joined: Wed Nov 16, 2016 8:52 am

Re: ili9225

Post by 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
Posts: 110
Joined: Thu Mar 30, 2017 2:41 pm
Location: bella italy
Contact:

Re: ili9225

Post by aster » Thu Aug 31, 2017 4:42 pm


nicola.simeoni70
Posts: 2
Joined: Sat Nov 25, 2017 7:41 am

Re: ili9225

Post by 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

User avatar
RogerClark
Posts: 7440
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: ili9225

Post by RogerClark » Sat Nov 25, 2017 10:42 am

Did it work with those changes ?

rmdMoba
Posts: 19
Joined: Thu May 11, 2017 10:44 am
Location: Franconia, Germany

Re: ili9225

Post by 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.

Code: Select all

#ifdef __STM32F1__
#define ARDUINO_STM32_FEATHER
#define  PROGMEM
#endif
Additionaly I had to uncomment

Code: Select all

#define SPI_HAS_TRANSACTION
in SPI.h of Stm32duino, so that the lib could change the SPI frequency.

With some further modifications this library can be significantly accelerated.
If this is of interest, I will suggest it here when i am finished with my testing.

P.S. of course the above mentioned changes in DefaultFonts.h have to be done too. And the ports must be adjusted in the examples.

User avatar
RogerClark
Posts: 7440
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: ili9225

Post by RogerClark » Sat Nov 25, 2017 7:38 pm

Thanks

rmdMoba
Posts: 19
Joined: Thu May 11, 2017 10:44 am
Location: Franconia, Germany

Re: ili9225

Post by 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 5 times

User avatar
RogerClark
Posts: 7440
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: ili9225

Post by 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

Post Reply