wokwi-lcd1602 Reference
An LCD with 2 lines, 16 characters per line.
Pin names
The LCD1602 comes in 2 possible configurations: I2C configuration and standard configuration. The I2C configuration is usually simpler to use.
The following table summarizes the key differences:
| Property | Standard | I2C |
|---|---|---|
| Number of Arduino I/O pins | 7* | 2 (SCL)/SDA |
| Backlight control | Optional | Yes |
| Library name | LiquidCrystal | LiquidCrystal_I2C |
* Controlling the backlight requires another I/O pin.
You can select the desired configuration by setting the pins attribute. Set it to "i2c" for the I2C configuration, or "full" for the standard configuration (the default).
I2C configuration
| Name | Description |
|---|---|
| GND | Ground |
| VCC | Supply voltage |
| SDA | I2C data line |
| SCL | I2C clock line |
The default I2C address of the LCD1602 module is 0x27. You can change the address by setting the i2cAddress attribute.
Note: The I2C configuration simulates a PCF8574T chip that controls the LCD module. Normally, you wouldn't have to worry about this as the LiquidCrystal_I2C library takes care of the communication with the chip.
Standard configuration
| Name | Description | Arduino Pin* |
|---|---|---|
| VSS | Ground | GND.1 |
| VDD | Supply voltage | 5V |
| V0 | Contrast adjustment (not simulated) | |
| RS | Command/Data select | 12 |
| RW | Read/Write. Connect to Ground. | GND.1 |
| E | Enable | 11 |
| D0 | Parallel data 0 (optional) † | |
| D1 | Parallel data 1 (optional) † | |
| D2 | Parallel data 2 (optional) † | |
| D3 | Parallel data 3 (optional) † | |
| D4 | Parallel data 4 | 10 |
| D5 | Parallel data 5 | 9 |
| D6 | Parallel data 6 | 8 |
| D7 | Parallel data 7 | 7 |
| A | Backlight anode | 5V / 6‡ |
| K | Backlight cathode | GND.1 |
* These are just example pin numbers, they are not mandatory. You need can use any digital/analog pin, but make sure to update the code accordingly!
† Normally, you'd configure the chip in 4-bit parallel mode, which means you only need to connect RS, E, D4, D5, D6, and D7 pins to Arduino.
‡ If you need to control the backlight, connect the anode to an I/O pin. Otherwise, connect it to the supply voltage. For a real circuit, you'd also
need a current-limiting resistor, but you may skip it in the simulation environment.