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

16x2 LCD Pin Diagram, Working, Commands & I2C Wiring

16x2 LCD Pin Diagram, Working, Commands & I2C Wiring
D
Written By Daniel D'Souza
📅 Updated on 21 Oct 2026
✨ Summarize with AI
✅ Prompt copied

Summary

Discover the world of LCD 16x2 displays and unleash their potential with Arduino! In this captivating blog, we delve into the fundamentals of LCD 16x2 technology, starting with its pin diagram and key features. Gain a deeper understanding of the essential registers that control its functions and explore a range of powerful commands to manipulate the display. Whether you're a seasoned Arduino enthusiast or a curious beginner, this blog will empower you to harness the capabilities of the LCD 16x2 and bring your projects to life

16x2 LCD Pin Diagram, Working, Commands and I2C Connection

A standard 16x2 LCD has 16 pins and can display 16 characters on each of its two lines. It typically uses parallel connections to send commands and display data. Adding a PCF8574 I2C adapter reduces the connection to four wires—VCC, GND, SDA and SCL—making it easier to connect the display to an Arduino or another compatible microcontroller.

This guide covers the 16x2 LCD pin diagram, how the HD44780-compatible controller works, common LCD commands, the PCF8574 I2C adapter, and wiring examples for Arduino.

What Is a 16x2 LCD?

A 16x2 LCD is a character-based liquid crystal display that shows up to 16 characters per row across two rows. It is commonly used with Arduino boards and other microcontrollers to display sensor readings, system status, counters, menu options and short messages.

Most standard 16x2 character LCDs use an HD44780-compatible controller or a compatible alternative. The controller receives instructions and character data from the microcontroller, then updates the display.

A typical 16x2 LCD offers:

  • Display capacity: 16 characters × 2 rows.

  • Character format: commonly 5 × 8 dots per character.

  • Parallel interface: supports 4-bit or 8-bit data communication.

  • Contrast control: adjusts how clearly characters appear.

  • Backlight: improves visibility in low-light conditions.

A standard LCD uses multiple signal wires. An I2C adapter based on the PCF8574 expands its output pins to control the LCD through a serial connection, reducing the microcontroller connections to four.

Components and Supplies

Original JHD 16x2 LCD - Green – JHD 16x2 green LCD for Arduino, Raspberry Pi & IoT - LCD Display - RobocrazeOriginal JHD 16x2 LCD - Green – JHD 16x2 green LCD for Arduino, Raspberry Pi & IoT - LCD Display - Robocraze

    Original JHD 16x2 LCD Display- Green

    Original JHD 16x2 LCD Display- Green This is a popular and original JHD 16×2 LCD Display with Green backlight . It is based on the SPLC780D display controller which makes it is easy to interface with this 16×2 LCD with most micro-controllers. Its extreme popularity...
    Rs 242/-
    Rs 242/-
    Rs 349/-
    Save Rs 107/-
    16x2 LCD (Blue) with I2C Interface - 16x2 blue LCD with I2C for Arduino, Raspberry Pi & IoT. -LCD Display -Robocraze16x2 LCD (Blue) with I2C Interface - 16x2 blue LCD with I2C for Arduino, Raspberry Pi & IoT. -LCD Display -Robocraze

      16x2 LCD (Blue) with I2C Interface

      16x2 LCD (Blue) with I2C Interface This is a great LCD module for different types of Arduino projects. If you want to display your results and see the output, the 16x2 LCD Display is the perfect component for DIY Arduino projects. The values shown on the 16x2...
      Rs 185/-
      Rs 185/-
      Rs 345/-
      Save Rs 160/-
      Original JHD 16x2 Character LCD - Blue – 16x2 JHD blue LCD for microcontroller projects - LCD Display - RobocrazeOriginal JHD 16x2 Character LCD - Blue – 16x2 JHD blue LCD for microcontroller projects - LCD Display - Robocraze

        Original JHD 16x2 Character LCD Display- Blue

        Original JHD 16×2 Character LCD Display- Blue This is a popular 16×2 LCD Display Blue Backlight . It is based on the SPLC780D display controller which makes it is easy to interface this LCD most micro-controllers. Its extreme popularity ensures that no matter which...
        Rs 114/-
        Rs 114/-
        Rs 239/-
        Save Rs 125/-
        16x2 LCD (Blue) - 16x2 blue LCD display for microcontroller & DIY projects. -Arduino LCD Display -Robocraze16x2 LCD (Blue) - 16x2 blue LCD display for microcontroller & DIY projects. -Arduino LCD Display -Robocraze

          16x2 LCD Display (Blue)

          16x2 LCD Display (Blue) This is the 16x2 LCD (Blue), A display is required if you want to add visual output to your Arduino projects.  If you only need a small amount of information displayed, this 16x2 LCD is a good choice. The 16x2 LCD Display is a simple...
          Rs 175/-
          Rs 175/-
          Rs 189/-
          Save Rs 14/-
          16x2 LCD Module (Green) - 16x2 green LCD for Arduino, Raspberry Pi & microcontrollers. -LCD Display -Robocraze16x2 LCD Module (Green) - 16x2 green LCD for Arduino, Raspberry Pi & microcontrollers. -LCD Display -Robocraze

            16x2 LCD Module (Green)

            16x2 LCD Module (Green) This is the brand new high-quality 16x2 LCD display with a Green Backlight. It is a simple and cost-effective way to incorporate an LCD display 16x2 module into your project. The LCD display module is 16 characters by 2 lines...
            Rs 174/-
            Rs 174/-
            Rs 244/-
            Save Rs 70/-

            16x2 LCD Pin Diagram and Pin Configuration

            A standard 16x2 LCD has 16 pins. These provide power, contrast adjustment, control signals, data and backlight connections.

            Pin

            Name

            Function

            1

            VSS

            Ground (GND)

            2

            VDD / VCC

            Supply voltage, commonly 5V

            3

            VO / V0

            Contrast adjustment input

            4

            RS

            Selects command register or character data

            5

            R/W

            Selects read or write operation

            6

            E

            Enable signal for transferring data

            7

            D0

            Data bit 0

            8

            D1

            Data bit 1

            9

            D2

            Data bit 2

            10

            D3

            Data bit 3

            11

            D4

            Data bit 4

            12

            D5

            Data bit 5

            13

            D6

            Data bit 6

            14

            D7

            Data bit 7

            15

            LED+ / A

            Backlight anode

            16

            LED− / K

            Backlight cathode

            Note: Check your particular LCD module's datasheet or markings before wiring it. Pin labels and backlight circuitry can vary between modules.

            What Do the Main LCD Pins Do?

            VSS and VDD: These pins provide the ground and supply voltage. Many common character LCD modules operate at 5V, but confirm the specifications of your module.

            VO or V0: This is the contrast input. It controls the difference between the characters and the background. Incorrect contrast can make the display appear blank or show dark blocks.

            RS (Register Select): RS determines whether the LCD receives a command or character data. RS LOW selects instructions; RS HIGH selects character data.

            R/W (Read/Write): R/W selects a read or write operation. For common Arduino projects that only write to the display, R/W is often connected to GND.

            E (Enable): The enable signal coordinates data transfer. The LCD reads the relevant signals during the enable pulse.

            D0–D7: These are the eight parallel data lines. In 8-bit mode, all eight can be used. In 4-bit mode, only D4–D7 are required, which saves microcontroller pins.

            LED+ and LED−: These pins power the backlight. Some modules include current-limiting components, while others may require additional consideration. Follow the module's specifications.

            How Does a 16x2 LCD Work?

            A 16x2 LCD works by receiving commands and character data from a microcontroller. Its controller interprets those signals and updates the appropriate character positions on the display.

            The basic process is:

            1. Power the display: Supply the correct voltage and connect ground.

            2. Initialize the controller: Configure the display mode, number of lines and cursor behaviour.

            3. Send a command: The microcontroller selects an operation, such as clearing the display or setting the cursor position.

            4. Send character data: The controller receives the characters to display.

            5. Update the screen: The LCD renders the characters at the selected positions.

            Instruction Register and Data Register

            The LCD controller has two important registers:

            • Instruction Register (IR): Receives commands such as clear display, set cursor position and configure display mode.

            • Data Register (DR): Receives character data that the LCD should display.

            The RS pin selects between these two functions. When RS is LOW, the controller receives an instruction. When RS is HIGH, it receives character data.

            4-Bit Mode vs 8-Bit Mode

            Feature

            4-bit mode

            8-bit mode

            Data pins used

            D4–D7

            D0–D7

            Data transfer

            Each byte is sent in two portions

            Each byte is sent in one data transfer

            Microcontroller pins

            Fewer

            More

            Typical use

            Arduino and pin-limited projects

            Projects with more available GPIO pins

            For most basic Arduino projects, 4-bit mode is a practical choice because it reduces the number of pins required without making text display significantly more complicated.

            16x2 LCD Commands and Their Functions

            The LCD controller supports commands for clearing the screen, moving the cursor, changing display settings and selecting the operating mode.

            The following are common HD44780-compatible command values:

            Hex code

            Command

            Function

            0x01

            Clear display

            Clears characters and returns the cursor home

            0x02

            Return home

            Returns the cursor to the home position

            0x04

            Entry mode, decrement

            Moves the cursor position to the left after writing

            0x06

            Entry mode, increment

            Moves the cursor position to the right after writing

            0x08

            Display off

            Turns off the display output

            0x0C

            Display on, cursor off

            Displays characters without showing the cursor

            0x0E

            Display on, cursor on

            Displays characters and shows the cursor

            0x0F

            Display on, blinking cursor

            Displays characters and enables cursor blinking

            0x28

            4-bit, two-line mode

            Configures a common two-line, 4-bit operating mode

            0x38

            8-bit, two-line mode

            Configures a common two-line, 8-bit operating mode

            0x80

            Set DDRAM address

            Sets the cursor to the first character position of line 1

            0xC0

            Set DDRAM address

            Sets the cursor to the first character position of line 2

            The command values assume a common HD44780-compatible controller. Some older command lists use ambiguous labels for cursor movement and display shifting, so check the controller documentation if you are writing low-level code.

            How to Set the Cursor Position

            For a typical 16x2 LCD, the first row begins at DDRAM address 0x00, while the second row begins at 0x40. To position the cursor, the controller receives a “set DDRAM address” command.

            Examples:

            • 0x80: first character position on row 1.

            • 0x85: sixth character position on row 1.

            • 0xC0: first character position on row 2.

            • 0xC5: sixth character position on row 2.

            When using Arduino's LiquidCrystal library, you normally do not need to calculate these addresses yourself. The setCursor(column, row) function handles cursor positioning.

            What Is a PCF8574 I2C Adapter for a 16x2 LCD?

            A PCF8574 I2C adapter is a small interface board that lets a microcontroller control a parallel character LCD using the I2C communication protocol. Instead of wiring multiple LCD control and data pins directly to an Arduino, you connect the adapter through four connections: VCC, GND, SDA and SCL.

            The 16x2 LCD I2C Interface Adapter (PCF8574) is designed to simplify LCD wiring. The product listing specifies 5V operation, an onboard contrast adjustment potentiometer and a PCF8574 interface. Its listed default I2C address is 0x3F, although you should verify the address of the actual module you use.

            Robocraze

             

            How the PCF8574 Adapter Works

            The PCF8574 acts as an I/O expander. The microcontroller sends serial data over I2C, and the adapter changes its output pins to operate the LCD's control and data lines. Many LCD backpacks use those outputs to communicate with the LCD in 4-bit mode.

            The adapter usually includes:

            • A PCF8574 I/O expander IC.

            • A contrast-adjustment trimmer potentiometer.

            • A backlight jumper or control connection, depending on the board.

            • An I2C address configuration, which may use solder pads or jumpers.

            The result is simpler wiring and fewer occupied GPIO pins. The adapter does not change the display's 16-character-by-two-line capacity; it changes how the LCD is connected to the controller.

            Standard LCD vs I2C LCD

            Feature

            Standard 16x2 LCD

            16x2 LCD with I2C adapter

            Microcontroller connections

            Several signal wires plus power

            Four wires: VCC, GND, SDA, SCL

            GPIO usage

            Higher

            Lower

            Wiring complexity

            More connections to manage

            Simpler

            Contrast adjustment

            Often through VO pin

            Usually via adapter trimmer

            Software

            Parallel LCD library configuration

            I2C-compatible LCD library

            Best suited for

            Learning low-level LCD interfacing

            Compact projects and faster setup

            If your project already has several sensors or modules connected to an Arduino, the I2C adapter can free up valuable digital pins.

            How to Connect a 16x2 LCD to Arduino Using I2C

            An I2C adapter makes the physical connection straightforward. First, attach the adapter to the LCD's 16-pin header, following the adapter's pin alignment. Then connect the four adapter pins to the Arduino.

            Wiring Table: I2C LCD to Arduino Uno

            I2C adapter pin

            Arduino Uno connection

            VCC

            5V, if supported by the module

            GND

            GND

            SDA

            A4

            SCL

            A5

            On an Arduino Uno R3, SDA and SCL are also available on the dedicated SDA/SCL header pins. Other boards, including the Mega and ESP32, use different I2C pin assignments or configurable pins, so check the board documentation.

            Arduino Code Example

            Install a compatible I2C LCD library through the Arduino IDE Library Manager. The example below uses the common LiquidCrystal_I2C library API.

            #include <Wire.h>
            #include <LiquidCrystal_I2C.h>
            
            // Common addresses include 0x27 and 0x3F.
            // Replace this with your module's actual I2C address.
            LiquidCrystal_I2C lcd(0x3F, 16, 2);
            
            void setup() {
              lcd.init();
              lcd.backlight();
            
              lcd.setCursor(0, 0);
              lcd.print("Hello, Arduino!");
            
              lcd.setCursor(0, 1);
              lcd.print("16x2 LCD Ready");
            }
            
            void loop() {
              // Add your project logic here.
            }

            Important: LCD libraries differ. If your installed library does not support lcd.init(), check its documentation; some versions use a different initialization method. If the display remains blank, verify the I2C address and wiring before changing the code.

            How to Find the LCD's I2C Address

            Common addresses for PCF8574-based LCD adapters include 0x27 and 0x3F. The address depends on the adapter's chip variant and the state of its address pins or solder jumpers.

            If you do not know the address:

            1. Check the product documentation or adapter markings.

            2. Run an I2C scanner sketch on your microcontroller.

            3. Note the address reported by the scanner.

            4. Update the address in the LCD library constructor.

            Do not assume every PCF8574 adapter uses 0x3F; the address may differ even when the boards look similar.

            How to Connect a Standard 16x2 LCD Without I2C

            You can also connect a standard 16x2 LCD directly to an Arduino using 4-bit mode. This method uses more wires than I2C, but it helps you understand the LCD's control signals.

            A common 4-bit connection uses RS, E and D4–D7, along with power, ground and contrast. R/W is connected to GND when the project only writes to the LCD.

            LCD pin

            Arduino Uno example connection

            VSS

            GND

            VDD

            5V

            VO

            Middle pin of a 10kΩ contrast potentiometer

            RS

            Digital pin 12

            R/W

            GND

            E

            Digital pin 11

            D4

            Digital pin 5

            D5

            Digital pin 4

            D6

            Digital pin 3

            D7

            Digital pin 2

            LED+ / A

            Backlight supply, according to module specifications

            LED− / K

            GND, according to module specifications

            This wiring is an example, not a universal pin assignment. You can use different Arduino pins if the code matches the wiring.

            Example using Arduino's built-in LiquidCrystal library:

            #include <LiquidCrystal.h>
            
            // RS, E, D4, D5, D6, D7
            LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
            
            void setup() {
              lcd.begin(16, 2);
            
              lcd.setCursor(0, 0);
              lcd.print("LCD Working");
            
              lcd.setCursor(0, 1);
              lcd.print("4-bit Interface");
            }
            
            void loop() {
            }

            For more help with wiring and setup, see the LCD 16x2 pin configuration and working guide. You can also link this article to a dedicated step-by-step 16x2 LCD and Arduino tutorial when that page is available.

            Common 16x2 LCD Problems and How to Fix Them

            A correctly wired LCD can still appear blank or display unexpected characters if the contrast, initialization, power or communication settings are incorrect.

            Problem

            Likely cause

            What to check

            Backlight is on, but no text appears

            Contrast setting or initialization issue

            Adjust the contrast trimmer, verify library setup and check wiring

            Only dark blocks appear

            LCD has power but may not be initialized correctly

            Check initialization code, signal connections and contrast

            Display stays completely blank

            Power, ground or backlight wiring issue

            Verify voltage, common ground and pin alignment

            Garbled or incorrect characters

            Incorrect data wiring or interface configuration

            Confirm the selected pins and 4-bit/8-bit mode

            I2C scanner finds no device

            Incorrect SDA/SCL wiring, power issue or faulty connection

            Check the board pinout, supply and connections

            LCD works intermittently

            Loose wiring, unstable power or poor connections

            Inspect jumper wires and power supply

            Backlight works but text is very faint

            Contrast is set incorrectly

            Adjust the contrast potentiometer slowly

            Why Does a 16x2 LCD Show Only Boxes?

            Dark blocks commonly appear when the LCD has power but has not been initialized correctly, or when the contrast is set incorrectly. Adjust the contrast potentiometer first. If the blocks remain, check the LCD's control and data wiring, the library initialization and the selected I2C address if an adapter is installed.

            What Is V0 on a 16x2 LCD?

            V0, also labelled VO, is the contrast input. On a standard parallel LCD, it is often connected to the middle pin of a potentiometer whose other terminals connect to 5V and GND. On an I2C adapter, a small onboard trimmer typically performs the same function, so an additional contrast potentiometer is usually unnecessary.

            Applications of a 16x2 LCD

            A 16x2 LCD is useful whenever a project needs a simple, low-cost text display rather than a graphical screen.

            Common applications include:

            • Sensor monitoring: displaying temperature, humidity, pressure or distance readings.

            • Robotics: showing operating modes, battery readings or sensor status.

            • Home automation: displaying relay states, room conditions and system alerts.

            • Measurement instruments: presenting voltage, current, frequency or count values.

            • Embedded systems: showing setup menus, error messages and device status.

            • DIY electronics: displaying counters, timers, menu selections and test results.

            When the microcontroller has limited GPIO pins, an I2C adapter is especially useful because it reduces the number of connections required for the LCD.

            Conclusion

            A 16x2 LCD displays 16 characters on each of two rows and uses controller commands to manage text, cursor position and display settings. Understanding its pin configuration, contrast input, control signals and 4-bit or 8-bit operation makes it easier to connect the display to an Arduino or another microcontroller.

            For simpler wiring, a PCF8574 I2C adapter lets you control the LCD using just VCC, GND, SDA and SCL. The 16x2 LCD I2C Interface Adapter is a practical option for projects where saving GPIO pins and reducing wiring complexity matter. Confirm the module's voltage requirements and I2C address before powering it up.

            If you appreciate our work don't forget to share this post and leave your opinion in the comment box.

             

            Please do check out other blog posts about Popular electronics

             

            Make sure you check out our wide range of products and collections (we offer some exciting deals!)

            Excerpt

            Learn the 16x2 LCD pin diagram, working, commands and Arduino wiring. Compare 4-bit, 8-bit and PCF8574 I2C connections with troubleshooting tips.

            Frequently Asked Questions

            1. What is V0 on a 16x2 LCD?

            V0, or VO, is the LCD's contrast adjustment pin. It controls how clearly the characters appear against the background. On a standard LCD, it is commonly connected to a potentiometer. With an I2C adapter, the contrast is usually adjusted using the onboard trimmer.

            2. Why is my LCD showing only boxes?

            Dark boxes usually indicate that the LCD has power but its initialization, contrast or control connections need checking. Adjust the contrast first, then verify the code, wiring and I2C address if you are using an adapter.

            3. What is the I2C address of a 16x2 LCD?

            Common PCF8574-based LCD adapter addresses are 0x27 and 0x3F. The actual address depends on the adapter chip and its address-pin configuration. Use an I2C scanner or check the module documentation to identify the correct address.

            4. Can I use a 16x2 LCD with ESP32?

            Yes. A 16x2 LCD can be connected to an ESP32 using either a parallel interface or an I2C adapter. However, the ESP32 uses 3.3V logic, so check the adapter's I2C pull-up voltage. A 5V pull-up can expose ESP32 GPIO pins to an unsafe voltage; use a suitable level shifter or a compatible 3.3V interface arrangement.

            5. Does a 16x2 LCD with I2C need an additional potentiometer?

            Usually, no. Most PCF8574 I2C adapter boards include a small onboard potentiometer for contrast adjustment. Turn it gradually until the characters are clearly visible. A standard parallel LCD without an integrated contrast circuit may need an external potentiometer.

            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