0% found this document useful (0 votes)
263 views

2-4 TFT LCD Touch Display en

The document provides instructions for connecting and using a 2.4 inch TFT touch display shield with a microcontroller. It includes specifications for the display, pin assignments, steps for installing the necessary library, and examples for testing graphics, calibrating the touchscreen, and using the touch input. The display can be used to show graphics, text, and images from an SD card for applications like user interfaces.

Uploaded by

wilsnico
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
263 views

2-4 TFT LCD Touch Display en

The document provides instructions for connecting and using a 2.4 inch TFT touch display shield with a microcontroller. It includes specifications for the display, pin assignments, steps for installing the necessary library, and examples for testing graphics, calibrating the touchscreen, and using the touch input. The display can be used to show graphics, text, and images from an SD card for applications like user interfaces.

Uploaded by

wilsnico
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

2.

4 inch TFT Shield

2.4 inch TFT Touch


Shield

1
2.4 inch TFT Shield

Table of contents
Introduction
Specifications
Pin assignment
Connecting the microcontroller to the module 11
Installing the library 16
1.Graphic test 17
2.calibrate touch screen 18
3.Touch test 19

2
2.4 inch TFT Shield

Introduction

TFT LCD stands for Thin Film Transistor Liquid Crystal Display. It is a variant
of LCD that uses thin film transistor technology.

The liquid crystal display LCD, is a device that uses liquid crystals to block
light. Liquid crystals do not emit light directly, but block light coming from
the backlight of the screen, creating shapes on the screen.

TFT technology improves the quality of images by reducing the size of the
specific liquid crystal filter, which improves the readability and
addressability of each pixel of the screen, which in turn improves the
contrast of the screen. However, if you power part of the screen, the
crystals align and create a shadow or filter for the backlight.

One of the most important features of this display is a resistive 4-wire


touch screen that is pre-installed with the module.

3
2.4 inch TFT Shield

In addition, this LCD can be used to display pictures. To do this, the images
must be saved in 24-bit BMP colour format with a size of 240x320 and
moved to the µSD card and placed in the LCD screen, as the LCD has an
integrated µSD card reader. With the µSD card option, large amounts of
data can also be stored.

A great feature of this LCD is the large resolution of 240x320 pixels, which
allows the clear display of text, graphics and images, with the ability to
display 262000 different colours.

The module is very flexible and can be used in a wide range of applications,
e.g. in smartphones, navigation systems, game consoles, in industrial use
for displaying data in graphic formats, etc.

4
2.4 inch TFT Shield

Specifications

"Operating voltage: 3.3V - 5V


"Screen type: LCD TFT
" Screen size: 2.4in
" Dimensions: 71mm, 52mm, 7mm

"Screen resolution: 320x240


"Operating mode: SPI and 8-bit
" Driver chips: For LCD - ILI9341
"µSD card reader

5
2.4 inch TFT Shield

Pin assignment

The 2.4 TFT LCD touch display has 28 pins. The pin assignment is shown in
the following figure:

There is a reset button K1 that clears the screen when pressed.

6
2.4 inch TFT Shield

Installing the Arduino IDE

You can download the free Arduino IDE development environment from the
following link: https://www.arduino.cc/en/Main/Software

Windows users should definitely use one of the first two download options for
the Arduino IDE. The "Windows App" version from the Windows Store causes
connection problems, especially when using third-party board definitions.

After starting the Arduino IDE installation file "arduino-1.X.X-windows.exe", the


licence conditions of the software must be read and accepted:

7
2.4 inch TFT Shield

In the next step, different options can be selected for installation.

A brief overview of the different options follows, with a short explanation of


each option:

Option Explanation

8
2.4 inch TFT Shield

Install Arduino Software Installs the Arduino IDE - This option cannot
be deselected.

Install USB Driver Installs USB drivers for various other


microcontrollers. These are not required to
use the software with the D1 mini, but we
strongly recommend installing them if you
also use other microcontrollers

Create Start Menu shortcut Creates a shortcut in the Windows Start menu
(Optional)

Create Desktop shortcut Creates a shortcut on the workstation


(Optional)

Associate .ino files Creates a file name extension for files with
the extension .ino and links it to the Arduino
IDE

Finally, the destination folder must be specified. The installation requires


approx. 500MB of free disk space.

Click on "Install" to start the installation.

9
2.4 inch TFT Shield

After successful installation, the installation programme can be closed via the
"Close" button:

10
2.4 inch TFT Shield

Connecting the microcontroller to the module

The display is a so-called Atmega328p shield. It is simply plugged onto the


microcontroller type 1/2 or Mega. The following pictures show how to attach
the shield

11
2.4 inch TFT Shield

12
2.4 inch TFT Shield

2.4 TFT LCD Pin MC pin Colour

3.3V 3.3V orange

5V 5V red

GND GND black

GND NC black

SD_SCK 13 cyan

SD_DO 12 purple

SD_DI 11 brown

SD_SS 10 pink

LCD_DI 9 green

LCD_DO 8 blue

LCD_D7 7 cyan

LCD_D6 6 purple

13
2.4 inch TFT Shield

LCD_D5 5 brown

LCD_D4 4 pink

LCD_D3 3 green

LCD_D2 2 blue

14
2.4 inch TFT Shield

Installing the library

Here are the steps to install the necessary library from the Arduino
Library Manager:
MCUFRIEND_kbv Install

1 - Click on the "Sketch" menu and select "Include Library" -> "Manage
Libraries".
2- Search for " MCUFRIEND_kbv" in the Library Manager using the
search bar at the top of the window.
3- Select the MCUFRIEND_kbv library from the search results.
4- Click on the "Install" button to install the library.
5- Wait until the installation is complete.
6- When the installation is complete, you should see a message in the
lower console stating that the library has been successfully installed.
7- Follow the steps "1.Graphic test", then "2.Calibrate touch screen".
After calibration, carry out the "3.Touchscreen test" and adjust the code
according to the coordinates obtained.

15
2.4 inch TFT Shield

1.Graphic test

1- Click on : "File" → "Examples" --> "MCUFRIEND_kbv" -->


"Graphictest_kbv" .

In the "graphics test", colourful, animated samples appear to check


the image quality. It is a visual experience that shows different
colours and movements.

16
2.4 inch TFT Shield

2.calibrate touch screen

1- Click on : "File" → "Examples" --> "MCUFRIEND_kbv" -->


"Touchscreen_calibr_native" .

2- Please follow the instructions displayed on the screen to optimally


perform the calibration of the screen.

3- Please copy the coordinates displayed on the touch screen or


serial monitor after calibration and paste them into your code
according to the illustration.

4- During the "touch screen test" you will see several points on the
screen. By touching and releasing these points you can check the

17
2.4 inch TFT Shield

accuracy of the screen coordinates. It is important to have the serial


monitor open during the calibration. When the test is complete, the
correct adjustments are displayed on both the screen and the serial
monitor.

3.Touch test

1- Click on : "File" → "Examples" --> "MCUFRIEND_kbv" -->


"Touch_shield_new".

2- Please copy the coordinates that are displayed on the touch screen
after calibration and paste them into your code according to the
illustration (see lines #12 and #13).

3- (After the sketch upload). A prompt is displayed on the touch screen.


To go to the drawing area, simply press the "Exit" button. Afterwards, a
drawing area awaits you on which you can draw as you like with different
colours. Have fun drawing!

You did it, you can use your module now :)

18
2.4 inch TFT Shield

Now it's time to learn and create your own projects. You can do this with the
help of many example scripts and other tutorials that you can find on the
internet.

If you are looking for the high-quality products for Arduino and Raspberry Pi,
AZ-Delivery Vertriebs GmbH is the right place for you. You will receive
numerous application examples, complete installation instructions, eBooks,
libraries and support from our technical experts.

https://az-delivery.de

Have fun!

Imprint

https://az-delivery.de/pages/about-us

19

You might also like