ILI9488_t3 - Support for the ILI9488 on T3.x and beyond...

I am also still not receiving anything on the MISO of this display... I have tried a couple of hacks, like I think I updated SPI library to try turning on the PU resistor on MISO pin, no difference. Change max speed to 2mhz on reads... Again still nothing. Next up double check wiring to this display...

And/or I have another display which is an ILI9486 (I think) and see If I can wire it up and make it work...
 
@wcalvert, @mjs513 - Try syncing again. I believe all of this was fixed in my other branch, that I had done the work to fix the DMA issue for T4, plus added support for multiple displays with frame buffers....
So I merged those changes in the master branch.

It's compiling now, thank you for the quick fix.
 
@KurtE
Strangeness with readPixel and readRect even on the ILI9341. Ok here it goes. I came up with a new test sketch:
Code:
#include "ILI9341_t3n.h"

ILI9341_t3n tft = ILI9341_t3n(10, 9, 8);
uint16_t colors[2500];

void setup() {
  tft.begin();
  tft.setRotation(2);
  tft.fillScreen(ILI9341_RED);
  Serial.print("Fill Screen Color S/B: ");
  Serial.println(CL(255,0,0),HEX);
  Serial.println(tft.readPixel(120,160),HEX);
  Serial.println();

  //tft.fillTriangle( 0,0,   180,0,  0,240,  ILI9488_BLUE);
  //tft.fillTriangle( 240,0, 120,0,  240,160, ILI9488_ORANGE);
  //tft.fillTriangle( 240,320, 120,320, 240,160, ILI9488_RED);
  //tft.fillTriangle( 2,320,  120,320,   0,160, ILI9488_YELLOW);
  tft.fillRect(0,0,240,320, ILI9341_YELLOW);
  //tft.fillRect(0,0,320,480, ILI9488_YELLOW);

  Serial.print("Rect Color S/B: ");
  Serial.println(CL(255,255,0),HEX);
  Serial.println("TEST 1 (1x1):");
  tft.readRect(120,160,1,1,colors);
  Serial.println(colors[0],HEX);
  Serial.println(colors[1],HEX);
  Serial.println(colors[2],HEX);
  
  Serial.println("TEST 2 (2x2):");
  tft.readRect(120,160,2,2,colors);
  Serial.println(colors[0],HEX);
  Serial.println(colors[1],HEX);
  Serial.println(colors[2],HEX);
  Serial.println(colors[3],HEX);
}

void loop() {
  // put your main code here, to run repeatedly:

}

Using the ILI9341 on a T3.6 on first load I get this:
Code:
Fill Screen Color S/B: F800
F800

Rect Color S/B: FFE0
TEST 1 (1x1):
20
0
0
TEST 2 (2x2):
FFE0
FFE0
FFE0
FFE0
and if I reload it again I get this
Code:
Fill Screen Color S/B: F800
0

Rect Color S/B: FFE0
TEST 1 (1x1):
20
0
0
TEST 2 (2x2):
20
100
2020
100
and if I reset it a few times:
Code:
Fill Screen Color S/B: F800
0

Rect Color S/B: FFE0
TEST 1 (1x1):
20
0
0
TEST 2 (2x2):
FFE0
FFE0
FFE0
FFE0
Output will vary on reset

If I try using the ili9488 - forget it doesn't work at all, all 0's (edit) this is all on a T3.6
 
@KurtE

If I try either the 9341 or the 9488 on the T4 its a complete no go. Always returns 0's for pixel data
 
@mjs513 - I have had luck with ILI9341 with the readPixels/rect, but as mentioned right now no luck at all with 9488 on either T3.6 or T4...

I thought I might try hooking up the other ILI9486 display to see if it works, but it looks like it is setup with a Parallel interface and not SPI. The SPI pins are there for SD Card...

So I will probably punt on that display.

The only other things you might try include: lower the SPI speed for read. I think it is currently set at 4mhz, try 2mhz...
Not sure what else to try yet...
 
@mjs513 - I have had luck with ILI9341 with the readPixels/rect, but as mentioned right now no luck at all with 9488 on either T3.6 or T4...

I thought I might try hooking up the other ILI9486 display to see if it works, but it looks like it is setup with a Parallel interface and not SPI. The SPI pins are there for SD Card...

So I will probably punt on that display.

The only other things you might try include: lower the SPI speed for read. I think it is currently set at 4mhz, try 2mhz...
Not sure what else to try yet...

@KurtE
Thought I answered this but I guess I forgot to hit save. Anyway, I give up for now. SPI Read was set at 2Mhz already. I could only get readPixel to work sometime on the T36. with the 9341. readRect works most of the time with the on the T3.6 with the 9341 display.

On the T4 couldn't get the 9341 or the 9488 working to readpixel or the readRect using the test sketch I put together above.
 
@KurtE

What tool are you using to generate font .h and .cpp files? This one by any chance: https://forum.pjrc.com/threads/54345-ILI9341_t3-font-editor

Sorry, I have not actually ever done any fonts... When I have needed them to play with, I either used the ones already in the library, or in some cases, Paul I think has a set of ili9341 fonts and Adafruit has a set of fonts and I think Frank...

@KurtE

Thought I would upload a video on what I did so far with the T4 and ArduCAM and the ILI9341 display: https://www.youtube.com/watch?v=Fp0MW_M0
So far it shows Video unavailable...
 
It works! Looks good!

Of course. I used what you taught me with all these displays we played with. Actually right now it's only doing 1 line at a time with write Rectangle :). Wanted just to see what would happen.
 
Morning all

Running into kind of a strange problem for. I porting a 3D library to the T4 (should work on the T3.x also) and using inheritance to get the display driver as the base class. In this case its the ILI934_t3n library. But for some reason its pulling the ILI9488 library fonts as well so I am getting errors for all the fonts. Here is an extract:
Code:
C:\Users\Merli\AppData\Local\Temp\arduino_build_400004\libraries\ILI9488_t3\ili9488_t3_font_ComicSansMS.c.o:(.rodata.ComicSansMS_8+0x0): multiple definition of `ComicSansMS_8'

C:\Users\Merli\AppData\Local\Temp\arduino_build_400004\libraries\ILI9341_t3n\ili9341_t3n_font_ComicSansMS.c.o:(.rodata.ComicSansMS_8+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

Using library Arduino_3d in folder: D:\Users\Merli\Documents\Arduino\libraries\Arduino_3d (legacy)
Using library ILI9341_t3n at version 1.0 in folder: D:\Users\Merli\Documents\Arduino\libraries\ILI9341_t3n 
Using library SPI at version 1.0 in folder: F:\arduino-1.8.9\hardware\teensy\avr\libraries\SPI 
Using library SPIN in folder: D:\Users\Merli\Documents\Arduino\libraries\SPIN (legacy)
Using library XPT2046_Touchscreen at version 1.3 in folder: F:\arduino-1.8.9\hardware\teensy\avr\libraries\XPT2046_Touchscreen 
[COLOR="#FF0000"]Using library ILI9488_t3 at version 1.0 in folder: D:\Users\Merli\Docum[/COLOR]

Here is the 3D library I am working on:
View attachment Arduino_3d.zip

Not sure why unless doing the constructor incorrectly.

EDIT: NEVERMIND - figured it out.
 
Last edited:
Hey guys, I've been lurking the forum for a little while but just made an account today.

I'm kind of new to writing code and trying to get the ILI9488_t3 library to work for me. I'm using a T3.6 but when I try to compile the graphics test out of the examples so that I can test my displays I just received I get some errors. I have used Paul's HX8357_t3 library with success on the Adafruit display.


Arduino: 1.8.9 (Windows 10), TD: 1.47, Board: "Teensy 3.6, Serial, 240 MHz (overclock), Faster, US English"

In file included from C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master\examples\graphicstest9488\graphicstest9488.ino:18:0:

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master/ILI9488_t3.h:891:18: error: 'ST7735_t3' has not been declared

void initButton(ST7735_t3 *gfx, int16_t x, int16_t y,

^

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master/ILI9488_t3.h: In member function 'void Adafruit_GFX_Button::initButton(int*, int16_t, int16_t, uint8_t, uint8_t, uint16_t, uint16_t, uint16_t, const char*, uint8_t)':

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master/ILI9488_t3.h:903:8: error: cannot convert 'int*' to 'ILI9488_t3*' in assignment

_gfx = gfx;

^

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master\examples\graphicstest9488\graphicstest9488.ino: At global scope:

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master\examples\graphicstest9488\graphicstest9488.ino:26:52: warning: invalid conversion from 'int' to 'SPIClass*' [-fpermissive]

ILI9488_t3 tft = ILI9488_t3(TFT_CS, TFT_DC, TFT_RST);

^

In file included from C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master\examples\graphicstest9488\graphicstest9488.ino:18:0:

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master/ILI9488_t3.h:234:2: note: initializing argument 1 of 'ILI9488_t3::ILI9488_t3(SPIClass*, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)'

ILI9488_t3(SPIClass *SPIWire, uint8_t _CS, uint8_t _DC, uint8_t _RST = 255, uint8_t _MOSI=11, uint8_t _SCLK=13, uint8_t _MISO=12);

^

Error compiling for board Teensy 3.6.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

What am I doing wrong?
 
I issued a PR to @mjs513 to hopefully fix this: https://github.com/mjs513/ILI9488_t3/pull/10

Probably should do more, like I did to ili9341_t3n where define our own button class, but main change here was to use the ILI94883_t3 class instead of ST7735_t3 class.

Also updated example app, as it needs &SPI as first parameter to constructor.
 
Apologize for being late on completing the merge - just woke up and saw the issue. Was a copy and paste error in copy paste error and forgetting to change the display type.

Merge as been completed so you should be good to go. I also just updated to match what @KurtE did to the ILI9341_t3n lib to define our own button class.
 
Thanks @mjs513.... My fix was a quick and dirty for the button, good that you did the other update as well.

Also was also wondering if there were any more examples without (&SPI in given in the constructor... Looks like they are all defined.

Otherwise I might suggest that we make that parameter Optional? Like adding a 2nd constructor...
We have: ILI9488_t3(SPIClass *SPIWire, uint8_t _CS, uint8_t _DC, uint8_t _RST = 255, uint8_t _MOSI=11, uint8_t _SCLK=13, uint8_t _MISO=12);

Could maybe add: ILI9488_t3(uint8_t _CS, uint8_t _DC, uint8_t _RST = 255, uint8_t _MOSI=11, uint8_t _SCLK=13, uint8_t _MISO=12);

But looks like it may not be issue any more...
 
Thanks guys. I made the changes that KurtE suggested to the h file and the example last night in the library I was using. Everything worked great.

I just downloaded the library with the other changes that were made as well and now it gives me some errors.

I just swapped the h file out with the one I had that worked and everything works again.



Arduino: 1.8.9 (Windows 10), TD: 1.47, Board: "Teensy 3.6, Serial, 240 MHz (overclock), Faster, US English"

In file included from C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master\examples\graphicstest9488\graphicstest9488.ino:18:0:

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master/ILI9488_t3.h: In member function 'void ILI9488_Button::drawButton(bool)':

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master/ILI9488_t3.h:926:45: error: no matching function for call to 'ILI9488_t3::setTextSize(uint8_t&, uint8_t&)'

_gfx->setTextSize(_textsize_x, _textsize_y);

^

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master/ILI9488_t3.h:333:7: note: candidate: void ILI9488_t3::setTextSize(uint8_t)

void setTextSize(uint8_t s);

^

C:\Program Files (x86)\Arduino\libraries\ILI9488_t3-master/ILI9488_t3.h:333:7: note: candidate expects 1 argument, 2 provided

Error compiling for board Teensy 3.6.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 
Just pushed a change to remove initial stuff for use of Adafruit Fonts. It will no compile with T3.x. Getting an error for T4 that propagated from a previous change that I have to sort out but should work for you.
 
Thanks @mjs513.... My fix was a quick and dirty for the button, good that you did the other update as well.

Also was also wondering if there were any more examples without (&SPI in given in the constructor... Looks like they are all defined.

Otherwise I might suggest that we make that parameter Optional? Like adding a 2nd constructor...
We have: ILI9488_t3(SPIClass *SPIWire, uint8_t _CS, uint8_t _DC, uint8_t _RST = 255, uint8_t _MOSI=11, uint8_t _SCLK=13, uint8_t _MISO=12);

Could maybe add: ILI9488_t3(uint8_t _CS, uint8_t _DC, uint8_t _RST = 255, uint8_t _MOSI=11, uint8_t _SCLK=13, uint8_t _MISO=12);

But looks like it may not be issue any more...

Will put on list of things to do - getting an error now on
Code:
es\ILI9488_t3\ILI9488_t3.cpp:3464:6: error: prototype for 'bool ILI9488_t3::fillDMApixelBuffer(uint8_t*)' does not match any in class 'ILI9488_t3'

 bool ILI9488_t3::fillDMApixelBuffer(uint8_t *dma_buffer_pointer)

      ^
will have to figure that one out tomorrow.
 
@mjs513 - I thought I would ask on this thread. With your current merge, what stuff needs looking at? The switch back from GFX font back to non GFX Font?

Again maybe issue about doing offset or not doing offset when we call setFont? Wonder if the code should work the same for the two code fragments?
Code:
tft.setFont();
tft.setCursor(x, y);

and:
Code:
tft.setCursor(x, y);
tft.setFont();

The case of maybe doing offsets maybe should only apply if you do something like:
Code:
tft.setCursor(x, y);
tft.setFont();
tft.print("System font: ");
tft.setFont(&FreeMonoBoldOblique12pt7b);
tft.print("Mono");
)
Thoughts?
 
@KurtE

Yeah - this is probably the better thread to discuss ILI9488.

So far the only thing that is not working is when you switch back to the back from GFX font back to non GFX Font?.

Just did a quick test of the offset in the y direction for your case 1 and 2. It works exactly the same way when you use the same font

That leaves your 3rd case where offsets needs to be adjusted when you switch fonts.
 
@mjs513 - I am trying to remember which display you have. If I remember correctly I may have fried one display... I do see I still have an ILI9486 display that may work. I will look again. I think the one I had/have was an RPI version. SO maybe it is hung off of an RPI still.

Kurt
 
@KurtE

Sorry - was upstairs installing new blinds without moving furniture for better angle - man I am getting old - every thing aches going up and down the ladder.

The ILI9488 display that I have looks like the ILI9341 but larger: https://www.ebay.com/itm/323888223741. Looks like the one on ebay but they are out of stock
 
Actually I found the one I was using earlier. Does not have the same touch controller. It is another BuyDisplay one I got on Ebay (from US...).

I now have it hooked up to T4 with your version of the frame buffer clip test...

Looks like the one bottom text gets sort of clobbered?

Looks like the opaque FB=0 at bottom of display...
 
Back
Top