How to Use I2c With LCD

3,780

57

5

Introduction: How to Use I2c With LCD

About: I am an electronic hobbyist on Arduino, Photon, Raspberry Pi and common electronics.A passionate cook.Any assistance in electronics and web development feel free to contact me at appytechie.at@gmail.com.

Hi guys!! I'm sridhar janardhan back with another tutorials.This tutorials is very useful for people who wants to be a electronics hobbyist.Usually the interface of LCD to a arduino is a hectic as it has many connection and also spoils the beauty of the circuit by it's ugly wire.To avoid these stuffs I2C is used.It requires 5v To get powered which can be provided by Uno itself.Instead numerous wire requires in LCD here only four wires are enough to finish the connection and there is embedded pot to control the contrast of the Display.

So let me tell you components required for the ibles.

Step 1: Componets Required:

The components required are:

  • Arduino Uno
  • LCD compatible to arduino
  • I2c
  • Jumper wire
  • Soldering gun
  • Soldering lead
  • Breadboad

Before the connection let me explain you the four pins of the I2C.

Step 2: Pin Description of I2C:

The pins of the I2C are:

  • VCC Pin - the pin that requires to power up the circuit
  • GND pin - the pin that required to keep all the component in the circuit grounded.
  • SDA pin - this is a data line where the transfer of characters take place.
  • SCL pin - this is a clock line synchronizing the transfer of character.

Now let's solder the I2c to the LCD

Step 3: Soldering

The pins of the I2c are neatly soldered into the respective slots of the LCD and make sure no lead is in contact with the adjacent lead,This may short the lcd circuit and burn the whole circuit.

Step 4: Connection of the LCD

The connection of the LCD are as follows

  • VCC pin to 5v pin of the arduino
  • GND pin to GND pin of the Arduino
  • SDK to arduino pin A0
  • SCK to arduino pin A1

Step 5: Coding:

include "Wire.h"

#include "LCD.h"

#include "LiquidCrystal_I2C.h"

LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7);

void setup() {

lcd.begin (16,2);

lcd.setBacklightPin(3,POSITIVE);

lcd.setBacklight(HIGH);

lcd.print("Hello!");

lcd.setCursor(0,1);

lcd.print("Peep");

}

void loop() { }

Makerspace Contest 2017

Participated in the
Makerspace Contest 2017

Be the First to Share

    Recommendations

    • Pocket-Sized Speed Challenge

      Pocket-Sized Speed Challenge
    • Audio Challenge 2020

      Audio Challenge 2020
    • Maps Challenge

      Maps Challenge

    5 Discussions

    0
    freddie43
    freddie43

    3 years ago

    I have soldered up several of these but your two photos in the solder section show the I2C connected the wrong way round! Also most I2Cs have hardware address selection which you need to mention.

    0
    callmeappytechie
    callmeappytechie

    Reply 3 years ago

    yeah later on i corrected it.See the photos in section. Thanks for the correction.

    0
    tittiamo68
    tittiamo68

    3 years ago

    In my opinion, you did a little bit of confusion ....

    0
    xlqr9
    xlqr9

    3 years ago

    good