UTFT Library with ILI9341, 2.2 Inch 240*320 SPI TFT LCD Display

Status
Not open for further replies.

Wozzy

Well-known member
Yesterday I received a 2.2" ILI9341 LCD Display. I also just discovered the magnificent UTFT library by Henning Karlsen.
It was very easy to get it working with the Teensy3.0. I probably had it working withing 45 minutes of unpacking the display.
I am using the latest version of software and libraries. Teensyduino 1.18, Arduino 1.0.5, and UTFT V2.75

The UTFT library was just updated a couple of weeks ago, and has Teensy3.x support built in.
The UTFT Library is located here: http://www.henningkarlsen.com/electronics/library.php?id=51

The ILI9341 LCD display is very sharp, bright and clear, however it seems very slow compared to my older 1.8" ST7735 display.
Does anyone have any ideas to speed up the display rate?

Here's an image of the display:
20140411_230756.jpg
Click here for video: ILI9341 - Teensy 3.0 Video

Here is the code from the example above:
Code:
/
*************************************************************************************
    UTFT_ViewFont (C)2013 Henning Karlsen
    web: http://www.henningkarlsen.com/electronics
    Fonts: http://www.henningkarlsen.com/electronics/r_fonts.php
  
    This program is a demo of the included fonts Plus a few downloaded ones.
    This demo was made for modules with a screen resolution 
    of 320x240 pixels.
    This program requires the UTFT library.
**************************************************************************************

    AliExpress ILI9341 2.2 Inch 240*320 SPI TFT LCD  Display
    http://www.aliexpress.com/item/Wholesale-1PC-2-2-Inch-240-320-Dots-SPI-TFT-LCD-Serial-Port-Module-Display-ILI9341/1188518505.html
    
    ILI9341 ............. Teensy 3.x
    VCC ................. 3.3V
    GND ................. Ground
    CS .................. 10
    RESET ............... 8
    D/C ................. 9
    SDO (MOSI) .......... 11
    SCK ................. 13
    LED ................. 100 Ohm -> 5V
    SDO (MISO) .......... 12

***************************************************************************************/

#include <UTFT.h>

// Declare which fonts we will be using

extern uint8_t arial_bold[];
extern uint8_t Inconsola[];
extern uint8_t SevenSegNumFont[];

// ILI9341 on Teensy 3.1
UTFT myGLCD(ILI9341_S5P,11,13,10,8,9);   // Remember to change the model parameter to suit your display module!

void setup()
{

  myGLCD.InitLCD();
  myGLCD.clrScr();
}

void loop()
{
 
  for (int i=319; i>20; i=i-2){
  myGLCD.setBackColor(0, 0, 0);
  myGLCD.setColor(255, 31, 31);
  myGLCD.setFont(arial_bold);
  myGLCD.print("ILI9341", i, 30, 0);       // Print String   x=i, y=30, rotation angle = 0
  myGLCD.print("Teensy 3.x", i, 50, 0);    // Print String   x=i, y=50, rotation angle = 0
  }

  myGLCD.setColor(0, 255, 255);
  myGLCD.setFont(SevenSegNumFont);

  for (int i=0; i<250; i++){
  myGLCD.printNumI(i,20,90,3,48);        // Print Integer Number, x=20, y=90, 4 characters, 48= "0" (filler) 
   }
   
  myGLCD.setColor(255, 127, 0);
  myGLCD.setFont(Inconsola);  
  for (float f=0; f<10000; f=f+0.01){
  myGLCD.printNumF(f,2,20,170,46,8,48);    // Print Floating Number   2 decimal places, x=20, y=170, 46 = ".", 8 characters, 48= "0" (filler)
  }
}
Notice there are no delays in the code above, so I would expect the update to be much faster.
I assume that it's the SPI communications with the ILI9341 that is the bottleneck.
 
Last edited:
Hello,
Just got one of those displays from china. I've plan to port the Paul's suparfast SPI before weekend and support for Adafruit_GFX if you are interested.
 
Arduino Duemilanove

Hi,
I'v got one of these 2.2" ILI9341 LCD Displays myself but can not make it work with my Arduino Duemilanove. Can you help. I am a beginner.
Best regards,
 
Status
Not open for further replies.
Back
Top