DISPLAY TEXT OR STRING ON LCD 16X2 USING ARDUINO

Earlier you learn Interfacing of LCD with Arduino and then LCD begin & how to set Cursor of LCD to display, Now you will learn how to display text or string on LCD 16×2 using Arduino, for this, we will use LCD function print.

Syntax: object.print( Text to print );
S.N.Arduino PinLCD pin 
1.1. VSSGround (0V)
2.2. VCC+ 5V
3.3. VEE10K POT
4.24. RS
5.5. RWGround
6.36. E
7.7. D0-
8.8. D1-
9.9. D2-
10.10. D3-
11.411. D4
12.512. D5
13.613. D6
14.714. D7
15.15. Anode ++ 5V
16.16. Cathode -0V (Ground)

CIRCUIT DIAGRAM

circuit diagram - connection of lcd with arduino
Circuit Diagram – Connection of LCD 16×2 with Arduino

* POT = Potentiometer = Variable resistor

ARDUINO CODE TO DISPLAY STRING ON LCD 16×2

#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);

  // set up cursor at top left
  lcd.setCursor(0, 0);
  lcd.print("HELLO");

  // set up cursor at bottom left
  lcd.setCursor(0, 1);
  lcd.print("WORLD");
}

void loop() {

}

CONFIGURING LCD 16×2 IS IMPORTANT

After uploading the code to the Arduino, maybe no content visible in this case we need to vary the variable resistance (POT) 10 KΩ, by varying this resistance you can see the printed string on the LCD screen. The variable resistor is used because in different climatic conditions different values of resistance can make display properly.

OUTPUT

Display Text or String on LCD 16x2 using Arduino
LCD output

 


READ NEXT
SCROLL DATA ON LCD 16×2 USING ARDUINO


 

Total Visits: 2183
0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x