0

members

Easy Basics Project 003b LCD 1602 I2C module scroll text

of Acoptex.com in UNO

Basics: Project 003b

Project name: lcd 1602 I2C module scroll text

Attachments: library and sketch

In this project, you needed these parts :

1. Aruduino Uno R3 (you can also use the other version of Arduino)

2. LCD 1602 I2C module

3. Arduino IDE ( you can download it from here  )

4. Jumper cables F-M

General

We are going to learn how to make the text scrolling on LCD 1602 I2C module with Arduino board.

Understanding LCD 1602 I2C module

The meaning of LCD1602 marking is Liquid Cristal Display 16 characters by 2 rows, each row displays 16 characters of either 5x7 or 5x8 dot matrix characters.The LCD is available in a 16 pin package. It consists of back light and contrast adjustment function and each dot matrix has 5×8 dot resolution.

As we all know, though LCD and some other displays greatly enrich the man-machine interaction, they share a common weakness. When they are connected to a controller, multiple IOs will be occupied of the controller which has no so many outer ports. Also it restricts other functions of the controller. Therefore, LCD1602 with an I2C bus is developed to solve the problem.I2C bus is a type of serial bus invented by PHILIPS. It is a high performance serial bus which has bus ruling and high or low speed device synchronization function required by multiple-host system. The blue potentiometer on the I2C LCD1602 is used to adjust the backlight  for better display. I²C uses only two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock Line (SCL), pulled up with resistors. Typical voltages used are +5 V or +3.3 V although systems with other voltages are permitted.

Datasheet can be found here.

Signals and contacts of LCD 1602 I2C module

As you can see on the back of LCD 1602 module there 4 connections: GND (-), VCC (+5V), Serial Data Line (SDA) and Serial Clock Line (SCL).

Wiring

LCD 1602 I2C module  Arduino Uno

GND                           GND

VCC                            5V

SDA                           SDA (A4)

SCL                            SCL (A5)

Step by Step instruction

  1. Plug your Adruino Uno board into your PC and select the correct board and com port.
  2. Open Arduino IDE.
  3. find the I2C address
    Find your I2C address. Each device has an I2C address that it uses to  accept commands or send messages. Load the sketch over at http://playground.arduino.cc/Main/I2cScanner and follow the instructions to use it.  By opening up the Serial monitor at 9600 bps in Arduino IDE after you upload the sketch, Arduino will scan the address range looking for a reply.  Even though the documentation said it was 0x27, this scanner can detect different (in our case 0x3F)
  4. Modify the sketch: the line LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE) (See part marked bold)
  5. Verify and upload the sketch to your Adruino Uno.

Libraries:

  • See attachments on the begining of this project description.
  • We have used the library - NewliquidCrystal_1.3.4.zip which we downloaded, unzipped, changed the name of folder to LiquidCristal and added to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. If you have LiquidCristal folder in this location already - delete this folder and copy folder, which was made by you, to this location.
Sketch:
  • See attachments on the begining of this project


Other projects of Acoptex.com
Easy Basics: Project 105a SIM900A GSM GPRS mini module of Acoptex.com in NANO 28-11-2019

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 30-04-2017
Viewed: 1842 times