LCD 16x2 Text Display
1. Objective
The objective is talk about, how to LCD 16x2 display text on screen.
2. Requirement
- Arduino Uno x1
- LCD 16x2 x1 (Name in Proteus: LM016L)
- Potentiometer 4.7Kohm or 10Kohm x1 (Name in Proteus: POT-HG)
- USB Cable x1(No need in simulation)
- Breadboard x1 (No need in simulation)
- Electronic Wire (No need in simulation)
3. Build Circuit
Build circuit like Figure 1.
4. Coding
// Coding by Tann Thona
(03/12/2020
)
#include <LiquidCrystal.h>
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.setCursor(1,0);
lcd.print("Welcome 2021");
lcd.setCursor(2,1);
lcd.print("TANN THONA");
}
void loop() {
// Turn off the display:
}
Click Here to Download Code and Proteus Simulation File
4. Result
According to code above, LCD will display text on column 1 "Welcome 2021" and column 2 "TANN THONA".Watch Video Explain in Khmer
Copyright By Tann Thona
No comments:
Post a Comment