I want to display 2 or 3 images in a loop (every 5 seconds or so) on a 3 inch TFT. The TFT can be found here, Resolution 240x400 Screen 3 Inch Tft Lcd with MCU Interface

It uses an MCU interface, I am looking for the easiest way to drive this display. I have done some Arduino stuff before, could I drive this display with an Arduino and display images such as JPEGs on it?

I'm always nervous when it comes to buying these parts from Alibaba, because I don't know if there is a library that will drive the display or not already. I'm also trying to do this as cost effectively as possible and was planning on driving 10 of these display for a mini project that I am working on.


It would probably be a big challenge to get that display working with an Arduino, for a few reasons.

  • It has an 40-pin flat flex connector. You'll need a suitable socket to plug it into, which breaks out the signals to something breadboard-friendly.
  • How will you interface with it? It says it has an 8/9/16/18 bit interface, but does it have data sheet explaining how? It's probably using a standard interface, but which one?
  • Where will the images come from? The flash memory on an Arduino Uno is only 32KB, which wouldn't be enough for even one image.

A better approach would be to find something friendlier at SparkFun or Adafruit, like "2.8" TFT Touch Shield for Arduino with Resistive Touch Screen", at https://www.adafruit.com/product/1651. Note the "for Arduino". It's a shield that plugs directly into an Uno. As a bonus, it has an SD card slot as well, which can hold your images. It should also come with documentation and some sample code, which is a huge help.

I'll bet one of the sample programs will display .BMP images from the SD card on the LCD. Dealing with JPEG files requires decoding them first before you can transfer the pixels to the display, so stick with BMP, which will be much simpler.

And the price is only double the Ali Express item, which is cheap for something with the above features. But you need 10 of them, so you'll have to decide if it fits your budget.


Given the 40-pin connector, this is most likely 24bit parallel RGB. If I guessed that correct, it means:

  • you need at least 25 GPIOs to control it (less if you can live with limited color depth)
  • no special protocol required, just the timing has to be right
  • it has no framebuffer so your µC needs a lot of RAM

For your application, it is simpler to look for a display with a built-in framebuffer and a SPI interface.

  • \$\begingroup\$ The link and the datasheet for the apparent controller indicate that it has an 8/9/16/18 bit parallel interface, which means it includes a controller with an on-board frame buffer. \$\endgroup\$ – ajb Oct 31 '18 at 21:03

Your link appears to be to Alibaba's mobile site, which is difficult to use on desktop, but assuming that this is the same or at least a similar listing here, it indicates that the controller used in teh panel is an ST7793. The controller is what you will actually be talking to when you want to drive the display, so this important. The way these LCD modules are manufactured, is someone makes a panel of a given resolution, someone else makes a controller IC that drives the panel, and someone else assembles them together. So you may find libraries intended for other panels that use the same controller--these will work just fine on this panel, with the caveat that the controller will need to be initialized with some values that are specific to the panel, such as row/column configuration and gamma correction. However, the initialization values for another panel of the same resolution should be close enough.

The datasheet for the controller, which is here, shows that it supports 8, 9, 16, and 18 bit interfaces in two different modes (which matches the Alibaba description). Given the 40-pin interface, the module you've linked may support any of those. Usually the controllers use pin strapping to select between different interface modes, so you can probably choose the interface mode that you find most convenient. Unfortunately there is no indication of the pinout of the module, so you would need that before you could begin to hook it up. This is not standardized, so you'd need to get that info from the seller.

The parallel interface is not the most convenient for smaller Arduino type boards simply because of the number of pins required. Also, these parallel interfaces are generally most efficiently used via an external memory bus, which small MCUs like the ATMega328 and 32U4 don't have. The MCU used in the Arduino Mega might have an external bus interface, you'd have to check the datasheet.

The other big factor is how you intend to store the images to display. A 240x400 image in 16-bit color is 192kB, which is not huge in modern terms, but will definitely require some sort of external memory for most MCUs, especially if you need to store more than a handful. You could compress the images, but implementing something like JPEG decompression in a small MCU is rather complicated and is not likely to perform well, even if you have sufficient RAM.

A final thing to keep in mind is that moving around that much data on a small MCU can take some time, especially if you need to move it in small chunks from an external memory to the LCD. DMA can help here, but that's not something you get on some of the small MCUs used in many Arduino boards.

If you're after an easy solution, there are probably better options than that LCD plus an Arduino. You might consider a Raspberry Pi, or even an Arduino-specific kit that has a suitable LCD, external memory, and example code.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.