Home > Ideas > Arduino LCD Project Ideas > ILI9341 TFT LCD Demo using Arduino 328 with Proteus Simulation

ILI9341 TFT LCD Demo using Arduino 328 with Proteus Simulation

Summary of ILI9341 TFT LCD Demo using Arduino 328 with Proteus Simulation


This article details an Arduino 328 project driving an ILI9341 TFT LCD via SPI in Proteus. It demonstrates drawing lines, circles, text, and vertical scrolling on a 240×320 screen using an ATmega328P microcontroller. The simulation verifies firmware functionality for future DIY dashboards or sensor interfaces, serving as an educational tool for embedded systems development.

Parts used in the ILI9341 TFT LCD Demo:

  • Arduino 328 board
  • ATmega328P microcontroller
  • ILI9341 TFT LCD shield
  • SPI interface connections
  • TFT backlight control line
  • Reset connection
  • Power supply connections
  • Arduino AVR firmware
  • Proteus VSM simulation environment

Introduction

This project demonstrates an Arduino 328 driving an ILI9341 TFT LCD in Proteus.
It is a clean microcontroller project for learning how a TFT display works with an AVR-based controller.
The simulation shows text, lines, circles, filled shapes, colors, and vertical scrolling on a 240×320 TFT screen.
It is useful for students, hobbyists, and embedded developers who want to understand LCD control in embedded systems.
With the included source code, this project is also a good base for future DIY electronics displays such as menus, dashboards, or sensor interfaces.
The Proteus simulation helps verify the firmware before testing on real hardware.

Arduino TFT LCD shield displaying colorful graphics
Illustrative View of the Concept.

How the Project Works

This project uses an ATmega328P-based Arduino 328 to control an ILI9341 TFT LCD shield.

The Arduino communicates with the TFT display through the SPI interface. The code initializes the display, turns on the TFT backlight, clears the screen, and then draws several graphics on the LCD. These include diagonal lines, vertical and horizontal lines, circles, filled circles, and text strings such as “Hello” and “World!!”.

After the startup graphics are drawn, the firmware enables vertical scrolling on the ILI9341 display. Inside the loop, the scroll position is updated continuously, creating a simple animated display effect.

In simple terms, the working principle is:

  1. Arduino 328 starts the program.
  2. SPI communication is enabled.
  3. TFT backlight is turned on.
  4. ILI9341 LCD is initialized using command sequences.
  5. Graphics and text are drawn on the display.
  6. Vertical scrolling is controlled by sending display commands repeatedly.

Workflow Explanation

Based on the schematic and source code, the project workflow can be described as:

Arduino 328 / ATmega328P
        |
        | SPI Interface
        |
ILI9341 TFT LCD Shield
        |
        | Display Commands + Pixel Data
        |
Graphics, Text, Colors, and Vertical Scrolling

The circuit diagram shows the Arduino 328 section using the ATmega328P controller. The TFT LCD shield is connected to the Arduino using SPI-related control lines such as SCK, MOSI, MISO, chip select, data/command, reset, and backlight control.

The firmware handles two main tasks:

  • Sending commands to configure the ILI9341 TFT controller.
  • Sending graphic data to draw shapes, text, and scrolling effects.

Key Features

  • ILI9341 TFT LCD control using Arduino 328
  • Based on ATmega328P AVR microcontroller
  • Uses Arduino AVR compiler
  • SPI-based TFT communication
  • 240×320 TFT screen resolution support
  • Draws lines, circles, filled circles, and text
  • Supports multiple display colors such as red, green, blue, yellow, cyan, white, and black
  • Includes vertical scrolling demonstration
  • Uses a custom TFT graphics library
  • Suitable for Proteus VSM AVR simulation
  • Good learning project for embedded systems and practical electronics

Components Used

Based on the provided schematic and code, the project uses:

  • Arduino 328 board
  • ATmega328P microcontroller
  • ILI9341 TFT LCD shield
  • SPI interface connections
  • TFT backlight control line
  • Reset connection
  • Power supply connections
  • Arduino AVR firmware
  • Proteus VSM for AVR simulation environment

Applications

This type of TFT LCD microcontroller project can be used in:

  • Embedded display testing
  • Arduino graphics demos
  • DIY electronics dashboards
  • Menu-based control panels
  • Sensor display interfaces
  • Temperature sensor display projects
  • Industrial monitoring screens
  • Educational AVR and SPI communication labs
  • Proteus-based firmware testing
  • TFT LCD driver development

Explanation of Code

The source code is divided into the main Arduino sketch and supporting TFT library files.

Main Arduino Sketch

The main program initializes Serial communication, enables faster SPI operation, turns on the TFT backlight, and starts the TFT library. After initialization, it draws different graphics on the display, including lines, circles, filled circles, and text.

The loop updates the vertical scrolling start address, which produces a scrolling movement on the TFT screen.

TFT Library

The TFT library handles the low-level display control. It includes functions for:

  • Sending commands to the ILI9341 LCD
  • Writing 8-bit and 16-bit display data
  • Initializing the TFT controller
  • Setting screen columns and pages
  • Drawing pixels
  • Drawing lines, rectangles, circles, and filled circles
  • Displaying strings, numbers, and floating-point values
  • Filling the screen with color

SPI Module

The project uses the Arduino SPI library. SPI is responsible for sending commands and pixel data from the ATmega328P to the ILI9341 TFT LCD.

Display Graphics Module

The graphics functions convert simple drawing instructions into pixel-level display data. This allows the Arduino to draw shapes and text on the TFT screen.

Font Module

The font.c file stores a simple 8-byte character font table in program memory. This font data is used by the library to draw text on the display.

ILI9341 TFT LCD schematic with Arduino 328

Source Code

unsigned int t = 0;
unsigned int pos = 0;

void loop()
 { t++;
   if (t == 1000)
    { t = 0;
      pos++;
      // Vertical Scrolling Start Address
      Tft.sendCMD(0x37);
      Tft.sendData(100 + (pos % 200));
    }
 }

Download Source Code

Proteus Simulation

In the Proteus simulation, the Arduino 328 controls the ILI9341 TFT LCD shield. When the simulation starts, the display initializes and the backlight turns on. The LCD then shows a graphics demo with colored lines, circles, filled shapes, and text.

The simulation also demonstrates vertical scrolling using ILI9341 display commands. This makes the project useful for testing TFT display commands, SPI communication, and basic LCD graphics before moving the firmware to real hardware.

Conclusion

The ILI9341 TFT LCD Demo using Arduino 328 with Proteus Simulation is a useful starter project for learning TFT LCD control with an AVR microcontroller. It shows how SPI-based firmware can initialize a display, draw graphics, show text, and create scrolling effects.

This project is a strong learning base for embedded systems, DIY electronics, display interfaces, and future sensor-based projects that need a colorful graphical output.

Complete File

ILI9341 TFT LCD Demo using Arduino 328 with Proteus Simulation

Download Complete File

Quick Solutions to Questions related to ILI9341 TFT LCD Demo:

  • How does the Arduino communicate with the TFT display?
    The Arduino communicates with the TFT display through the SPI interface.
  • What graphics can be drawn on the 240×320 TFT screen?
    The system draws diagonal lines, vertical and horizontal lines, circles, filled circles, and text strings.
  • Can this project demonstrate vertical scrolling?
    Yes, the firmware enables vertical scrolling by continuously updating the scroll position inside the loop.
  • Which microcontroller is used in this project?
    The project uses an ATmega328P-based Arduino 328 controller.
  • Does the display support multiple colors?
    Yes, it supports colors such as red, green, blue, yellow, cyan, white, and black.
  • What software is used to simulate this project before hardware testing?
    Proteus VSM for AVR simulation is used to verify the firmware before testing on real hardware.
  • What specific library handles the low-level display control?
    A custom TFT graphics library handles sending commands and writing pixel data to the ILI9341.
  • How is the font data stored in the project?
    The font.c file stores a simple 8-byte character font table in program memory.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top