Difference between revisions of "LCD1602 Module"
(→The Experiment for Arduino) |
(→The Experiment for Raspberry Pi) |
||
Line 56: | Line 56: | ||
'''<font color="green">Experimental Procedures</font><br> | '''<font color="green">Experimental Procedures</font><br> | ||
'''Step 1:''' Build the circuit (please be sure the pins are connected correctly. Otherwise, characters will not be displayed properly):<br> | '''Step 1:''' Build the circuit (please be sure the pins are connected correctly. Otherwise, characters will not be displayed properly):<br> | ||
+ | <center> | ||
+ | {| border="1" class="wikitable" | ||
+ | |- | ||
+ | ! scope="col" | I2C LCD1602 | ||
+ | ! scope="col" | SunFounder Uno board | ||
+ | |||
+ | |- | ||
+ | |align="center"|GND | ||
+ | |align="center"|GND | ||
+ | |- | ||
+ | |align="center"|VCC | ||
+ | |align="center"|5V | ||
+ | |- | ||
+ | |align="center"|SDA | ||
+ | |align="center"|A4 /pin 20 mega2560 | ||
+ | |- | ||
+ | |align="center"|SCL | ||
+ | |align="center"|A5 /pin 21 mega2560 | ||
+ | |} | ||
+ | </center> | ||
+ | {| border="1" class="wikitable" | ||
+ | |- | ||
+ | ! scope="col" | LCD1602/2004 | ||
+ | ! scope="col" | SunFounder Uno board | ||
+ | |- | ||
+ | |align="center"|K | ||
+ | |align="center"|GND | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|A | ||
+ | |align="center"|3.3V | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|D7 | ||
+ | |align="center"|GPIO18 | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|D6 | ||
+ | |align="center"|GPIO23 | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|D5 | ||
+ | |align="center"|GPIO24 | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|D4 | ||
+ | |align="center"|GPIO25 | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|D0-D3 | ||
+ | |align="center"|No Connected | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|E | ||
+ | |align="center"|GPIO22 | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|R/W | ||
+ | |align="center"|GND | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|RS | ||
+ | |align="center"|GPIO27 | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|OV | ||
+ | |align="center"|Connect to the middle pin of potentiometer | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|VDD | ||
+ | |align="center"|5V | ||
+ | |- | ||
+ | |- | ||
+ | |align="center"|VSS | ||
+ | |align="center"|GND | ||
+ | |- | ||
+ | } | ||
− | |||
[[File:Lcd1602-8.jpg.png]]<br> | [[File:Lcd1602-8.jpg.png]]<br> | ||
Revision as of 03:31, 7 March 2018
Contents
Introduction
LCD1602, or 1602 character-type liquid crystal display, is a kind of dot matrix module to show letters, numbers, and characters and so on. It's composed of 5x7 or 5x11 dot matrix positions; each position can display one character. There's a dot pitch between two characters and a space between lines, thus separating characters and lines. The model 1602 means it displays 2 lines of 16 characters.
Generally, LCD1602 has parallel ports, that is, it would control several pins at the same time. LCD1602 can be categorized into eight-port and four-port connections. If the eight-port connection is used, then all the digital ports of the SunFounder Uno board are almost completely occupied. If you want to connect more sensors, there will be no ports available. Therefore, the four-port connection is used here for better application.
Pins Functions
The Experiment for Arduino
Components
- 1 * SunFounder Uno Board
- 1 * Breadboard
- 1 * LCD1602
- 1 * Potentiometer (50kΩ)
- 1 * USB Cable
- Several Jumper Wires
Experimental Procedures
Note: Before connecting circuit, need to plug the pin headers onto a breadboard, and then put the LCD1602 on to it for easy soldering.
Step 1: Build the circuit (make sure the pins are connected correctly. Otherwise, characters will not be displayed properly):
Step 2: Download the package LCD1602_for_Arduino, then unzip it and open the LCD1602.ino file
Step 3: Select correct Board and Port
Step 4: Upload the sketch to the SunFounder Uno board
Experimental Phenomenon
Note: You may need to adjust the potentiometer on the LCD1602 until it can display clearly.
You should now see the characters "SunFounder" and "hello, world! " rolling on the LCD.
The Experiment for Raspberry Pi
Components
- 1 * Raspberry Pi
- 1 * Breadboard
- 1 * LCD1602
- 1 * Potentiometer
- Several Jumper Wires
Experimental Procedures
Step 1: Build the circuit (please be sure the pins are connected correctly. Otherwise, characters will not be displayed properly):
I2C LCD1602 | SunFounder Uno board |
---|---|
GND | GND |
VCC | 5V |
SDA | A4 /pin 20 mega2560 |
SCL | A5 /pin 21 mega2560 |
LCD1602/2004 | SunFounder Uno board |
---|---|
K | GND |
A | 3.3V |
D7 | GPIO18 |
D6 | GPIO23 |
D5 | GPIO24 |
D4 | GPIO25 |
D0-D3 | No Connected |
E | GPIO22 |
R/W | GND |
RS | GPIO27 |
OV | Connect to the middle pin of potentiometer |
VDD | 5V |
VSS | GND |