Difference between revisions of "I²C LCD1602"

From Wiki
Jump to: navigation, search
(Created page with "=='''Introduction'''== 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...")
(No difference)

Revision as of 04:56, 7 November 2015

Introduction

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 PHLIPS. It is a high performance serial bus which has bus ruling and high or low speed device synchronization function required by multiple host system. I2C bus has only two bidirectional signal lines, Serial Data Line (SDA) and Serial Clock Line (SCL). The blue potentiometer on the I2C LCD1602 is used to adjust backlight to make it easier to display on the I2C LCD1602.

Components

- 1 *SunFounder Uno board
- 1 * I2C LCD1602 module
- 1 * USB cable
- Several jump wires

Experimental Principle

In this experiment, we will let I2C LCD1602 display “SUNFOUNDER" and “hello, world" by programming.
I²C (Inter-Integrated Circuit), pronounced I-squared-C, is a multi-master, multi-slave, single-ended, serial computer bus invented by Philips Semiconductor (now NXP Semiconductors). It is typically used for attaching lower-speed peripheral ICs to processors and microcontrollers. Alternatively I²C is spelled I2C (pronounced I-two-C) or IIC (pronounced I-I-C).
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 I²C (Inter-Integrated Circuit), pronounced I-squared-C, is a multi-master, multi-slave, single-ended, serial computer bus invented by Philips Semiconductor (now NXP Semiconductors). It is typically used for attaching lower-speed peripheral ICs to processors and microcontrollers. Alternatively I²C is spelled I2C (pronounced I-two-C) or IIC (pronounced I-I-C).
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.
For more information about I2C operation principle, please visit I²C.

Experimental Procedures

Step 1: Connect the circuit
See the following table for connection between the I2C LCD1602 and the SunFounder Uno board:
{ border="1" cellspacing="0" width="80%" !I2C LCD1602!! [http://www.sunfounder.com/index.php?c=showcs&id=50&model=UNO%20R3&pname=Arduino&name=&pid=21 SunFounder Uno board |- |GND GND VCC 5V SDA A4 SCL A5 Note: The wiring of I2C LCD1602 is the same through the following lessons.

Step 2: Program (Please refer to the example code in LEARN -> Get Tutorial on our website) Step 3: Compile the code Before compiling the code, you need to add the LiquidCrystal_I2C file to the libraries of Arduino. If you don't know the libraries path, you can open Arduino IDE ,click File ->Preferences, as shown in the follwing diagram. Then add LiquidCrystal_I2C to the folder Libraries under the path

Step 4: Upload the sketch to the SunFounder Uno board You should now see your I2C LCD1602 display the flowing characters "SunFounder" and "hello, world".



I2C LCD1602