Series: Tried Using Touch Panel TFT Display GT-SP with Arduino

Connecting an Arduino to a touchscreen and displaying text messages

Connecting an Arduino to a touchscreen and displaying text messages

DownloadDownload sample project & program (for GT Design Studio & Arduino)

Hello everyone, it’s @kissaten, someone interested in trying out electronics projects. In this series, as a beginner in electronics, I will be explaining the process of connecting a touch panel TFT/LCD display to Arduino and developing various things.

There are many touch screen products in the world, but for this series, I chose the GTWV070S3A00P, a 7-inch touch display from Noritake’s GT-SP series. It seems to be very easy to handle, even for beginners, because the display screen can be designed with a dedicated PC tool and the screen can be controlled without the need to read touch coordinates. And since it supports serial connection, only a few cables are needed to connect to Arduino.

In this article, I used this touch screen and an Arduino to get to the point where you can touch the screen and see text on the display.

Obtaining Various Documents

To start with electronic projects, obtain the necessary materials and tools from the GT-SP support page . Download the hardware specifications and software specifications for the touch screen GTWV070S3A00P, design tool GT Design Studio, and GT-SP User Guide Part 1-3. If you are dealing with GT-SP for the first time, it is recommended to go through the user guide. Some files may require membership registration, but all resources, including design tools, are available free of charge.

GTWV070S3A00P Specifications (member registration required)

Design Tools (member registration required)

User’s guide

Connecting a Touch Screen to Arduino

Noritake’s TFT/LCD display GT-SP series can be connected to various major microcontrollers using a serial interface. In this case, I will be using an Arduino UNO (or compatible) as the host controller and combining it with the GT-SP for development.

Referencing User Guide Part 3, I will proceed to connect the GT-SP and Arduino UNO. Since the wiring diagram in the User Guide is for Arduino Nano Every, it has been modified for Arduino UNO as follows.

Here is an example of a connection using a breadboard.

Creating a Project to Write to the Touch Screen

Referring to “Receiving Response Data” in User Guide Part 3, create a project using GT Design Studio to output “ABC” when a button is pressed, and register it to GT-SP. The basic usage of GT Design Studio is detailed in User Guide Part 2, so it is advisable for first-time users to read that section beforehand.

Explanation:

Create a button “BUTTON_0” on page “PAGE_0” and assign the event action “DATA_TX_FIX” to it. In the content, use TEXT to input “ABC.”

Also, create “TEXT_0” as a receptacle to hold the values returned from Arduino.

Creating a Program to Write to Arduino

Referencing “Receiving Response Data” in User Guide Part 3, register the following sample program on Arduino.

*Note: The sample program written in the User Guide is intended for Arduino Nano Every, and as is, it will not work with Arduino UNO. To make it compatible with UNO, the serial communication in the sample program has been changed from “Serial1” to “Serial.”

DownloadDownload sample project & program (for GT Design Studio & Arduino)

 

 

Interpreting the Program

When a button on the GT-SP is pressed, the GT-SP sends the data “ABC” to Arduino. Arduino reads this and sends an instruction to display “ABC” on the GT-SP’s text object.

To delve into the details, when the host receives serial data from GT-SP, the Serial.available() flag is raised, triggering a call to gtsp_signal_read(). It then determines if the data begins with “RESb” and retrieves the 4-byte data length. Subsequently, it retrieves the data for the specified length. As a result, the string “ABC” sent from GT-SP is returned.

Next, using gtsp_ObjPrpSet_string with the object number, property number, and the received string “ABC,” the program instructs the GT-SP’s “Text Object” to display “ABC.”

Execution Results

Connect the GT-SP with the programmed project and the Arduino with the uploaded sketch. When you press the button on the GT-SP, the previously empty text object section displays “ABC.”

When you press the button, you can check what kind of data is being sent through the “Terminal” in GT Design Studio or the Serial Monitor in the Arduino IDE. By observing this, it is confirmed that the data “ABC” sent from the GT-SP is processed by Arduino and re-output on the screen.

Next time, I will try controlling an LED connected to Arduino from the touch screen.