LCD interface using I2C Module with Arduino

I2C module with LCD display using Arduino

 How to interface PCF85574 module with arduino?
To connect LCD display 16×2 or 20×4 to Arduino you know you’ll need at least 6 wires to connect, it means sacrificing some IO’s that could be used for connecting other components such as sensors or motors. another way is to use 74HC595 Shift register for interfacing. In this tutorial we will discuss on PCF85574 I2C LCD Display Interface.
A module that can be used to circumvent this problem is the I2C Module for LCD Display with PCF85574 (datasheet ):

With this module, you can control an LCD display, either 16×2 or 20×4, using only two pins Arduino: the analog input pin 4 (SDA) and the analog input pin 5 (SCL) forming the I2C interface.
I2C Module structure
In the module left side we have 4 pins, and two are for power ( Vcc and GND ), and the other two are the interface I2C ( SDA and SCL ) . The plate pot is for display contrast adjustment, and the jumper on the opposite side allows the back light is controlled by the program or remain off for power saving.
By default the module is configured with the address 0x27 , but you can change this address using the pins A0, A1 and A2.

Step 1: Connection of I2C LCD Module with Arduino

 The module has 16 pins that can be directly connected to the display, or you can test the connection in breadboard, as I did riding the circuit below where I used a 16×2 LCD display with HD44780 controller connected to the Arduino Uno: If you are using an Arduino Mega 2560, use the pin 20 (SDA) and 21 (SCL) :
Circuit Arduino I2C Display LCD Interface
Circuit Arduino I2C Display LCD Interface

Step 2: Programming I2C LCD Module with Arduino

Download: LiquidCrystal_I2C Library
To control this I2C module, use the library LiquidCrystal_I2CUnzip the file and rename the folder LiquidCrystal to LiquidCrystalI2C by copying it to the folder  LIBRARIES the IDE of your Arduino.Rename the folder prevents you from having conflicts with LiquidCrystal library that is already built into the IDE.
The commands for display control are almost the same library  LiquidCrystal we use normally with commands such as lcd.begin () , lcd.print ()   and lcd.setCursor () . In I2C library, the command lcd.setBacklight () alloy (HIGH ) or off ( LOW ) the display backlight.

Use of I2C Reduces required IO lines and you can connect many devices on same I2C wires.

One thought on “LCD interface using I2C Module with Arduino

  1. Dear Sir

    The article was very useful and the circuit is working fine, Thank you so much for sharing your experience and knowledge.

    Regards

    CG

Leave a Reply

Your email address will not be published. Required fields are marked *