News

News

News

SPI TFT Frame Rate: Calculate the Limit Before Changing the Display

October 19,2026    Yuxiang Display    144

A 240 × 320 TFT needs 153,600 bytes for one full-screen RGB565 image. On a single-data-line SPI link running at an illustrative 20 MHz, those pixels alone take 61.44 ms to transfer. That gives an ideal ceiling of about 16.3 complete screen writes per second, before commands, software gaps and rendering time.

For an instrument that updates a reading and a small trend graph, transferring the changed area can make a larger difference than replacing the display. Start by measuring how much data your firmware sends each time the value changes.

Calculate the bytes that actually cross the bus

For an RGB565 transfer using two bytes per pixel:

payload bytes = width × height × 2
pixel transfer time = payload bytes × 8 ÷ SPI bit rate
ideal full-screen writes per second = 1 ÷ pixel transfer time

These equations assume one data bit per clock. They do not describe quad-SPI, an RGB interface or an 8080 parallel bus. Check the selected interface and the controller's supported pixel format before using them.

The following values are calculations, not measurements of a Yuxiang module. The example clock settings are not a statement of a controller's maximum permitted SPI frequency.

Update area and formatPixel payloadSPI clock used in calculationPixel transfer timeIdeal complete transfers per second
240 × 320, RGB565153,600 bytes10 MHz122.88 ms8.1
240 × 320, RGB565153,600 bytes20 MHz61.44 ms16.3
80 × 40, RGB5656,400 bytes20 MHz2.56 ms390.6

The last row describes an individual rectangle transfer. It does not promise 390 visible UI updates per second. The panel's scan timing, pixel response and the application's scheduling remain separate limits.

A full RGB565 framebuffer at this resolution takes 150 KiB of RAM. A second full buffer needs another 150 KiB. A small MCU may need line buffers or a partial rendering buffer instead.

Separate three different kinds of delay

An operator presses a button. The firmware reads the input, prepares a new screen, transfers pixels and the LCD changes its optical state. A delay in any of those stages can make the interface feel slow.

Rendering delay is the time spent creating pixels. Fonts, image decoding, graph drawing and memory access can dominate it.

Transfer delay is the time needed to deliver commands and pixel data. Small transactions, pauses between them and other SPI devices all consume bus time. Espressif's SPI master documentation describes transaction intervals and clock frequency as separate contributors to transfer performance.

Optical response is the panel's transition after it receives the new image. It varies with the panel and operating conditions. Increasing SPI clock frequency does not directly improve liquid-crystal response at low temperature.

Also distinguish the panel's refresh specification from the number of new full-screen images your MCU can send. A panel can keep scanning its existing image while the host updates its display memory more slowly.

Update the number, not the whole instrument panel

Consider a pressure instrument with a fixed scale, a live numerical reading and a status icon. If only an 80 × 40 pixel reading changes, the example above sends 24 times fewer pixel bytes than a full 240 × 320 screen write.

Check what your graphics library invalidates. Updating one label can trigger a larger redraw if its container, background or animation is also marked dirty. Combining adjacent changes may reduce command overhead, while combining distant changes can waste pixel bandwidth.

LVGL's display setup documentation distinguishes partial, direct and full rendering modes. Choose a mode that fits the display interface and available memory. A faster refresh timer alone cannot overcome a link that is already occupied sending pixels.

Use DMA to free the CPU, then check the completion path

DMA can transfer a prepared buffer while the CPU works on another task or renders into a different buffer. It does not reduce the number of bits that must cross SPI.

Keep the active buffer unchanged until the hardware finishes using it. With asynchronous LVGL flushing, report completion when that transfer has actually completed. Calling the completion function immediately after queuing DMA can allow the buffer to be reused too early.

Check your MCU's requirements for buffer alignment, accessible memory and cache handling. Those requirements vary by target; copying a configuration from another chip can add hidden buffer copies or cause corrupted transfers.

Run a short measurement before redesigning the hardware

Use the same screen, pixel format and compiler settings for each comparison:

  1. Send a solid full-screen colour and measure from the start of the display write to the end of the pixel transfer.

  2. Repeat with a small rectangle. Record its dimensions and payload size.

  3. Run the real interface, including graph drawing and sensor acquisition. Measure input-to-visible-update time separately from SPI transfer time.

  4. Inspect SCLK and CS with a logic analyser if the transfer is much slower than the calculation. Look for idle gaps and fragmented transactions.

  5. Repeat with the normal workload on shared buses. Preserve any required sensor sampling deadlines.

Record both typical and worst observed update times, together with the test conditions. A fast animation demonstration is not enough to qualify an instrument's complete user interface.

If the SPI transfer approaches the calculated limit, reduce the update area or data volume. If it contains long idle gaps, investigate transaction handling and scheduling. If transfer is quick but the interface remains slow, measure rendering and optical response next.

Check these details when selecting a TFT module

Yuxiang's 2.8-inch 240 × 320 ILI9341 SPI TFT listing is an example of a product with the resolution discussed here. The calculations above do not establish that module's supported SPI clock, measured frame rate or performance with a particular MCU.

For a design review, specify the screen resolution, changing regions, required update interval, MCU, available RAM and interface. Confirm the final module's timing limits, logic levels and connector assignment against its approved documentation.

Compare the TFT LCD module range or send the interface requirements and screen layout to Yuxiang. Include a short video or timing trace if you are investigating an existing slow display. It makes the bottleneck easier to identify.

/en/industry-dynamics/spi-tft-frame-rate-240x320-rgb565.html
Search
Recent updates
Tags
1.163842