Zonnestroompanelen in Nederland

duurzaamheid achter de meter

(38) Uno shield 3.6 inch, 240*400 pixel TFT display with ST7793 controller

by Floris Wouterlood – The Netherlands – November 3, 2023

Summary
An unusual pixel format is that presented by a 3.6 inch diagonal Uno compatible TFT shield: 240*400 pixels. This particular display is driven by a ST7793 controller. This pixel dimension format and the ST7793 controller are supported in software by David Prentice’s MCUFRIEND_kbv.h library. I created a sketch called ‘windshield wipers’ to test the versatility of this display.

figure 1. 3.6” diagonal 240*400 parallel TFT display shield with ST7793 controller at work on the Arduino Uno.

Shield
This nameless TFT shield was purchased from a Chinese source. As can be seen in figure 2, the pinout with two rows of pins supporting a parallel interface is common for Arduino Uno compatible shields. The shield features a micro SD card slot and a reset button mounted sidewards. A voltage regulator allows 3.3V and 5V operation. The driver chip is a ST7793, a fairly unusual chip in the Arduino realm. The peculiarity of this shield is the uncommon, stretched format: 240*400 pixels while 240*320 or 320*480 are the normal. The format makes it possible to use it as a ‘panorama’ photostand or a portrait configuration suitable to show pictures of towers, flag poles, chimneys and cranes. I bought this shield out of curiosity and to see how fast a parallel shield with 240*400 pixels might work.

figure 2. Back and front of the 3.6” display shield. On the back is a reset button, a voltage regulator and a micro SD card slot that accepts 32 Gb micro SD cards. On the right: the display being used as a vertical photostand. The image shown is a 240*400 16-bit BMP formatted image of the Leiden town hall, Christmas decoration.

Touch
The shield was delivered together with a plastic touch stick. I did not check the touch features of this shield, however.

Photostand
The SD card slot is mounted in a convenient position. It accepts micro SD cards up to 32 Gb, formatted in fat32. Images are read and displayed on screen if they are in 16-bit BMP (RGB585) format. A [standard] sketch is supplied here that shows pictures from a SD card in sequential order. One image is enclosed in the zip file, named ‘leiden.BMP’. This is the town hall picture illustrated in Figure 2. The file name of any picture should be according to the archaic 8.3 MSDOS convention.

Library
MCUFRIEND_kbv.h is the only library to my knowledge hat currently supports the combination Arduino Uno and ST7793 controller. Attempts to use Bodmer’s TFT_eSPI.h failed to produce results.

Downloadable sketche

UNO_ST7793_240x400_wiper.ino. This sketch produces the image shown in figure 1: windscreen wipers struggling forever against flushing rain.

download: ‘UNO_ST7793_shield.zip