What is the pinout of a 1.3 inch IPS LCD module?

By admin

The pinout of a typical 1.3 inch IPS LCD module, specifically the common 240x240 resolution variant using the ST7789V driver, is a 7-pin or 8-pin interface designed for SPI communication. The standard pinout, from left to right when viewing the module with the display facing you and the pins at the bottom, is: GND (Ground), VCC (Power, typically 3.3V), SCL (SPI Clock), SDA (SPI Data), RES (Reset), DC (Data/Command), and CS (Chip Select). Some modules include an extra BL (Backlight) pin, making it an 8-pin layout. This is the most common configuration you’ll find on modules sold as “1.3 inch 240x240 ips display” units, and understanding this pinout is critical for proper wiring with microcontrollers like the ESP32, STM32, or Raspberry Pi Pico.

The pinout is not arbitrary—it’s dictated by the ST7789V controller’s requirements. The ST7789V is a 262K-color single-chip driver for TFT displays with a resolution of 240x240 pixels, and it supports both SPI and parallel interfaces. However, the 1.3 inch modules almost always use the 4-wire SPI mode to minimize pin count. The 7-pin version omits a dedicated backlight control, meaning the backlight is tied to VCC and always on when power is applied. The 8-pin version adds a backlight pin, which can be controlled via PWM for brightness adjustment. Here’s the exact pinout for the 8-pin variant, which is the most flexible:

Pin Number Pin Name Function Typical Connection
1 GND Ground Connect to common ground (0V)
2 VCC Power Supply 3.3V (do not use 5V directly)
3 SCL SPI Clock Microcontroller SPI SCK pin
4 SDA SPI Data (MOSI) Microcontroller SPI MOSI pin
5 RES Reset Any GPIO, active low
6 DC Data/Command Any GPIO, high for data, low for command
7 CS Chip Select Any GPIO, active low
8 BL Backlight 3.3V or PWM GPIO (if available)

Now, let’s break down each pin with hard data. The GND pin is straightforward—it must be connected to the system ground. The VCC pin is rated for 3.3V DC, with a typical current draw of 20-30 mA for the display logic and backlight combined (if the backlight is powered separately, the logic draw is around 5-10 mA). Never feed 5V into VCC; the ST7789V has an absolute maximum rating of 4.0V, and exceeding this will fry the module. The SCL pin carries the SPI clock signal, which can run up to 20 MHz on the ST7789V, but practical limits with long wires or breadboards are around 10 MHz. The SDA pin is the MOSI line—there’s no MISO on these modules because the display doesn’t send data back to the microcontroller in SPI mode. This is a write-only interface.

The RES pin is an active-low reset. Pulling it low for at least 10 microseconds resets the display controller. Many libraries handle this automatically, but you can tie it to VCC through a 10kΩ resistor if you want to save a GPIO—though this is not recommended because it may cause initialization glitches. The DC pin distinguishes between commands and data: when DC is low, the SPI byte is interpreted as a command (e.g., setting the column address range); when DC is high, it’s pixel data. The CS pin is active-low chip select; you must pull it low before any SPI transaction, then high when done. If you’re using only one SPI device, you can ground CS permanently, but that’s a hack that can cause bus contention.

The backlight pin (BL) on the 8-pin version is typically driven by a small transistor on the module that controls the LED backlight. The backlight voltage is usually 3.3V, and the current draw is around 15-20 mA at full brightness. If you connect BL to 3.3V, the backlight is on constantly. For PWM dimming, connect it to a PWM-capable GPIO on your microcontroller, with a frequency of 1-5 kHz to avoid flicker. Note that some modules use a common anode configuration for the backlight, so BL might be the positive terminal—check the datasheet of your specific module.

There’s a common confusion: some 1.3 inch modules, especially those from generic suppliers, swap the SCL and SDA pins or add a ninth pin for MISO. Always verify with a multimeter. The ST7789V datasheet specifies that the SPI interface uses SCK (SCL) and SDI (SDA) for data input, with no data output. If you see a pin labeled “MISO” or “SDO” on a 1.3 inch module, it’s likely a different driver (like the ILI9341) or a mislabeled pin. The 1.3 inch IPS LCD module with 240x240 resolution almost exclusively uses the ST7789V, which is a 1.54-inch die shrunk for smaller panels. The pixel pitch is 0.135 mm, giving a 34.5 mm diagonal viewing area—that’s 1.36 inches, but they’re marketed as 1.3 inches due to the bezel.

Let’s talk about power sequencing. The ST7789V requires VCC to be stable before the reset pin is released. If you’re using a microcontroller that boots at 3.3V, you’re fine. But if you’re using a 5V Arduino, you need a level shifter for the SPI lines (SCL, SDA, RES, DC, CS) because the ST7789V is not 5V tolerant—its logic inputs are rated at 3.3V max. A 1kΩ resistor in series with each signal line can work as a crude voltage divider, but a proper level shifter like the 74LVC245 is better. The backlight pin, if present, can handle 5V if the module has a built-in current-limiting resistor, but check the module’s spec sheet. Many cheap modules omit this resistor, so use 3.3V or a series resistor (e.g., 100Ω) to limit current to 20 mA.

For a practical wiring example, say you’re using an ESP32. Connect GND to GND, VCC to 3.3V, SCL to GPIO 18 (SPI clock), SDA to GPIO 23 (SPI MOSI), RES to GPIO 22, DC to GPIO 21, CS to GPIO 5, and BL to GPIO 4 (PWM). The ESP32’s SPI can run at 40 MHz, but the ST7789V tops out at 20 MHz, so set the SPI clock to 20 MHz in your code. The display update rate for a full 240x240 frame at 16-bit color (115,200 bytes) at 20 MHz is about 5.76 ms, but overhead from command setup and library delays pushes it to around 15-20 ms per frame, giving a theoretical 50-60 FPS. In practice, you’ll get 30-40 FPS with a well-optimized library like TFT_eSPI.

Now, let’s address the 7-pin variant. It’s identical to the 8-pin, but without the BL pin. The backlight is hardwired to VCC via a resistor on the module, so it’s always on. This is fine for static displays, but if you need to dim the display, you’ll have to cut the PCB trace and add your own transistor. The 7-pin pinout is: GND, VCC, SCL, SDA, RES, DC, CS. The order is the same, just missing the last pin. Some modules have the pins in a different order, like GND, VCC, SDA, SCL, RES, DC, CS—this is rare but happens. Always check the silkscreen on the module or test with a multimeter: measure continuity between the pin and the display’s flex cable to identify GND and VCC.

There’s also a variant with a 6-pin interface, which combines RES and DC into a single pin—this is not standard and should be avoided because it requires a special initialization sequence. The 1.3 inch IPS LCD modules from reputable manufacturers like 1.3 inch 240x240 ips display units always use the 7 or 8-pin SPI layout. The ST7789V driver supports 12-bit, 16-bit, and 18-bit color modes, but the 1.3 inch modules typically use 16-bit RGB565 (5 bits red, 6 bits green, 5 bits blue) to save memory. The SPI transaction for a pixel is two bytes, so a full frame is 240 * 240 * 2 = 115,200 bytes. The command set includes 0x36 (Memory Access Control) for rotation, 0x3A (Interface Pixel Format) to set the color depth, and 0x2A/0x2B (Column/Page Address Set) to define the write window.

One nuance: the CS pin behavior. Some libraries keep CS low for the entire frame write, which is fine for a single display. But if you’re sharing the SPI bus with an SD card or another device, you must toggle CS between commands. The ST7789V datasheet specifies that CS must be low during command and data writes, and high to deselect. The minimum CS high time is 50 ns, which is easily met at 20 MHz. The DC pin must be stable before the rising edge of SCL—setup time is 10 ns minimum. These timing constraints are not critical for hobbyist projects, but if you’re pushing for high-speed updates, use SPI transactions with DMA on an STM32 or ESP32.

Let’s look at the backlight control in more detail. The BL pin on the 8-pin module is usually connected to the base of an NPN transistor (like a 2N3904) that switches the backlight LED string. The LED string has a forward voltage of about 3.0V and a current of 15-20 mA. If you apply 3.3V to BL, the transistor saturates, and the backlight is on. For PWM, use a frequency above 1 kHz to avoid visible flicker. The PWM duty cycle linearly controls brightness, but at very low duty cycles (below 10%), the backlight may turn off due to the transistor’s threshold voltage. A 1 kHz PWM with 8-bit resolution gives 256 brightness levels, but the human eye perceives only about 50 distinct steps.

Now, a critical detail: the 1.3 inch IPS module’s glass is 1.5 mm thick, and the viewing angle is rated at 170 degrees in all directions (IPS technology). The contrast ratio is typically 1000:1, and the brightness is 300-400 cd/m² with the backlight at full power. The ST7789V supports a sleep mode (command 0x10) that reduces power consumption to under 10 µA. To wake it, you need to send command 0x11 and wait 120 ms. This is useful for battery-powered projects. The idle current draw with the display on but showing a static image is about 5 mA for the logic, plus the backlight current.

If you’re wiring multiple displays, each needs its own CS pin. You can share SCL, SDA, RES, and DC, but CS must be separate. The ST7789V can be daisy-chained in theory, but it’s not supported in SPI mode—each display needs its own chip select. The maximum number of displays you can drive from one SPI bus is limited by the capacitive load on the clock and data lines. With 10 cm wires, you can drive up to 4 displays at 10 MHz. Beyond that, you’ll need buffers or a lower clock speed.

Finally, let’s debunk a myth: the 1.3 inch module’s pinout is not the same as the 0.96 inch or 1.5 inch modules. The 0.96 inch module often uses the SSD1306 OLED driver (I2C or SPI), which has a different pinout. The 1.5 inch module might use the ILI9341 or ST7789V, but with a different resolution (e.g., 240x320). Always check the resolution and driver IC. The 1.3 inch 240x240 IPS module is unique in its pinout because it’s a square display with a 1:1 aspect ratio, which is rare for TFTs. The ST7789V’s maximum resolution is 240x320, but the 1.3 inch panel uses only the top-left 240x240 region. The unused rows are not accessible, so you cannot use the full 240x320 area.

For debugging, if your display shows nothing, check the voltage on VCC with a multimeter—it should be 3.3V ±0.1V. Then check the RES pin: it should be high after initialization. If it’s low, the display is in reset. Use an oscilloscope to verify the SPI signals: SCL should have a clean square wave, and SDA should show data pulses when you write to the display. The CS pin should go low before the first clock pulse. A common mistake is wiring SDA to the microcontroller’s MISO pin instead of MOSI—since the display doesn’t use MISO, you’ll get no data. The ST7789V’s SPI is mode 0 (CPOL=0, CPHA=0) or mode 3 (CPOL=1, CPHA=1), depending on the library. Most libraries use mode 0, but check your code.

This pinout knowledge is practical for any project involving a 1.3 inch IPS LCD, whether it’s a smartwatch, a sensor display, or a gaming device. The 240x240 resolution at 1.3 inches gives a PPI (pixels per inch) of 261, which is sharp enough for text and icons. The SPI interface means you can run it with just 5 GPIOs (if you tie RES to VCC and CS to ground), freeing up pins for other sensors. The module’s physical dimensions are typically 27.5 mm x 28.5 mm, with a 1.5 mm PCB thickness, and the pin header is 2.54 mm pitch, compatible with breadboards. The flex cable is 20 mm long, with a 0.5 mm pitch connector—but the module usually comes with the header pre-soldered.