How to use LCD HD44780 i2c

         In this tutorial, I’ll show you how to connect an LCD to an I2C, which will have only 4 pins to control and use the LCD. So let’s get started.

For this project you will need :

  • LCD 2×16 or 4×20
  • i2c for LCD
  • Arduino
  • 4 wires

Connection:
GND to GND
VCC to 5V
SDA to SDA or A4
SCL to SCL or A5

Before using our display, we need to know its address. We can do this by using the I2C scanner code. Once we have the I2C address we can replace this value in the example code and start using it. Download sketch and upload to your Arduino. Next open Serial Monitor and copy address.

Now we can go to the appropriate program. Install library LiquidCrystal_i2c
by Frank de Brabander. Set the address and size of your i2c HD44780 my is 0x3F. Set the contrast with the potentiometer.  You can change the address of the i2c module by shorting after A0, A1 and/or A2.