Friday 15 January 2016

Serial I2C 1602 16×2 Character LCD Module with Arduino

This is another great blue backlight LCD display. As the pin resources of Arduino controller is limited, your project may be not able to use normal LCD shield after connected with a certain quantity of sensors or SD card. However, with this I2C interface LCD module, you will be able to realize data display via only 2 wires. If you already has I2C devices in your project, this LCD module actually cost no more resources at all. It is fantastic for Arduino based project. This LCD is available from our eBay Store.

Features

  • Interface: I2C
  • I2C Address: 0x3F 
  • Pin Definition : VCC,GND,SDA,SCL
  • Back lit (Blue with white char colour)
  • Supply voltage: 5V
  • Size : 27.7mm×42.6mm
  • Contrast Adjust : Through Potentiometer
  • Only employ two I/O interface

Connection diagram

Get four male to female dupont jumper wires and connect the LCD/I2c module to your Arduino as shown in the following image and table. We are using Arduino Uno.  The table describes which pins on the Arduino should be connected to 1602 I2C LCD module.








Contrast  Adjustment

1602I2C 3.jpg
Spin the potentiometer clockwise to increase contrast ,spin counter clockwise  to decrease it


I2C ADDRESS:

There are a few versions of 1602 LCD available with different I2C address e.g. 0x27, 0x3F.
If not sure , I2C address can be verified by running  I2C scanner sketch from the Arduino playground.


For our LCD the address was verified as 0x3F.

Install Library

Open Arduino IDE and go to manage libraries



Install the LiquidCrystal_I2C library by Marco Schwartz



Upload the following code to your Arduino board.


Example code


//Compatible with the Arduino IDE 1.0
//Library version:1.1

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x3F,16,2);  // i2c address 0x3F

void setup()
{
 lcd.init();                      // initialize the lcd
 // Print a message to the LCD.
 lcd.backlight();
 lcd.setCursor(1,0);
 lcd.print("Hello, World!");
 lcd.setCursor(2,1);
 lcd.print("Alictronix!");
}

void loop()
{
}

Results:





Note:

If the text isn’t clear, or you just see white blocks – try adjusting the contrast using the potentiometer on the back of the module. You can permanently turn off the backlight by removing the physical jumper on the back of the module.

2 comments:

  1. You can get some of the best computer tips online, making it easy for you to know you are doing something beneficial for your self at home. The best way to do this is to look online for micro tips that can be used for the projects that you are going to be getting done in the comfort of your home.

    Brian Hopkins @ Microtips USA

    ReplyDelete