To connect a 1602 (HD44780) LCD with an I²C backpack (usually [PCF8574](https://www.onzuu.com/search/PCF8574)/[PCF8574A](https://www.onzuu.com/search/PCF8574A)) to [Arduino](https://www.ampheo.com/c/development-board-arduino), you only need 4 wires and a small library. ![hq720 (49)](https://hackmd.io/_uploads/SJ1cNoM7be.jpg) **1) Hardware you need** * LCD1602 + I²C backpack (PCF8574) attached on the back (or a ready-made I²C 1602) * 4 [jumper wires](https://www.onzuu.com/category/jumper-wires-pre-crimped-leads) **2) Wiring (Arduino ↔ I²C backpack)** Backpack pins are usually: VCC, GND, SDA, SCL **[Arduino Uno](https://www.ampheo.com/product/a000046-25542493) / Nano / Pro Mini** * VCC → 5V * GND → GND * SDA → A4 * SCL → A5 **[Arduino Mega 2560](https://www.ampheo.com/product/a000067-25542697)** * SDA → 20 * SCL → 21 **[Arduino Leonardo](https://www.ampheo.com/product/a000057-25542716) / Micro** * SDA → 2 * SCL → 3 (or use the board’s dedicated SDA/SCL pins) Most 1602 I²C backpacks are made for 5V. If you use a 3.3V board (ESP32, some ARM [Arduinos](https://www.ampheoelec.de/c/development-board-arduino)), you may need level shifting or a 3.3V-friendly module. **3) Find the I²C address (important)** Common addresses are 0x27 or 0x3F, but don’t guess—scan. Upload this I²C scanner: ``` #include <Wire.h> void setup() { Wire.begin(); Serial.begin(9600); while (!Serial) {} Serial.println("I2C scan..."); } void loop() { byte error, address; int nDevices = 0; for (address = 1; address < 127; address++) { Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { Serial.print("Found: 0x"); if (address < 16) Serial.print("0"); Serial.println(address, HEX); nDevices++; } } if (nDevices == 0) Serial.println("No I2C devices found"); else Serial.println("Done"); delay(3000); } ``` Open Serial Monitor → note the address (e.g., 0x27). **4) Install an LCD I²C library** Two good options: * LiquidCrystal_I2C (simple and common) * hd44780 (more robust; auto-detects many backpack mappings) I’ll show the common LiquidCrystal_I2C approach. **5) Test code (LiquidCrystal_I2C)** ``` #include <Wire.h> #include <LiquidCrystal_I2C.h> // Change 0x27 to whatever your scanner found LiquidCrystal_I2C lcd(0x27, 16, 2); void setup() { lcd.init(); // initialize LCD lcd.backlight(); // turn on backlight lcd.setCursor(0, 0); lcd.print("Hello, I2C!"); lcd.setCursor(0, 1); lcd.print("LCD1602 + UNO"); } void loop() { } ``` **6) Troubleshooting (90% of issues)** * Backlight on but no text → turn the contrast [potentiometer](https://www.onzuu.com/category/potentiometers) on the backpack (small blue/green screw) until characters appear. * Nothing found in I²C scan → SDA/SCL swapped, missing GND, wrong pins for your board, bad solder joints on backpack header. * Gibberish / blocks / weird chars → wrong I²C address or backpack pin mapping doesn’t match your library. Try the hd44780 library if this happens. * Works sometimes → too-long wires, weak power, missing pull-ups (most backpacks already have pull-ups).