Difference between revisions of "I²C LCD1602"
(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...") |
(→Experimental Procedures) |
||
Line 18: | Line 18: | ||
Step 1: Connect the circuit<br> | Step 1: Connect the circuit<br> | ||
See the following table for connection between the I2C LCD1602 and the SunFounder Uno board:<br> | See the following table for connection between the I2C LCD1602 and the SunFounder Uno board:<br> | ||
− | { border="1" | + | <center> |
− | + | { border="1" class="wikitable" | |
|- | |- | ||
− | |GND GND | + | ! scope="col" |[http://www.amazon.com/SunFounder-interface-Plate-KeyPad-Raspberry/dp/B00MRWB5LW/ref=sr_1_1?m=ADHH624DX2Q66&s=merchant-items&ie=UTF8&qid=1446870985&sr=1-1&keywords=i2c+lcd1602&pebp=1446870940122&perid=125KN0M4SXF3RDWYX2V0 I2C LCD1602]<br> |
− | VCC 5V | + | ! scope="col" |[http://www.sunfounder.com/index.php?c=showcs&id=50&model=UNO%20R3&pname=Arduino&name=&pid=21 SunFounder Uno board] |
− | SDA A4 | + | |- |
− | SCL A5 | + | |GND |
+ | |GND | ||
+ | |- | ||
+ | |VCC | ||
+ | |5V | ||
+ | |- | ||
+ | |SDA | ||
+ | |A4 | ||
+ | |- | ||
+ | |SCL | ||
+ | |A5 | ||
+ | |} | ||
+ | </center> | ||
+ | |||
Note: The wiring of I2C LCD1602 is the same through the following lessons. | Note: The wiring of I2C LCD1602 is the same through the following lessons. | ||
Revision as of 05:21, 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" class="wikitable"
|-
! scope="col" |I2C LCD1602
! scope="col" |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".