this is the isolated graphics test by which I got the results above.
I'm curious about how a Teensy or the Zero would perform.
For the Mega I will perhaps try tomorrow by myself!
Anyway, all the "stupid" TFTs show about the same performance, either if UTFT or Adafruit libs.
The marekburiak/ILI9341_due test is by far the fastest one I ever observed, not just for SPI interface. So as all those TFTs have no graphic video processor, speeding up SPI clock is supposed to be the only way to speed their performance up remarkably.
On the Due, it's about 15x times as fast as UTFT or Adafruit_ILI9340.
TFT Brickbench
#include <SPI.h>
// ILI9341_due NEW lib by Marek Buriak http://marekburiak.github.io/ILI9341_due/
#include "ILI9341_due_config.h"
#include "ILI9341_due.h"
#include "SystemFont5x7.h"
//#include "Streaming.h"
// For the Adafruit shield, these are the default.
/*
#define TFT_RST 8
#define TFT_DC 9
#define TFT_CS 10
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
*/
#define tft_cs 50
#define tft_dc 49
#define tft_rst 0
ILI9341_due tft = ILI9341_due(tft_cs, tft_dc, tft_rst);
char textBuff[20];
// Color set
#define BLACK 0x0000
#define RED 0xF800
#define GREEN 0x07E0
//#define BLUE 0x001F
#define BLUE 0x102E
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define ORANGE 0xFD20
#define GREENYELLOW 0xAFE5
#define DARKGREEN 0x03E0
#define WHITE 0xFFFF
uint16_t color;
uint16_t colorFONDO = BLACK;
#define TimerMS() millis()
unsigned long runtime[8];
void TFTprint(char sbuf[], int16_t x, int16_t y) {
tft.cursorToXY(x, y);
tft.print(sbuf);
}
inline void displayValues() {
char buf[120];
tft.fillScreen(BLACK); // clrscr()
sprintf (buf, "%3d %9ld int_Add", 0, runtime[0]); TFTprint(buf, 0,10);
sprintf (buf, "%3d %9ld int_Mult", 1, runtime[1]); TFTprint(buf, 0,20);
sprintf (buf, "%3d %9ld float_op", 2, runtime[2]); TFTprint(buf, 0,30);
sprintf (buf, "%3d %9ld randomize", 3, runtime[3]); TFTprint(buf, 0,40);
sprintf (buf, "%3d %9ld matrx_algb", 4, runtime[4]); TFTprint(buf, 0,50);
sprintf (buf, "%3d %9ld arr_sort", 5, runtime[5]); TFTprint(buf, 0,60);
sprintf (buf, "%3d %9ld TextOut", 6, runtime[6]); TFTprint(buf, 0,70);
sprintf (buf, "%3d %9ld Graphics", 7, runtime[7]); TFTprint(buf, 0,80);
}
int32_t test_TextOut(){
int y;
char buf[120];
for(y=0;y<20;++y) {
tft.fillScreen(BLACK); // clrscr()
sprintf (buf, "%3d %9d int_Add", y, 1000); TFTprint(buf, 0,10);
sprintf (buf, "%3d %9d int_Mult", 0, 1010); TFTprint(buf, 0,20);
sprintf (buf, "%3d %9d float_op", 0, 1020); TFTprint(buf, 0,30);
sprintf (buf, "%3d %9d randomize", 0, 1030); TFTprint(buf, 0,40);
sprintf (buf, "%3d %9d matrx_algb", 0, 1040); TFTprint(buf, 0,50);
sprintf (buf, "%3d %9d arr_sort", 0, 1050); TFTprint(buf, 0,60);
sprintf (buf, "%3d %9d displ_txt", 0, 1060); TFTprint(buf, 0,70);
sprintf (buf, "%3d %9d testing...", 0, 1070); TFTprint(buf, 0,80);
}
return y;
}
int32_t test_graphics(){
int y;
char buf[120];
for(y=0;y<100;++y) {
tft.fillScreen(BLACK);
sprintf (buf, "%3d", y); TFTprint(buf, 0,80); // outcomment for downwards compatibility
tft.drawCircle(50, 40, 10, WHITE);
tft.fillCircle(30, 24, 10, WHITE);
tft.drawLine(10, 10, 60, 60, WHITE);
tft.drawLine(50, 20, 90, 70, WHITE);
tft.drawRect(20, 20, 40, 40, WHITE);
tft.fillRect(65, 25, 20, 30, WHITE);
//tft.drawEllipse(70, 30, 15, 20); // original test
tft.drawCircle(70, 30, 15, WHITE); // alternatively, just if no drawEclipse is avaiable in the Arduino graph libs!
}
return y;
}
int test(){
unsigned long time0, x, y;
double s;
char buf[120];
int i;
float f;
// lcd display text / graphs
time0=TimerMS();
s=test_TextOut();
runtime[6]=TimerMS()-time0;
sprintf (buf, "%3d %9ld TextOut", 6, runtime[6]); Serial.println( buf);
TFTprint(buf, 0,70);
time0=TimerMS();
s=test_graphics();
runtime[7]=TimerMS()-time0;
sprintf (buf, "%3d %9ld Graphics", 7, runtime[7]); Serial.println( buf);
TFTprint(buf, 0,80);
Serial.println();
y = 0;
for (x = 0; x < 8; ++x) {
y += runtime[x];
}
displayValues();
sprintf (buf, "gesamt ms: %9ld ", y);
Serial.println( buf);
TFTprint(buf, 0,110);
x=50000000.0/y;
sprintf (buf, "benchmark: %9ld ", x);
Serial.println( buf);
TFTprint(buf, 0,120);
return 1;
}
void setup() {
Serial.begin(115200);
// Setup the LCD
tft.begin();
tft.setRotation(iliRotation270);
tft.fillScreen(colorFONDO);
tft.setFont(SystemFont5x7);
tft.setTextColor(WHITE);
Serial.println("tft started");
}
void loop() {
char buf[120];
test();
sprintf (buf, "Ende HaWe brickbench");
Serial.println( buf);
TFTprint(buf, 0, 140);
while(1);
}
[code]