Graphic displays

 

We love displays but sometimes it is hard to get the right parameters and wiring setup for a display. This page collects the solutions found for various displays. As the interest for these displays is broader than the German speaing area, this page is kept in English.

The order of the displays is by Type and size. The display connections are described on different boards. As this is quite a matrix, open setups are flagged with a "?"

Name Vendor library UNO Mega Due comment
1.5" TFT serial nkcelectronics UTFT ok ok   This shield uses Nokia 6100 displays with PCF8833 controller
1.5" TFT serial elecfreaks UTFT ok ok   Not supported by H. Karlsen but works with PCF8833 driver and some tweaks
1.5" OLED IL Soft IL Soft ok ok ? This is a OLED created vie a kickstarter campaign
1.8" TFT  serial sainsmart UTFT ok ok ? has on-board SD card
1.8" TFT breakout uctronics UTFT ok ok ? on-board SD and 6 buttons
1.8" TFT serial itead UTFT ok ok    
2.2" TFT serial itead UTFT       this shield has been discontinued and replaced
2.4" TFT touch itead UTFT ok ok   this shield has been discontinued and replaced
2.4" TFT HY-TFT240 Geeetech UTFT ok ok   based on a review from tronixstuff, this is an inexpensive TFT (~10 USD)
ITDB02 TFT displays itead / elecfreaks UTFT ok ok   These TFT operate on 3.3 V. There are adapter boards that connect these to the arduino. There are multiple vendors today and these TFT can be obtained from China. I recommend to get them from a respectable retailer to avoid running into faulty TFT displays

Note on 3.3V/5V Operation

Please note that most display modules operate at 3.3v and may or will require some form of level-shifting. This is often done using an adapter shield that has level shifters on board. Please bee very careful when connecting TFT displays directly to a board as the wrong voltage levels can dammage seriously both the display as well as the board!

Leonardo Note

The Arduino Leonardo needs code to manage the internal USB interface. Therefore, you have to use the sketch UTFT_Leonard_Demo_320x240 .  Otherwise, the compiled program will not fit into the memory. You also need touse the compiler directives in memorysaver.h

UTFT Library

For most of the TFT displays I use the brilliant UTFT library from Henning Karlsen. This library is published under GPL and if you use this library, I strongly encourage you to support this library by donnating on his web page. The library is constantly improved by Henning and users of this library should contribute to his effort.

In the UTFT documentation there is a list of supported devices and with which boards these devices have been tested to work. I have no intention to replicate these tests and only aim to extend this information with details on how I wired the displays myself.

Henning has not tested products of SainSmart and emphasises that he is not willing to support these devices due to problems he had with SainSmart. I have listed the product as I have got some of them.

I do not recommend that people use the USE_UNO_SHIELD_ON_MEGA define on modules that require manual wiring. That define is only for when you cannot use the proper pins for Mega (like when using a shield designed for Arduino Uno). Using the define makes the library slower and should only be used when there are no other options.

Testbild sketch and WodClock

I have written a short test sketch that displays a test image on the TFT similar to the times when TV channels did not broadcast 24 hours a day. I also adopted the wordclock to run on all TFT displays that are supported by the UTFT library and are large enough to displays the clock. As soon as the code is stable, I will make it available here.

TFT displays

 1.5" TFT serial shield (nkcelectronics)

This is a shield from nkcelectronics that you can assemble yourself.

IT uses the PCF8833 controller and can be driven using the UTFT library with the floowing call and the example UTFT_Demo_128x128_Serial:

UTFT myGLCD(LPH9135,6,5,2,3,4);

During the assembly I recognized that you have to be very precise when soldering the display. If the grafics is visible but faint, the bacl^klight may have a bad contact.

Back to top

 1.5" TFT serial shield (elecfreaks)

Elecfreaks has a nice shield similar to the nkc shield with a 4-way digital joystick. There is a very good review (in German) on arduino-praxis.ch

The shield is not suported by Henning Karlsen but I found a way to get the UTFT library to drive the shield with some minor tweaks (using UTFT_Demo_128x128_Serial):

UTFT myGLCD(LPH9135,11,13,9,8);

in setup() you have to add the following statements before the call to myGLCD.InitLCD():

myGLCD.disp_x_size=131;
myGLCD.disp_y_size=131;
myGLCD.display_serial_mode=SERIAL_4PIN;
pinMode(10, OUTPUT);
analogWrite(10,1023); // backlight brightness

 

Back to top

 1.8" TFT with serial interface

The following drawing shows the simplified connection of the display to an arduino:

The library used to drive the display is UTFT with the floowing call and the example UTFT_Demo_160x128_Serial:

UTFT myGLCD(ITDB18SP,12,13,9,10,11);

using the following connection and naming convention (as drawn above):

Display Pin Arduino Pin UTFT
Vcc 5V n/a
GND GND n/a
SCL 13 WR
SDA 12 RS
RS/DC 11 SER
RES 10 RST
CS 9 CS
MISO not used not used
SCLK not used not used
MOSI not used not used
CS not used not used

Please note, that you can use any free pin to connect SCL, SDA, RS, RES and CS - the connection here is just one possible I used.

Back to top

 1.8" TFT Breakout

This shield was sold by uctronics at a remarkable low price but is no longer available. However, it may still be available via sources like ebay. It has a specialty of 6 push buttons connected to A0 with a resistor mesh so that depending on the button pressed, the voltage value at A0 is changed.

The library used to drive this shield is UTFT with the floowing call and the example UTFT_Demo_160x128_Serial:

UTFT myGLCD(ITDB18SP,11,13,10,8,9);

and a special handling of pin 2 which must be taken down in setup() or the display will stay blank:

pinMode(2,OUTPUT);
digitalWrite(2,LOW);

Back to top

 1.8" TFT Serial iTead

The following shows the connection of the TFT to an arduino:

The library used to drive the display is UTFT with the floowing call and the example UTFT_Demo_160x128_Serial:

UTFT myGLCD(ITDB18SP,9,10,11,7,8);

using the following connection and naming convention (as drawn above):

Display Pin Arduino Pin UTFT
VDD33 3.3V n/a
CS 11 CS
SCL 10 WR
SDA 9 RS
RS 8 SER
RST 7 RST
GND GND n/a
VIN 5V n/a

Please note, that you can use any free pin to connect SCL, SDA, RS, RES and CS - the connection here is just one possible I used.

Back to top

  2.2" TFT Serial iTead

The following shows the connection of the TFT to an arduino:

The library used to drive the display is UTFT with the floowing call and the example UTFT_Demo_220x176_Serial:

UTFT myGLCD(ITDB22SP,9,10,11,7);

using the following connection and naming convention (as drawn above):

Display Pin Arduino Pin UTFT
VDD33 3.3V n/a
CS 11 CS
SCL 10 WR
SDA 9 RS
NC not connected

RST 7
RST
GND GND n/a
VIN
5V
n/a

Please note, that you can use any free pin to connect SCL, SDA, RS, RES and CS - the connection here is just one possible I used.

Back to top

 2.4" TFT with Touch

This shield has been replaced by a newer version. On the backside, there is a SD card slot and it reads versin 1.0. The UTFT call for the example UTFT_Demo_320x240 when placed on a arduino UNO is:

UTFT myGLCD(ITDB24D,19,18,17,16);
//UTFT myGLCD(ITDB24D,A5,A4,A3,A2); // on Leonardo
//UTFT myGLCD(ITDB24D,59,58,57,56); // on MEGA

The usage of the Mega needs a compiler directive enabled in %adruino%\libraries\UTFT\hardware\avr\HW_AVR_defines.h:

#define USE_UNO_SHIELD_ON_MEGA 1

 

Back to top

 2.4" TFT LCD from Greetech

On a review from tronixstuff, I found this inexpensive TFT. It can be found on ebay and was availbale at greentech. The folowing picture gives a view of the cabeling (I used the adafruit TFT as representation of the TFT)

using the following connection and naming convention (as drawn above):

Display Pin Arduino Pin UTFT
GND GND n/a
+5V +5V n/a
NC not connected n/a
RS A5 RS
RW A4 WR
RD +3.3V n/a
DB0-DB7 D0 - D7
n/a
CS A3 CS
RST A2 RST

The UTFT call for the example UTFT_Demo_320x240 when placed on a arduino UNO is:

UTFT myGLCD(ILI9325C,19,18,17,16);
//UTFT myGLCD(ILI9325C,A5,A4,A3,A2); // on Leonardo
//UTFT myGLCD(ILI9325C,59,58,57,56); // on MEGA

The usage of the Mega needs a compiler directive enabled in %adruino%\libraries\UTFT\hardware\avr\HW_AVR_defines.h:

#define USE_UNO_SHIELD_ON_MEGA 1

However, this directive leads to additional steps to do bit shifting and slows down the program execution. The more efficient method with a Mega is to connect the display to the mega using the following pins:

Display Pin Arduino Pin UTFT Display Pin Arduino Pin
GND GND n/a DB0 37
+5V +5V n/a DB1 36
NC not connected n/a DB2 35
RS 38 RS DB3 34
RW 39 WR DB4 33
RD +3.3V n/a DB5 32
CS 40 CS DB6 31
RST
41
RST
DB7 30

I revisited the display with the version 2.79 of UTFT and noticed that the data pins need to be connected to other pins of the Mega:

Display Pin Mega Pin
D0 22
D1 23
D2 24
D3 25
D4 26
D5 27
D6 28
D7 29

You can then use the default call to UTFT

UTFT myGLCD(ILI9325C,38,39,40,41);

Using the GEEE24 display type will lead to a mirrored display. With verison 2.79, Henning Karlsen has discontinued to support the GE-displays.

 

Back to top

 

 ITDB02 TFT Displays

There is a group of TFT displays that all have the same 40 pin connector:

They come in verious sizes: 2.2", 2.4", 2.8", 3.2", 3.2"wide, 4.3", 5.0" and 7.0".

They run on 3.3V so if you plan to use them with an arduino UNO or MEGA, you need to take care that the 5V are shifted. There are cheap adapters that take care of the level shifting. I have adapters from iTead and elecfreaks and they differ in multiple ways. Therefore I list all adpaters I have run into so far.

 

Back to top

 

OLED Displays

 1.5" OLED from IL Soft

This 1.5" OLED display is the outcome of a kickstarter campaign that took place from May 2, 2013 - Jun 1, 2013. The product was delivered early September 2013 (about 2 months later than predicted). The initial display was extended by an arduino and raspberry pi shield as a strech goal.

The OLED is based on the SDD1351 chip. This chip is used by the adafruit OLED breakout, so the adafruit code works with this display when using the following parameters based on the shield design:

Display Pin Arduino UNO Arduino MEGA
GND GND GND
Vcc +5V +5V
DC 9 9
SDI 12 50
SCK 13
52
CS 8
8
RES 7 7
GND
GND
GND

The arduino shield uses the ICSP pins to connetc to SCL/MISO (13/12) to be indendent from the board design. Therefore, on a MEGA these have to be changed to 52/50. The picture shows the wiring (without the shield):

When soldering the shield, do not forget to solder the ICSP connector facing towards the arduino.

The adafruit library uses the 64k color depth, the examples provided by IL Soft use the 256k color mode. I will look into the changes needed to adopt the adafruit library to 256k.

I also will take a look at modifying the UTFT library to use this shield but I have no idea yet what kind of effort this will be

Overall, the display is brilliant. The kickstarter price was 30 GPB (~36 Euro) for OLED plus shield, which is now 40 GBP  (~48 Euro) in the store. That is still a good price for a 128x128 color OLED.

Back to top