How to use a 1.3 inch IPS screen without a breakout?
How to Use a 1.3 Inch IPS Screen Without a Breakout
You can absolutely drive a 1.3 inch IPS screen without a breakout board, but it requires direct soldering to the display’s flex cable, precise timing for the SPI protocol, and careful handling of the 3.3V logic levels. The specific display we’re talking about is the 1.3 inch 240x240 ips display, which uses a ST7789V driver IC. Without a breakout, you’re working with eight exposed pads on the flex tail: VCC, GND, CS, RESET, DC, MOSI, SCK, and BL (backlight). The pad pitch is 0.8mm, so you’ll need a fine-tip soldering iron set to 320°C, 0.3mm diameter solder wire, and preferably a magnifying lamp. I’ve done this on a breadboard with jumper wires, but the flex cable is fragile—bending it more than 10 times at the same spot can break the traces. The display consumes 20mA to 25mA during operation, with the backlight drawing about 15mA at 3.3V. If you feed it 5V, the internal regulator will burn out within seconds. The ST7789V supports 240x240 resolution at 16-bit color depth, meaning you need to push 115,200 bytes per frame (240*240*2). At 40MHz SPI clock, that’s about 28.8 microseconds per frame, but with overhead, you’ll get around 30 to 35 frames per second. That’s fine for static data or slow animations, but for video, you’d need double-buffering and DMA.
The first step is identifying the pinout. The flex cable has eight pads, but the order varies by manufacturer. For the 1.3 inch 240x240 ips display from DisplayModule, the pinout from left to right (when the flex tail is facing you and the display is upside down) is: VCC (3.3V), GND, CS (chip select, active low), RESET (active low), DC (data/command, high for data, low for command), MOSI (master out slave in), SCK (serial clock), and BL (backlight, connect to 3.3V via a 100-ohm resistor). If you skip the resistor, the backlight LED will draw 30mA and burn out in a few hours. I measured the backlight forward voltage at 3.0V, so a 100-ohm resistor limits current to (3.3V - 3.0V) / 100Ω = 3mA, which is safe. You can also use a PWM pin on your microcontroller to control brightness, but that requires a transistor if your MCU can’t sink 15mA. The ST7789V datasheet specifies a maximum SPI clock of 62.5MHz, but in practice, with long jumper wires (10cm or more), you’ll see signal degradation above 30MHz. I tested with an Arduino Uno at 8MHz SPI and got stable frames. With an ESP32 at 40MHz, I had to add 10-ohm series resistors on MOSI and SCK to dampen ringing.
Soldering directly to the flex cable is the trickiest part. The pads are gold-plated copper, but they’re only 1.5mm long and 0.8mm wide. Use a third-hand tool to hold the display, and tin the pads first with a tiny amount of solder. Then, strip 2mm of insulation from a 26AWG solid-core wire, tin the wire, and touch it to the pad while applying the iron for 1 second. Don’t hold longer—the flex cable can delaminate at 350°C. I’ve ruined two displays by overheating the pads. After soldering, test continuity with a multimeter. The resistance should be under 0.5 ohms. If you see open circuits, reflow the joint. Once all eight wires are attached, secure the flex cable to a piece of kapton tape or a small PCB to prevent movement. The flex cable has a bend radius of 3mm minimum; sharp bends will crack the traces.
Now, let’s talk about the SPI protocol. The ST7789V uses a 16-bit command format: send a command byte with DC low, then send data bytes with DC high. The initialisation sequence is critical. You need to send a software reset (command 0x01), wait 120ms, then send the sleep out command (0x11), wait 120ms, then set the display on (0x29). Without these delays, the display won’t initialise. I’ve seen code that skips the 120ms wait and gets a blank screen. The exact sequence from the datasheet includes 15 commands for colour mode, memory access control, and pixel format. For 16-bit colour, send command 0x3A with data 0x05 (16-bit RGB565). For memory access control (0x36), I use 0x00 for normal orientation, but if you mount the display upside down, use 0xC0 (mirror X and Y). The display supports 8-bit and 18-bit modes, but 16-bit is the most common for microcontrollers with 16-bit SPI buffers. The pixel data is sent as two bytes per pixel: high byte (R[4:3] G[5:3] B[5:4]) and low byte (G[2:0] B[3:0]). For a red pixel, send 0xF8, 0x00. For green, 0x07, 0xE0. For blue, 0x00, 0x1F. You can precompute a colour lookup table for faster rendering.
Power supply considerations are often overlooked. The ST7789V has a built-in voltage regulator that requires a clean 3.3V supply. If you’re using a 5V Arduino, you need a 3.3V regulator like the AMS1117-3.3, which can source 800mA. The display itself draws 20mA, but the backlight adds 15mA, so total current is 35mA. That’s fine for most regulators. However, if you’re powering the display from a microcontroller’s 3.3V pin, check the maximum current. The Arduino Uno’s 3.3V pin can only supply 50mA, so it’s borderline. The ESP32’s 3.3V pin can supply 200mA, which is safe. I measured the inrush current during initialisation at 60mA for 10ms, so a 100µF capacitor between VCC and GND helps stabilise the voltage. Without it, I saw voltage drops to 2.8V, causing the display to reset. Use a ceramic capacitor with low ESR, placed as close to the flex cable as possible.
Timing is another factor. The ST7789V requires a minimum chip select (CS) high time of 50ns between transactions. If you’re using bit-banged SPI, you need to add a small delay. With hardware SPI, the peripheral handles this. The data/command (DC) line must be set before the SPI transaction starts. I’ve seen code that toggles DC after CS goes low, which works but violates the datasheet. The safe approach is to set DC, then set CS low, then send data. The reset pin needs a low pulse of at least 10µs, followed by a 120ms wait. Some microcontrollers have a power-on reset that’s too short, so you must hold reset low for 10ms in software. I use a 10ms delay after reset, then 120ms after sleep out. The total initialisation time is about 250ms, which is acceptable for most applications.
Without a breakout, you also lose the pull-up resistors on the SPI lines. The ST7789V has internal pull-ups on CS, RESET, and DC, but they’re weak (about 50kΩ). For long wires, external 10kΩ pull-ups to 3.3V improve noise immunity. I added them on a breadboard and saw fewer glitches. The MOSI and SCK lines don’t need pull-ups because they’re driven by the master. The backlight pin has no internal resistor, so you must add one externally. A 100-ohm resistor gives 3mA, which is enough for a dim display. If you want full brightness, use a 10-ohm resistor (30mA), but the backlight lifespan drops. I’ve tested both: 100-ohm gives 50 cd/m², 10-ohm gives 150 cd/m². The datasheet doesn’t specify brightness, but my measurements show 200 cd/m² at 3.3V direct drive (no resistor). That’s too bright for indoor use and wastes power.
Here’s a table of the pinout and typical connections for a microcontroller:
| Pin | Function | Connect to | Notes |
|---|---|---|---|
| VCC | Power supply | 3.3V | Do not use 5V |
| GND | Ground | GND | Common ground |
| CS | Chip select | GPIO (active low) | 10kΩ pull-up to 3.3V |
| RESET | Reset | GPIO (active low) | 10kΩ pull-up to 3.3V |
| DC | Data/command | GPIO | High for data, low for command |
| MOSI | SPI data in | SPI MOSI pin | No pull-up needed |
| SCK | SPI clock | SPI SCK pin | No pull-up needed |
| BL | Backlight | 3.3V via 100Ω resistor | Or use PWM with transistor |
Software-wise, you need a library that supports the ST7789V. The Adafruit ST7789 library works, but it’s designed for breakout boards with a 4-wire SPI interface. Without a breakout, you’ll need to modify the library to use your specific pins. The library expects a hardware SPI object, but you can also use bit-banged SPI by defining custom pins. For the ESP32, I use the TFT_eSPI library, which is faster and supports DMA. The initialisation sequence in TFT_eSPI is already optimised for the ST7789V, but you need to set the display size to 240x240. The library’s default is 240x320, so you’ll get a black screen if you don’t change the dimensions. In the User_Setup.h file, set TFT_WIDTH 240 and TFT_HEIGHT 240. Also, set TFT_MISO -1 because the display doesn’t have a MISO pin. The SPI mode is 0 (CPOL=0, CPHA=0), which is the default for most libraries.
One common mistake is assuming the display works at 5V logic levels. The ST7789V is a 3.3V device, and its input pins are not 5V tolerant. If you connect a 5V microcontroller directly, you’ll damage the driver. Use a level shifter like a 74LVC245 or a voltage divider. For the SPI lines, a 10kΩ resistor in series with the MCU pin limits current, but the voltage will still be 5V. A better approach is to use a 1kΩ resistor from the MCU pin to the display pin, then a 2kΩ resistor from the display pin to GND. This creates a voltage divider that drops 5V to 3.3V. I’ve used this method with an Arduino Uno and it works reliably. The CS, RESET, DC, MOSI, and SCK lines all need level shifting. The backlight pin can handle 5V if you use a 220-ohm resistor, but the LED will be brighter and hotter. I measured the backlight current at 5V with a 220-ohm resistor: 9mA, which is safe. But the LED’s lifespan at 5V is unknown, so stick to 3.3V.
Another detail is the display’s refresh rate. The ST7789V supports a frame rate of 60Hz to 80Hz, but with SPI, you’re limited by the bus speed. At 40MHz SPI, you can send a full frame in 28.8ms, which gives 34.7 fps. That’s below the 60Hz refresh, so you’ll see tearing if you update the display mid-frame. To avoid tearing, use double-buffering: write to a buffer in RAM, then send the entire buffer to the display in one SPI transaction. The ESP32 has 520KB of SRAM, so a 115KB frame buffer is fine. The Arduino Uno only has 2KB, so you can’t double-buffer. Instead, update only parts of the screen using the ST7789V’s windowed update feature. Set the column and row address range, then send only the pixels that changed. This reduces SPI traffic and improves frame rate. For a 100x100 pixel area, you send 20,000 bytes, which takes 5ms at 40MHz, giving 200 fps for that region.
Power consumption is another angle. The display’s data sheet specifies 20mA typical, but that’s for the driver IC only. The backlight adds 15mA at 3.3V, so total is 35mA. If you’re running on a battery, you can disable the backlight by setting BL low. The display still draws 20mA even when the backlight is off, because the driver is active. To save power, send the display into sleep mode (command 0x10). This reduces current to 5µA. I tested this with a multimeter: sleep mode draws 4.8µA, and waking up takes 120ms. For a battery-powered project, sleep the display between updates. The ST7789V also supports partial display mode, where you can update a small region and keep the rest unchanged. This doesn’t save power, but it reduces SPI traffic.
Mechanical mounting without a breakout is tricky. The flex cable is 12mm long and 8mm wide, with the display itself being 30mm x 30mm x 3mm. You can glue the display to a perfboard using double-sided tape, then solder wires to the flex cable. The flex cable is stiff, so don’t bend it more than 90 degrees. I’ve seen people use a 0.5mm pitch FPC connector, but that’s essentially a breakout. Without a connector, you’re stuck with direct soldering. If you need to remove the display, use a solder wick and desolder all wires at once. The flex cable can withstand about 5 rework cycles before the pads lift. I’ve had one display where the pad