I'm controlling a 2.8 inch ILI9341 driven SPI_5P TFT screen breakout board. Most of the time I want to display large text on the screen and sometimes few images. I want the text to update based on sensor input but the screen prints pixel by pixel, it is really slow like 0.3 fps.
The full code:
#include <UTFT.h>
// Declare which fonts we will be using
extern uint8_t BigFont[];
UTFT myGLCD(ILI9341_S5P, 11, 13, 10, 12, 9); //(Model, SDA, SCL, CS, RST, Rs)
void setup() {
// Setup the LCD
myGLCD.InitLCD();
myGLCD.setFont(BigFont);
pinMode(8, OUTPUT);
digitalWrite(8, HIGH); // For backlight
myGLCD.clrScr();
}
void loop() {
// Clear the screen and draw the frame
// myGLCD.clrScr();
myGLCD.setColor(255, 255, 255);
myGLCD.print("Hello!", CENTER, 30);
myGLCD.print("Look How Slow I Am", CENTER, 60);
myGLCD.print("This is SPI_5P", CENTER, 120);
myGLCD.print("Wanna get faster ", CENTER, 150);
myGLCD.print("HEEELP!", CENTER, 180);
delay(2000);
myGLCD.setColor(0, 0, 0);
myGLCD.print("Hello!", CENTER, 30);
myGLCD.print("Look How Slow I Am", CENTER, 60);
myGLCD.print("This is SPI_5P", CENTER, 120);
myGLCD.print("Wanna get faster ", CENTER, 150);
myGLCD.print("HEEELP!", CENTER, 180);
}
I tried both with UTFT and LCDWIKI libraries and they had the same speed. The demo plays really slow, clear screen command takes ages to wipe whole screen pixel by pixel. What am I doing wrong? I don't need super speed, 10 fps is enough. Maybe I couldn't use Hardware SPI and I am accidentally using software SPI. Because even though I connected reset pin to pin12 it doesn't interfere with SPI, I used other pins for reset and results didn't change. In hardware SPI maybe I shouldn't be able to use pin12 for other purposes and leave it floating.