Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

I2C LCD Not Working? How to Fix Address, Contrast and Wiring Problems

I2C LCD Not Working? How to Fix Address, Contrast and Wiring Problems
-
Written By - Robocraze -
📅 Updated on 22 Oct 2026
✨ Summarize with AI
✅ Prompt copied

Summary

Troubleshoot an I2C LCD that shows black boxes, stays blank or is not detected. Learn to scan the I2C address, adjust contrast, check SDA/SCL wiring, fix backlight issues and verify Arduino or ESP32 code.

If your I2C LCD shows only black boxes, displays no text, or is not detected by an Arduino or ESP32, start by checking the I2C address, contrast potentiometer and SDA/SCL wiring. Then verify the LCD’s backpack connections, voltage compatibility and backlight jumper. These checks solve many common problems with 16×2 and 20×4 I2C LCD displays without replacing the screen.

If your display uses a PCF8574 I2C adapter, the 16×2 LCD I2C Interface Adapter (PCF8574) can help reduce wiring by allowing the microcontroller to communicate with the display over the I2C bus.

Quick Fix Checklist

Before changing code or buying another display, work through these checks:

  • Black boxes but no text: Adjust the contrast potentiometer slowly.

  • Backlight on, but no characters: Check the I2C address and initialise the LCD with the correct dimensions.

  • LCD not detected by the I2C scanner: Check power, ground, SDA/SCL wiring and voltage compatibility.

  • Arduino works, but ESP32 does not: Confirm the ESP32's actual SDA and SCL pins and the logic-voltage requirements of the adapter.

  • Backlight is off: Check the backlight jumper, supply and module connections.

  • Text appears garbled: Verify the library, display dimensions, wiring and power stability.

Disconnect power before moving wires or changing connections. Once the wiring is checked, reconnect the display and troubleshoot one issue at a time.

Step 1: Find the Correct I2C Address

An incorrect I2C address is one of the most common reasons an LCD fails to display text. The address identifies the adapter on the I2C bus. If your code uses an address that does not match the actual adapter, the LCD library may be unable to communicate with it.

Common addresses for PCF8574-based LCD adapters include:

I2C address

What it means

0x27

Common address on some PCF8574-based adapters

0x3F

Common address on other adapters, including the listed Robocraze adapter's default

Other addresses

Possible when the chip variant or address jumpers differ

Do not assume that every LCD adapter uses 0x27. The 16×2 LCD I2C Interface Adapter (PCF8574) lists 0x3F as its default address. Other boards may use different addresses depending on the chip and solder-jumper configuration.

 

Run an I2C scanner

An I2C scanner checks which device addresses respond on the bus. Upload this sketch to your Arduino, open the Serial Monitor at 9600 baud, and check the results.

#include <Wire.h>

void setup() {
  Wire.begin();
  Serial.begin(9600);

  while (!Serial) {
    ; // Wait for Serial on boards that require it
  }

  Serial.println("I2C scanner ready");
}

void loop() {
  byte address;
  int devicesFound = 0;

  for (address = 1; address < 127; address++) {
    Wire.beginTransmission(address);
    byte error = Wire.endTransmission();

    if (error == 0) {
      Serial.print("I2C device found at 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.println(address, HEX);
      devicesFound++;
    }
  }

  if (devicesFound == 0) {
    Serial.println("No I2C devices found");
  }

  delay(3000);
}

If the scanner finds your LCD adapter at 0x3F, use that address in the LCD initialisation code. If it finds 0x27, use 0x27 instead.

If the scanner finds no device, proceed to the wiring and power checks below. A scanner cannot detect an adapter that is not receiving power, has incorrect connections or is otherwise unable to respond.

Step 2: Adjust the LCD Contrast

If the backlight turns on but the screen displays black boxes, blank characters or barely visible text, check the contrast potentiometer on the I2C adapter.

The small adjustable potentiometer changes the LCD's contrast. If the contrast is too high or too low, the display may appear blank even when the microcontroller is communicating correctly.

To adjust it:

  1. Power the LCD using the correct supply.

  2. Locate the small screw-adjustable potentiometer on the I2C adapter.

  3. Turn it slowly in small increments using an appropriate screwdriver.

  4. Pause after each adjustment and observe the display.

  5. Continue until the characters become clearly visible.

Avoid turning the potentiometer rapidly through its full range. The useful contrast setting is usually within a relatively small portion of its adjustment range.

How to interpret the result:

  • Black boxes on the first row: Contrast may be too high, or the LCD may be powered without being initialised correctly.

  • Backlight on, but no visible characters: Contrast is one of the first things to check; also verify the address and code.

  • Completely blank screen: Check the backlight, power, wiring and contrast together.

  • Visible characters that are garbled: Check the library, display dimensions, connections and power stability.

Black boxes do not automatically mean the display is defective. Adjust contrast first, then verify that the controller is sending valid initialisation commands.

Step 3: Check SDA and SCL Pins by Board

The I2C bus uses two signal lines:

  • SDA (Serial Data): Carries data between devices.

  • SCL (Serial Clock): Provides the clock signal for communication.

Connect SDA to SDA and SCL to SCL. Reversing these lines prevents normal communication.

The correct microcontroller pins depend on the board you are using.

Board

Typical SDA pin

Typical SCL pin

Arduino Uno

A4

A5

Arduino Nano (classic)

A4

A5

ESP32 DevKit (common configuration)

GPIO 21

GPIO 22

These are common defaults, not universal pin assignments. Some ESP32 boards use different pins, and ESP32 firmware can configure I2C on other supported GPIOs. Check your board's pinout and code.

Example wiring for Arduino Uno

I2C adapter pin

Arduino Uno

VCC

5V, if specified for the adapter

GND

GND

SDA

A4

SCL

A5

Example wiring for ESP32

I2C adapter pin

ESP32

VCC

A supply compatible with the adapter and display

GND

GND

SDA

GPIO 21, if configured for SDA

SCL

GPIO 22, if configured for SCL

Important voltage warning for ESP32

Many PCF8574 LCD adapters are designed for 5V operation. When a 5V-powered adapter uses pull-up resistors connected to 5V on its SDA and SCL lines, those lines may expose a 3.3V ESP32 to 5V signals.

Before connecting the adapter directly to an ESP32, verify its pull-up arrangement and the voltage tolerance of the ESP32 GPIO pins. Use suitable bidirectional I2C level shifting or a compatible interface when needed. Do not assume that an adapter is ESP32-safe simply because its I2C protocol is supported.

If you use the Wire library on an ESP32, explicitly set the pins when your board does not use the defaults:

#include <Wire.h>

void setup() {
  Wire.begin(21, 22); // SDA, SCL
}

Replace the GPIO numbers with the actual pins used by your setup. For an Arduino Uno, the normal Wire.begin() call uses the board's standard I2C pins.

Step 4: Check the LCD Library and Display Size

A correct I2C address and working wiring are not enough if the code uses the wrong LCD library or initialises the display with the wrong dimensions.

Many PCF8574 adapters are designed for character LCDs compatible with the HD44780 interface. They translate I2C communication into the parallel signals required by the display. The library must support the adapter's pin mapping and the LCD controller.

For a typical 16×2 display, your code must initialise 16 columns and 2 rows. For a 20×4 display, use 20 columns and 4 rows.

The exact constructor and initialisation methods vary by library. The following example uses a common LiquidCrystal_I2C library API. Install a compatible library through the Arduino IDE Library Manager and check its examples if the method names differ.

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Change 0x3F to the address found by your I2C scanner.
LiquidCrystal_I2C lcd(0x3F, 16, 2);

void setup() {
  Wire.begin();

  lcd.init();
  lcd.backlight();

  lcd.setCursor(0, 0);
  lcd.print("Hello, world!");

  lcd.setCursor(0, 1);
  lcd.print("I2C LCD working");
}

void loop() {
}

If your scanner finds 0x27, change the address in the constructor. If your library uses begin() rather than init(), follow that library's documented API instead of mixing examples from different libraries.

What if the code compiles but the LCD stays blank?

Check the following in order:

  1. Confirm the I2C address using the scanner.

  2. Adjust the contrast potentiometer.

  3. Verify the SDA/SCL pins and common ground.

  4. Confirm the display dimensions.

  5. Check the installed library's compatibility with your adapter.

  6. Make sure the LCD is connected to the adapter correctly and its solder joints are sound.

Do not install multiple unrelated LCD libraries and change everything at once. Test one change at a time so you can identify the cause.

Step 5: Check the Backlight and Jumper

The backlight illuminates the display so its characters can be seen. Many I2C adapters include a jumper that enables or disables the backlight.

If the LCD is working but difficult to see, inspect the backlight jumper and its connection. Make sure the jumper is fitted in the position specified by the board design.

Symptom

What to check

Backlight on, no text

Contrast, I2C address, initialisation and code

Text visible, no backlight

Backlight jumper, supply and backlight circuit

Neither text nor backlight

Power, ground, connections and adapter orientation

Backlight flickers or resets

Supply stability and wiring

The backlight and character display are separate functions. A glowing screen does not prove that I2C communication is working, and a dark backlight does not always mean the LCD controller has failed.

Before moving the jumper or changing connections, switch off the supply. Then restore power and test the display again.

Common I2C LCD Troubleshooting Mistakes

Avoid these common errors when troubleshooting an LCD:

  • Assuming every adapter uses 0x27: Some adapters use 0x3F or another address.

  • Swapping SDA and SCL: The data and clock lines must connect to the correct pins.

  • Ignoring contrast: A display may be initialised but still appear blank because contrast is incorrectly adjusted.

  • Using the wrong dimensions: A 20×4 display and a 16×2 display need different initialisation settings.

  • Mixing incompatible library examples: Different LiquidCrystal_I2C libraries may use different APIs or constructor formats.

  • Ignoring ESP32 voltage compatibility: Check whether the adapter's I2C pull-ups are safe for 3.3V GPIO.

  • Assuming the backlight proves communication: The backlight may work even when the I2C connection does not.

  • Changing several things at once: Make one change, retest, and record the result.

If the display still fails, test the adapter and LCD with a known-compatible microcontroller and a short example sketch. If possible, check the I2C bus with a multimeter or logic analyser and inspect the adapter's solder joints.

When Should You Replace the I2C Adapter?

Consider replacing the adapter only after checking the address, contrast, wiring, power supply, library and display connections.

An adapter may be faulty if it consistently fails to respond to an I2C scanner despite having the correct supply, ground and signal connections. Physical damage, broken solder joints or a damaged PCF8574 chip can also cause failures.

If you need to replace it, the 16×2 LCD I2C Interface Adapter (PCF8574) is a replacement option for compatible character LCDs. The listed adapter supports 16×2 and 20×4 character displays, operates at 5V and has an adjustable contrast control. Confirm the pin layout and compatibility with your LCD before installation.

For a complete display rather than a separate adapter, consider the 16×2 LCD (Blue) with I2C Interface, checking its current availability before ordering.

Conclusion

When an I2C LCD is not working, start with the simplest checks: find the actual I2C address, adjust the contrast, verify SDA and SCL wiring, and confirm the library and display dimensions. If the backlight is off, check the jumper and supply. If you are using an ESP32, verify the I2C voltage levels before connecting a 5V adapter directly.

A methodical troubleshooting process can often fix black boxes, blank screens and undetected displays without replacing the hardware. For a compatible character LCD, the 16×2 LCD I2C Interface Adapter (PCF8574) simplifies wiring by allowing the display to communicate over the I2C bus using SDA and SCL.

Excerpt

I2C LCD showing nothing or only black boxes? Find the address with an I2C scanner, fix contrast and wiring, and troubleshoot Arduino and ESP32 displays.

Frequently Asked Questions

1. How do I find my I2C LCD address?

Upload an I2C scanner sketch to your Arduino or ESP32 and check the Serial Monitor output. The scanner lists responding I2C addresses, commonly 0x27 or 0x3F for PCF8574-based LCD adapters. Use the address detected by your board in the LCD library constructor. If no address appears, check power, ground, SDA/SCL wiring and voltage compatibility.

2. Why does my LCD show only black boxes?

Black boxes often indicate that the LCD is powered but its contrast or initialisation is incorrect. Slowly adjust the contrast potentiometer first. Then check the I2C address, wiring, display dimensions and library initialisation. If the screen remains unchanged, run an I2C scanner to confirm that the adapter responds.

3. Which pins are SDA and SCL on an ESP32?

GPIO 21 is commonly used for SDA and GPIO 22 for SCL on many ESP32 DevKit boards. However, pin assignments can vary and are configurable in many ESP32 projects. Check your board pinout and the pins specified in Wire.begin(SDA, SCL). Also verify that the LCD adapter's I2C signal voltage is compatible with the ESP32's 3.3V GPIO.

4. Can I change the address of a PCF8574 adapter?

Often, yes. Many adapters provide solder jumpers that alter the address pins. The available addresses depend on the specific PCF8574 or PCF8574A chip and the board's jumper layout. Check the adapter's documentation before changing solder bridges, then run the I2C scanner again to verify the new address.

5. The LCD backlight is on, but there is no text. What should I do?

Adjust the contrast potentiometer, confirm the address with an I2C scanner, verify the SDA/SCL connections and check that the code uses the correct LCD dimensions. Make sure the installed library supports your adapter and that the LCD is securely connected to it. The backlight can work even when the controller is not receiving valid I2C commands.

Prev Post
Next Post

Leave a comment

Please note, comments need to be approved before they are published.

Thanks for subscribing!

This email has been registered!

Shop the look

Choose Options

Edit Option
Back In Stock Notification
Compare
Product SKU Description Collection Availability Product Type Other Details

Choose Options

this is just a warning
Login
Shopping Cart
0 items
FREE SHIPPING!
₹100 OFF
₹200 OFF
₹999
₹2500
₹4900
WhatsApp Chat Chat