members
Basics Project 003a LCD 1602 I2C module
of Acoptex.com in UNO
Basics: Project 003a
Project name: LCD 1602 I2C module
Attachments: library and sketch
In this project, you needed these parts :
1. Aruduino Uno R3 1pc (you can also use the other version of Arduino)
2. LCD 1602 I2C module 1pc
3. Arduino IDE ( you can download it from here )
4. Jumper cables F-M
General
We will learn how to use 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)
- Plug your Adruino Uno board into your PC and select the correct board and com port
-
find the I2C addressFind 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 window 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 my case 0x3F)
- Modify the sketch: the line LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE) (See part marked bold)
- 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










Viewed: 2392 times