Arduino Serial UART Scrolling Display Terminal Using a 2.2" TFT

18 Aug.,2025

 

Arduino Serial UART Scrolling Display Terminal Using a 2.2" TFT

I have been making projects based around a 2.2" TFT display which uses the ILI driver chip, this display can be connected to and controlled by an Arduino UNO. As a bit of background reading you may find my instructable here useful.

Link to ORIC Electronics

During debugging of one of my battery powered Arduino projects I needed to have a portable terminal to look at the debug output being printed to the serial pins. To achieve this I built the small portable display terminal described herein.

The unique part of this project is that the sketch uses the built in hardware scrolling feature of the ILI chip, this takes the processing burden off the Arduino AVR microcontroller and means that the display can keep up with serial text messages at baud.

The ILI and GFX libraries featured in this instructable has been optimised for speed, some of the speed enhancing features use direct PORT access to the ATmega328 registers so it is important to use an Arduino board based on that processor chip. These speed improvements means that characters in the proportional font 2 can be printed to the screen at more than characters per second... which is a bit faster than I can read them!

Though the development has been done with a UNO, the final battery powered terminal will be based around the smaller Pro Micro, with a battery pack and 3 AA batteries this will be nice and portable.

The connections between the display and UNO are not the same as my other instructable, for this project connect as follows:

  • UNO +5V to display pin 1 (VCC)
  • UNO +5V through a 56 Ohm resistor to display pin 8 (LED)
  • UNO 0V (GND) to display pin 2 (GND)
  • UNO digital pin 7 through a 1K2 resistor to display pin 4 (RESET), add a 1K8 resistor from display pin 4 to GND
  • UNO digital pin 9 through a 1K2 resistor to display pin 5 (DC/RS), add a 1K8 resistor from display pin 5 to GND
  • UNO digital pin 10 through a 1K2 resistor to display pin 3 (CS), add a 1K8 resistor from display pin 3 to GND
  • UNO digital pin 11 through a 1K2 resistor to display pin 6 (SDI/MOSI), add a 1K8 resistor from display pin 6 to GND
  • UNO digital pin 13 through a 1K2 resistor to display pin 7 (SCK), add a 1K8 resistor from display pin 7 to GND

It is important to include the 1K8 resistors to GND with this 2.2" display as otherwise it will not work. The 1K2 and 1K8 resistors are a "potential divider", acting as a logic level shifter so that the logic level at the display is reduced from 5V to around 3V. Pin 9 of the display does not need to be connected up.

Once programmed the Terminal can be connected to another Arduino to monitor the serial output:

  • Set the baud rate on the Arduino to be monitored to baud (or modify the Terminal sketch to match)
  • Connect the Terminal UNO GND to GND on the Arduino to be monitored
  • Connect the Terminal UNO Rx pin to the Tx pin on the Arduino to be monitored

Output text messages sent using Serial.print from the other Arduino to the Terminal will be displayed. At baud the Terminal manages to keep up with the data flow.

The libraries and sketches needed are attached as zip files. The Terminal sketch is included as one of the examples within the Adafruit_ILI_AS library.

The Adafruit_GFX_AS library attached contains some significant speed improvements that permit drawing font 2 characters at over per second, this is needed to keep up with with a full speed baud rate. This version of the library requires the use of the ATmega328 processor (as used on UNO) since direct PORT access is performed. To use the library with other processors, such as the ATmega, the sketch will need to be modified to the correct hardware SPI pins and the following line must be commented out:

#define F_AS_T

within the "Adafruit_ILI_FAST.h" header file located in the Adafruit_ILI_AS library folder.

No changes are needed when using the ATmega328 based Arduinos providing the pins listed above are used.

A speed demo sketch has been included here, this is the one I use to test the speed improvements, it is an adapted version of a sketch that comes with the Arduino UTFT library.

The company is the world’s best uart tft display supplier. We are your one-stop shop for all needs. Our staff are highly-specialized and will help you find the product you need.

In most cases characters don't get lost at baud but it is a good idea to increase the serial Rx buffer from 64 bytes to 512 or bytes, especially if higher baud rates are used. The sketch does not use much RAM so even a byte Rx buffer leaves RAM spare.

To increase the serial buffer space the method described here works well:

http://www.hobbytronics.co.uk/arduino-serial-buff...

The TFT ILI driver scrolls the display almost instantly, but it takes the Arduino about 13 milliseconds (ms) to erase a line on the display during the scroll process. In this time more characters may be arriving, so the buffer helps by storing the serial data until the ATmega processor gets around to taking more bytes out of the buffer.

The line erasure code in the sketch is optimised by storing the length of each line of printed text and then only over-writing that area, this means the worst case where 1 character is printed on every line it does not take 13ms to scroll and erase a line, but more like 1ms.

TFT LCD Interface - Topway Display

A TFT LCD display module consists of a TFT LCD panel, one or more COG (chip-on-glass) or COB (chip-on-board) driver ICs, a backlight, and an interface. Several TFT display interface technologies exist today. Picking the right interface depends on specific end-product concerns. There are several types of TFT display interfaces which have been designed in the last number of years for various screen sizes, including LVDS, (Low-Voltage Differential Signaling) parallel, SPI (Serial Peripheral Interface) RGB and so on. Here is an overview of these display interfaces to give you a better idea of the variety of TFT LCD displays that are taking center stage.

TFT LCD Interfaces - The Technical

Typically, TFT interfaces are determined by the particular TFT panel size, its resolution.

SPI LCD Interface: Serial Peripheral Interface allows serial (one bit at a time) exchange of data between two devices. It has an advantage over parallel ones, that of simpler wiring. SPI also can have longer cables, since there is much less interaction or crosstalk in the cable. The downside of SPI is that you can't read from the TFT LCD display, you can only write on it and it is slow. That's why you normally see smaller TFT LCD screens use SPI.

MCU Parallel Interface: Many modern MCUs have built-in LCD controller function. There are two types that are commonly used, and . Generally, MCU/Parallel interface consist of data signal(4/8/9/16 bits) and control signal. MCU interface is simple, but requires display RAM.

RGB Interface: RGB interface is a special kind of parallel interface. It requires no display RAM. MCU directly updates the TFT screen, sending Red Green & Blue sub-pixel data (16/18/24 bits) and timing signals. RGB interface provides high speed communication to TFT LCD, but it needs more data wires and controlling is more complex.

LVDS Interface: Low-voltage differential signaling is an electrical digital signaling standard. Devices with LVDS interface can communicate at very high speeds over inexpensive twisted-pair copper cables. It is much less susceptible to EMI and crosstalk issues, allowing the transmitting device to be located farther from TFT LCD display.

UART/RS232/RS485: These serial interfaces are used in Topway's Smart TFT LCD display module. Universal Asynchronous Receiver/Transmitter (UART) is a block of circuitry responsible for implementing serial communication. Essentially, the UART acts as an intermediary between parallel and serial interfaces. On one end of UART is a bus of eight-or-so data lines (plus some control pins), on the other is the two serial wires – RX and TX.

HDMI Interface: High Definition Multimedia Interface is a connector and cable definition that supports high-quality and high-bandwidth streams of video and audio between devices.

MIPI DSI: MIPI Display Serial Interface defines a high-speed serial interface bewteen host processor and display module. The interface facilitates a high performance, low power and low EMI way to render brilliant color for the most dempanding image and video scenes.

Want more information on pm oled display? Feel free to contact us.

Choosing TFT LCD Interfaces