Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Marcussacapuces91/doc-TFT_eSPI/llms.txt

Use this file to discover all available pages before exploring further.

The R61581 is a high-integration TFT controller produced by RenesasSP (now Renesas Electronics) targeting small to mid-sized portable devices such as mobile phones, tablets, and mobile TV equipment. It drives a-Si TFT panels up to 320 RGB × 480 dots with an internal frame memory and a built-in power supply circuit. If you are working on a project that needs a taller 480-pixel panel without moving to a WVGA resolution chip, the R61581 is a solid choice with good library support in TFT_eSPI.

Controller Overview

The R61581 is a 262,144-colour single-chip controller LSI with an internal frame memory sized for 320 RGB × 480 dots. It supports the MIPI DBI (Display Bus Interface) Type B parallel interface in 8, 9, 16, and 18-bit widths, as well as the 4-line Type C serial (SPI) interface. An MDDI (Mobile Display Digital Interface) differential high-speed interface is also available, though TFT_eSPI uses the standard parallel or SPI paths. The R61581 also supports the MIPI DPI video interface (VSYNC, HSYNC, PCLK, DE, DB[17:0]) for direct video output, making it versatile across different system architectures.

Key Specifications

ParameterValue
Resolution320 RGB × 480 dots (maximum)
Colour depth262,144 (18-bit), also 8-colour idle mode
Internal frame memory345,600 bytes
Source driver lines960
Gate driver lines480
System interfaceMIPI DBI Type B (8/9/16/18-bit), Type C (SPI)
Video interfaceMIPI DPI, MDDI, TE/VSYNC synchronisation
Internal NVM32 bits (user ID), 7 bits (VCOM), 5 bits (VDV)
NVM write enduranceUp to 5 rewrites
Operating temperatureRefer to module datasheet

Interface Options

The R61581 Type C interface maps to TFT_eSPI’s standard 4-wire SPI path:
  • 4-line, 9-bit (Option 1) — SCLK, SDA, CS, and a 9th bit encodes D/C.
  • 4-line, 8-bit (Option 3) — SCLK, MOSI, CS, and a separate DC pin.
Option 3 (8-bit with a dedicated DC line) is the mode used by TFT_eSPI’s SPI driver, identical in wiring to the ILI9341.

Wiring

SPI Wiring (ESP32)

The SPI wiring for the R61581 follows the same pattern as any other 4-wire SPI display in TFT_eSPI:
R61581 Module PinSignalESP32 GPIONotes
VCC3.3 V3V3
GNDGroundGND
CSChip SelectGPIO 15Active low; define as TFT_CS
RESETResetGPIO 4Define as TFT_RST
DC / RSData/CommandGPIO 2Define as TFT_DC
MOSI / SDASPI DataGPIO 23VSPI MOSI
SCLKSPI ClockGPIO 18VSPI SCLK
LED / BLBacklight3V3 or PWM

8-bit Parallel Wiring (ESP32)

For parallel mode you will need 8 data lines plus control signals. Connect the R61581’s DB[7:0] bus to eight consecutive GPIO pins, then define TFT_PARALLEL_8_BIT and the individual data pins in User_Setup.h.
8-bit parallel mode is not available on the ESP8266 — insufficient GPIO pins. Use SPI mode on that platform.

Configuration

1

Select the R61581 driver

In User_Setup.h, uncomment the R61581 driver line:
#define R61581_DRIVER
Ensure no other driver define is active at the same time.
2

Set display dimensions

The R61581 drives a portrait 320 × 480 panel:
#define TFT_WIDTH  320
#define TFT_HEIGHT 480
3

Define pin assignments (SPI example)

#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS   15
#define TFT_DC    2
#define TFT_RST   4
#define TFT_MISO 19   // Optional
4

Set SPI frequency

#define SPI_FREQUENCY      27000000   // 27 MHz — conservative for long wires
// #define SPI_FREQUENCY   40000000   // 40 MHz — try with short direct connections
#define SPI_READ_FREQUENCY 20000000

Complete User_Setup.h Example (ESP32 SPI)

// ---- Driver selection -----------------------------------------------
#define R61581_DRIVER

// ---- Display dimensions ---------------------------------------------
#define TFT_WIDTH  320
#define TFT_HEIGHT 480

// ---- Pin definitions (ESP32 VSPI) -----------------------------------
#define TFT_MOSI 23
#define TFT_SCLK 18
#define TFT_CS   15
#define TFT_DC    2
#define TFT_RST   4
#define TFT_MISO 19

// ---- SPI clock frequencies ------------------------------------------
#define SPI_FREQUENCY      27000000
#define SPI_READ_FREQUENCY 20000000

// ---- Fonts (optional) -----------------------------------------------
// #define LOAD_GLCD
// #define LOAD_FONT2
// #define LOAD_FONT4
// #define SMOOTH_FONT

Power Supply Architecture

The R61581 contains an internal step-up and voltage follower circuit that generates all drive voltages needed for the a-Si TFT panel from a single VCI supply input. The power supply rails generated internally include:
RailFunction
DDVDHSource driver / VCOM supply
VREGReference voltage
VCLNegative LCD drive
VGHGate-on drive voltage
VGLGate-off drive voltage
VCOMH/LVCOM drive (common electrode)
This integrated supply simplifies board design — only VCI (the analog supply) and IOVCC (I/O logic supply) need to be provided externally.

Dynamic Backlight Control

A notable feature of the R61581 is its built-in dynamic backlight control function, which adjusts backlight brightness based on image content. This reduces power consumption at the backlight with minimal perceptible impact on display quality. On most modules this is accessible via a PWM-capable backlight pin connected to the driver IC.

Power-Saving Modes

Deep Standby

Lowest power state. Display output off and internal circuits powered down.

Sleep Mode

Display controller halted. GRAM retained. Fast resume to active mode.

8-Color Idle Mode

Reduced colour depth (8 colours) to cut power while keeping the display visible.

Basic Usage

#include <TFT_eSPI.h>

TFT_eSPI tft = TFT_eSPI();

void setup() {
  tft.init();
  tft.setRotation(0);          // Portrait: 320 wide × 480 tall
  tft.fillScreen(TFT_BLACK);

  tft.setTextColor(TFT_GREEN, TFT_BLACK);
  tft.setTextFont(4);
  tft.drawString("R61581 Ready", 20, 20);
}

void loop() {
  tft.fillScreen(TFT_NAVY);
  tft.drawRect(10, 10, 300, 460, TFT_WHITE);
  tft.drawCentreString("320 x 480", 160, 230, 4);
  delay(1000);
}

MDDI Licensing Note

The MDDI interface supported by the R61581 is designed and produced under licensing from Qualcomm. MDDI must be adopted only in modules that incorporate a Qualcomm CDMA ASIC. TFT_eSPI does not use the MDDI path — it uses the standard DBI or SPI interface — so this licensing requirement does not apply to typical TFT_eSPI projects.

Datasheet Reference

The R61581 Technical Reference Manual is available at:
https://forums.jaspp.org.uk/release/Reference/Tontec_R61581/Tontec R61581 TRM rev. 1.20.pdf

Build docs developers (and LLMs) love