Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

I2C vs SPI displays — wiring, speed and which to choose

I2C and SPI displays compared on wires, refresh speed, sharing pins and common modules (SSD1306, 16×2 LCD, ST7735, ILI9341), with a pick for each kind of project.

Community draft — report a mistake

I2C displaysSPI displays
Signal wires2: SDA, SCL4–5: SCK, MOSI (SDA/DIN), CS, DC, often RST
Typical clock100–400 kHz (some support 1 MHz)Several MHz up to 40 MHz or more on an ESP32
Full refresh, 128×64 monoAbout 25–30 ms at 400 kHzWell under 5 ms
Full refresh, 320×240 colourNot practicalAbout 30 ms at 40 MHz
Sharing with other partsMany devices on 2 wires, by addressShared SCK/MOSI, but one CS pin per device
Common modulesSSD1306/SH1106 OLED, 16×2 and 20×4 LCD with PCF8574 backpackST7735, ILI9341, ST7789 TFT, e-paper, SPI OLEDs
Best forText, numbers, small status screensColour, graphics, fast animation

The bus a display uses decides how many pins it eats and how fast it can redraw. Refresh times above are arithmetic from the frame size and bus speed (128×64 mono = 1 KB; 320×240 at 16-bit colour = 150 KB), before any library overhead.

I2C: fewest wires

  • Two signal wires shared with everything else on the bus — an RTC, a BME280 and an OLED can all sit on the same SDA/SCL.
  • Each device needs a different address. Two identical displays need one with a changed address jumper (or a second I2C bus).
  • Speed is fine for text and simple graphics on a 128×64 OLED. A 20×4 character LCD barely uses the bus.
  • On 3.3 V boards, watch modules that pull SDA/SCL up to 5 V — the 16×2 LCD backpack is the usual culprit. A level shifter fixes it (day 11).

Guides: SSD1306 with ESP32, 16×2 LCD with Uno. Not found? I2C device not found.

SPI: speed and colour

  • A colour TFT needs about 150 KB per full frame. Only SPI (or parallel) moves that fast enough to look smooth.
  • More wires: CS selects the chip, DC says “command or data”, RST resets it. Several SPI devices share SCK and MOSI but each needs its own CS.
  • On the ESP32, use the hardware SPI pins (VSPI: GPIO 18 SCK, 23 MOSI) for full speed.
  • Many TFT modules label SPI pins “SCL/SDA” even though they’re SPI — don’t connect them to the I2C pins.

Component: ST7735 TFT.

What about RAM?

The display bus isn’t the only limit. A full colour frame buffer for 320×240 needs 150 KB — impossible on an Uno (2 KB), easy on an ESP32-S3 with PSRAM. Libraries like TFT_eSPI and LVGL draw in pieces to work around this; the Uno is best kept to character LCDs and small OLEDs.

Verdict

Project Pick
Temperature, time, status text I2C OLED or LCD
Many sensors and a display on few pins I2C
Colour charts, icons, menus, games SPI TFT
Anything animated or full-screen SPI

Budget-specific advice: best displays under ₹300. Two common I2C OLED controllers: SSD1306 vs SH1106.

↑↓ to move · Enter to open