Introduction: My Second Project: Arduino 2.4" TFT

Last time I had a project on 16x2 LCD display. After that I thought, 'it would be awesome if using a color display instead.' When I searched a color display for Arduino UNO, I found there is limitation using UNO:

"Due to the size of the library I do not recommend using it on ATmega328 (Arduino 2009/Uno) and ATmega32U4 (Arduino Leonardo) as they only have 32KB of flash memory."

The details can be found with this link: http://henningkarlsen.com/electronics/library.php?id=51

To make this project less complicated, I also bought Arduino Mega 2560 finally. : P

This is a 2.4" TFT display with 240x320 resolution that supports both SD card and touch screen. I am so excited and wanna try it as soon as possible.

Step 1: Parts

Step 2: Wiring

For me the requirement in hennigkarlsen.com is quite difficult to understand..... Sorry for my stupidity...... : ( Let's find another schematic that is easy to read and here is the link: http://forum.arduino.cc/index.php?topic=101029.0

A minor mistake is found and here is the amended one. I've also changed the abbreviations to match them with my TFT:

1. Display:

LEDA -> 5V

VCC -> 5V

RD -> 3.3V

GND -> GND

DB0->DB7 to pin D37->D30

DB8->DB15 to pin D22->D29

RS -> D38

WR -> D39

CS(pin15) -> D40

RSET-> D41

2. Touch Screen:

Default pin number in example code:

T_CLK->D6

T_CS(pin30) ->D5

T_DIN ->D4

T_DO->D3

T_IRQ ->D2

3. SD Card:

SD_CLK -> D52

SD_DO -> D50

SD_DIN-> D51

SD_CS -> D53

Step 3: Libraries and Code

We need UFTF library before running the example. Download the library, unzip it and copy to Arduino/libraries:

http://www.elabpeers.com/2-4-tft-lcd-touch.html

The examples can be found after restarting Arduino software.

Go to File > Examples > UTFT > Arduino (AVR) > UTFT_Demo_320x240

Thanks for Hennig Karlsen again for the great work! This makes our work much easier! The only thing we have to do is just change the display model and the pins following the instruction. Controllers and display models that this library supported are also listed in the file UTFT_Supported_display_modules_&_controllers.pdf. My TFT display model is ILI9325D_8 and the beginning of the code is as follow:

#include

// Declare which fonts we will be using

extern uint8_t SmallFont[];

// Set the pins to the correct ones for your development shield

// ------------------------------------------------------------

// Arduino Uno / 2009:

// -------------------

// Standard Arduino Uno/2009 shield : ,A5,A4,A3,A2

// DisplayModule Arduino Uno TFT shield : ,A5,A4,A3,A2

/

/ Arduino Mega:

// -------------------

// Standard Arduino Mega/Due shield : ,38,39,40,41

// CTE TFT LCD/SD Shield for Arduino Mega : ,38,39,40,41

/

/ Remember to change the model parameter to suit your display module!

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

Let's upload the code and see what happens...........

Step 4: Result

Yeah! It shows the demo perfectly! :D

Next time I will try something a little bit complicated. Thanks for watching it. See you.