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

Couldn't get the UpdateAsyncCont_Test example to work properly on T4.1. I can see "Starting up DMA Updates" in the serial monitor after I send some input, but the screen just reads "*** Press key to start ***" the whole time.
 
Last edited:
I am having problems with my teensy 4.1 going into a new 9488.

Can anyone confirm what the correct pin to pin connection should be? I have one of the red ones with the same pinout on the back as the 9341. I get backlight but no colors. I have tried a few examples... Looking to start with 9488_Colortest.

Do all the pins need to be connected; all the touch screen pins?
 
Right now I am running a 9488 (red one with same...) on a Teensy Micromod. On my same board I run it or the ILI9341.

I have not run that example in a long long time. Looks like maybe back when the T4 was was probably in beta mode.
The default pins in the sketch for ILI9488 looks like T4.x the defaults in that sketch are:
Code:
#define TFT_RST 23
#define TFT_DC 9
#define TFT_CS 10
Which are not too bad.,
My board was setup with some semi random pins for this:
Code:
#define TFT_DC 9
#define TFT_CS 32
#define TFT_RST 31
// used for XPT2046
#undef TOUCH_CS
#undef TOUCH_TIRQ
#define TOUCH_CS 26
#define TOUCH_TIRQ 27
ILI9488_t3 tft = ILI9488_t3(TFT_CS, TFT_DC, TFT_RST);
And it appears to work fine with it. Note, I am not using any of the touch stuff in this sketch.

On this board the Backlight is connected to +5v through a resistor. Which I think is something like 120... The ILI9341 product sheet shows 100
https://www.pjrc.com/store/display_ili9341_touch.html
 
Right now I am running a 9488 (red one with same...) on a Teensy Micromod. On my same board I run it or the ILI9341.

I have not run that example in a long long time. Looks like maybe back when the T4 was was probably in beta mode.
The default pins in the sketch for ILI9488 looks like T4.x the defaults in that sketch are:
Code:
#define TFT_RST 23
#define TFT_DC 9
#define TFT_CS 10
Which are not too bad.,
My board was setup with some semi random pins for this:
Code:
#define TFT_DC 9
#define TFT_CS 32
#define TFT_RST 31
// used for XPT2046
#undef TOUCH_CS
#undef TOUCH_TIRQ
#define TOUCH_CS 26
#define TOUCH_TIRQ 27
ILI9488_t3 tft = ILI9488_t3(TFT_CS, TFT_DC, TFT_RST);
And it appears to work fine with it. Note, I am not using any of the touch stuff in this sketch.

On this board the Backlight is connected to +5v through a resistor. Which I think is something like 120... The ILI9341 product sheet shows 100
https://www.pjrc.com/store/display_ili9341_touch.html

Great! I'm going to try them on this. I tried dc 9 and cs 10.

Would not using a resistor cause this problem?
 
Yeah this is weird I can't get it to work. I know the pins are right. I have tried multiple configurations. I have to be missing something obvious
 
You might try changing the example code some: In particular it defaults to try to run at SPI speed of 30mhz...
You can change this, to something like 20mhz on the begin method: tft.begin(20000000);

As I mentioned it defaults to 30mhz and some version may have defaulted to higher like 40 or 72mhz. But depending on how you have it wired. like to breadboard with wires, this can cause issues.

Also picture of setup can help. Have run into issues in past where people tried to use breadboard but did not solder the pins to the Teensy. Or wires were off by one or...
 
Yeah I am going straight onto the teensy. I have tried wiring and rewiring several times lol. I'll post a pic tonight if I still can't get it to work. Going to gather up a bunch of different cables, and try all my ports too. Have two computers to try on

Is there another example you could recommend? Or just a specific one from that lib? I don't know the way these libraries and displays work well enough to have ANY confidence in messing with them. Anything that will get me rolling and allow me to verify the display?

This 4.1 I bought pre-soldered direct. I have a few others I can try but I don't see any reason for there to be an issue with this one. Again lol if there is any example you can recommend that's got all the pinouts straight laid out that should work, it would be huge help!

That way I can have something to start with and work my way backwards to a point where I understand how it all works and make my own GUI
 
That one is pretty simple. You might cut out all of the stuff to configure for different Teensy types, and then just put one pin configuration for which pins you are using.

If things still don't work, I tend to run a pin test sketch to verify the pins are the ones I think they are and that they are being detected.
I have included 0ne that @defragster and myself hacked on a long time ago

You can use the Serial terminal to alternate between setting all pins high or all pins low (PULL_UP or PULL_DOWN) and then you can use jumper wire to opposite, that is in PULL_UP mode, to GND. The program scans the pins for changes. So if you connect GND to lets say pin 10, it should print that out when you do it and show release when you undo...

And when you switch modes it tries to look for obvious shorts. That is if it sets pin 10 high and pin 11 also goes high it will flag that as possible...
 

Attachments

  • HiLowTest-230417a.zip
    1.1 KB · Views: 27
That one is pretty simple. You might cut out all of the stuff to configure for different Teensy types, and then just put one pin configuration for which pins you are using.

If things still don't work, I tend to run a pin test sketch to verify the pins are the ones I think they are and that they are being detected.
I have included 0ne that @defragster and myself hacked on a long time ago

You can use the Serial terminal to alternate between setting all pins high or all pins low (PULL_UP or PULL_DOWN) and then you can use jumper wire to opposite, that is in PULL_UP mode, to GND. The program scans the pins for changes. So if you connect GND to lets say pin 10, it should print that out when you do it and show release when you undo...

And when you switch modes it tries to look for obvious shorts. That is if it sets pin 10 high and pin 11 also goes high it will flag that as possible...

I got thrown a life curveball haven't even touched the teensy...

Thank you this is perfect. I will test it shortly. Thank you again.
 
Hello Everybody,

Yesterday I got a DFROBOT DFR0669 display, which uses an ILI9488 chip. Because of my project based on the ILI9341_t3 display library. This library seems an easy change but i’ve got some/near poor performance. I draw a line 20pixel after 20pixel near every 40ms repeatedly and it gives a fragmented moving red line, it looks like the display refreshes slower the vertical axis than the horizontal or at least not in sync or something, I don't know that deeply... :(
(the picture is rotated down below. The x0,y0 origin is at the right top corner on the picture.)
I would to ask, Is this the max performance what I can expect from this display?
I tried with slower/faster SPI speeds, shorter wires, but nothing...

Thanks
Robert

Example code

Screenshot 2023-11-21 at 20.00.18.png


#include <SPI.h>
#include <ILI9488_t3.h>

#define TFT_RST 8
#define TFT_DC 10
#define TFT_CS 9
#define TFT_SCK 13
#define TFT_MISO 12
#define TFT_MOSI 11
ILI9488_t3 tft = ILI9488_t3(&SPI, TFT_CS, TFT_DC, TFT_RST);
DMAMEM RAFB fb1[480 * 320];
#define SPI_SPEED 40000000
unsigned long previousMillis = 0;
long interval = 40;
int dummyX=10;

void setup() {
Serial.begin(9600);
tft.begin(SPI_SPEED); tft.setRotation(3);
tft.setFrameBuffer(fb1); tft.useFrameBuffer(true);
tft.fillScreen(ILI9488_BLACK); tft.setTextColor(ILI9488_WHITE); tft.setTextSize(2);
tft.setCursor(20,65); tft.print("HELLO");
tft.updateScreen(); delay(1500);
interval = 40;
}
void loop() {
unsigned long currentMillis = millis();
if(currentMillis-previousMillis >=interval){ previousMillis = currentMillis;
tft.fillScreen(ILI9488_BLACK); tft.drawLine(dummyX,0,dummyX,320,ILI9488_RED);
dummyX+=20; dummyX%=480;
}
tft.updateScreen();
}
 
Last edited:
Yesterday I got a DFROBOT DFR0669 display, which uses an ILI9488 chip. Because of my project based on the ILI9341_t3 display library. This library seems an easy change but i’ve got some/near poor performance. I draw a line 20pixel after 20pixel near every 40ms repeatedly and it gives a fragmented moving red line, it looks like the display refreshes slower the vertical axis than the horizontal or at least not in sync or something, I don't know that deeply... :(
(the picture is rotated down below. The x0,y0 origin is at the right top corner on the picture.)
I would to ask, Is this the max performance what I can expect from this display?
I tried with slower/faster SPI speeds, shorter wires, but nothing...

There is something that is bothering about your drawline so I redid it with calling a function from the graphics test sketch and seems not to be an issue and I am updating the screen quite a bit. Note that I am also running at 60MHZ. If you draw the whole screen instead of the way i did it, screen update is even faster.

Code:
#include <SPI.h>
#include <ILI9488_t3.h>

#define TFT_RST 255
#define TFT_DC 9
#define TFT_CS 10
ILI9488_t3 tft = ILI9488_t3(&SPI, TFT_CS, TFT_DC, TFT_RST);
DMAMEM RAFB fb1[480 * 320];
#define SPI_SPEED 60000000
unsigned long previousMillis = 0;
long interval = 40;
int dummyX=10;
int dummyXI;

void setup() {
  Serial.begin(9600);
  tft.begin(SPI_SPEED);
  tft.setRotation(3);
  tft.setFrameBuffer(fb1);
  tft.useFrameBuffer(true);
  tft.fillScreen(ILI9488_BLACK);
  tft.setTextColor(ILI9488_WHITE); tft.setTextSize(2);
  tft.setCursor(20,65);
  tft.print("HELLO");
  tft.updateScreen();
  delay(1500);
  interval = 40;
}
void loop() {
  unsigned long currentMillis = millis();
  if(currentMillis-previousMillis >=interval){
    previousMillis = currentMillis;
    tft.fillScreen(ILI9488_BLACK);
    testLines(ILI9488_CYAN);
    tft.updateScreen();
  }

}

unsigned long testLines(uint16_t color) {
  unsigned long start, t;
  int           x1, y1, x2, y2,
                w = tft.width(),
                h = tft.height();

  tft.fillScreen(ILI9488_BLACK);

  x1 = y1 = 0;
  y2    = h - 1;
  start = micros();
  for(x2=0; x2<w; x2+=6) {tft.drawLine(x1, y1, x2, y2, color);     tft.updateScreen(); }

  x2    = w - 1;
  for(y2=0; y2<h; y2+=6) {tft.drawLine(x1, y1, x2, y2, color);     tft.updateScreen(); }
  t     = micros() - start; // fillScreen doesn't count against timing

  tft.fillScreen(ILI9488_BLACK);

  x1    = w - 1;
  y1    = 0;
  y2    = h - 1;
  start = micros();
  for(x2=0; x2<w; x2+=6) {tft.drawLine(x1, y1, x2, y2, color);     tft.updateScreen(); }
  x2    = 0;
  for(y2=0; y2<h; y2+=6) {tft.drawLine(x1, y1, x2, y2, color);     tft.updateScreen(); }
  t    += micros() - start;

  tft.fillScreen(ILI9488_BLACK);

  x1    = 0;
  y1    = h - 1;
  y2    = 0;
  start = micros();
  for(x2=0; x2<w; x2+=6) { tft.drawLine(x1, y1, x2, y2, color);     tft.updateScreen(); }
  x2    = w - 1;
  for(y2=0; y2<h; y2+=6) {tft.drawLine(x1, y1, x2, y2, color);     tft.updateScreen(); }
  t    += micros() - start;

  tft.fillScreen(ILI9488_BLACK);
  x1    = w - 1;
  y1    = h - 1;
  y2    = 0;
  start = micros();
  for(x2=0; x2<w; x2+=6) {tft.drawLine(x1, y1, x2, y2, color);     tft.updateScreen(); }
  x2    = 0;
  for(y2=0; y2<h; y2+=6) {tft.drawLine(x1, y1, x2, y2, color);     tft.updateScreen(); }

  return micros() - start;
}
 
Thank You, mjs513

I tested your code and got the same result. It looks like the display draws in segments and instantaneously turns on the corresponding pixels after finishing a segment but the next segment is still from the previous update. If I modify your code, it is even clearer. I think it's my display's fault. The official DFROBOT GDL library has also given this slow behavior. I uploaded my video from yesterday to YouTube, maybe it brings closer anyone who doesn't have this issue.

I'm glad that this Teensy thing exists. Thanks
Robert

And the modified code:

C++:
#include <SPI.h>
#include <ILI9488_t3.h>

#define TFT_RST 255
#define TFT_DC 9
#define TFT_CS 10
ILI9488_t3 tft = ILI9488_t3(&SPI, TFT_CS, TFT_DC, TFT_RST);
DMAMEM RAFB fb1[480 * 320];
#define SPI_SPEED 60000000
unsigned long previousMillis = 0;
long interval = 40;
int dummyX=10;

void setup() {
  Serial.begin(9600);
  tft.begin(SPI_SPEED);
  tft.setRotation(3);
  tft.setFrameBuffer(fb1);
  tft.useFrameBuffer(true);
  tft.fillScreen(ILI9488_BLACK);
  tft.setTextColor(ILI9488_WHITE); tft.setTextSize(2);
  tft.setCursor(20,65);
  tft.print("HELLO");
  tft.updateScreen();
  delay(1500);
  interval = 40;
}

void loop() {
  unsigned long currentMillis = millis();
  if(currentMillis-previousMillis >=interval){
    previousMillis = currentMillis;
    tft.fillScreen(ILI9488_BLACK);
    testLines(ILI9488_CYAN);
    tft.updateScreen();
  }
}

unsigned long testLines(uint16_t color) {
  unsigned long start, t;
  int           x1, y1, x2, y2,
                w = tft.width(),
                h = tft.height();

  tft.fillScreen(ILI9488_BLACK);
  x1 = y1 = 0;
  y2    = h - 1;
  start = micros();
  for(x2=0; x2<w; x2+=6) {tft.drawLine(x2, y1, x2, y2, color);     tft.updateScreen(); } //x1 replaced by x2 to get straight lines.
  t     = micros() - start; // fillScreen doesn't count against timing
}
 
Last edited:
Back
Top