0% found this document useful (0 votes)
6 views2 pages

MCP CBS

The document outlines the procedure to interface a 16x2 LCD with an Arduino, including the necessary steps and code. It details the setup of the Liquid Crystal library, pin connections, and the display of text on the LCD. The result confirms the successful execution of the interfacing project.

Uploaded by

akshaya180612
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

MCP CBS

The document outlines the procedure to interface a 16x2 LCD with an Arduino, including the necessary steps and code. It details the setup of the Liquid Crystal library, pin connections, and the display of text on the LCD. The result confirms the successful execution of the interfacing project.

Uploaded by

akshaya180612
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Exp.

No:CBS
Interfacing 16X2 LCD with Arduino
DATE:

Aim:
To interface a 16x2 LCD with an Arduino

Procedure:
Step 1: Create a new Project.
Step 2: The program starts by including the Liquid Crystal library, which is required for
interfacing with the LCD.
Step 3: The Liquid Crystal library is initialized with the pin numbers for Register Select
(RS), Enable (EN), and data pins D4, D5, D6, and D7. These pins are connected to your
Arduino to control the LCD.
Step 4: In the setup function, the LCD's number of columns and rows is specified using lcd.
begin (16, 2). This informs the library that you are using a 16x2 LCD.
Step 5: In the loop function, the following actions are performed:
a. lcd.print("CIRCUIT DIGEST"): This displays "CIRCUIT DIGEST" on the first
line of the LCD.
b. lcd.setCursor(0, 1): This moves the cursor to the second line of the LCD (line
1) and sets it to the first column (column 0).
c. lcd.print("www.circuitdigest.com"): This displays "www.circuitdigest.com" on
the second line of the LCD.
d. delay(750): It adds a delay of 750 milliseconds (0.75 seconds) to give you time to
read the displayed text.
e. lcd.scrollDisplayLeft(): This function scrolls the text on the top line of the LCD
to the left.
f. lcd.setCursor(0, 0): The cursor is moved back to the first line for the next
iteration. Step 6: End.

AKSHAYA R 71812201017
Program:
#include <LiquidCrystal.h>
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
lcd.begin(16, 2);
lcd.print("hello, world!");
}
void loop() {
lcd.setCursor(0, 1);
lcd.print(millis() / 1000);
}
Connection diagram:

Output:

Result:
Thus, interfacing a 16x2 LCD with an Arduino is executed and verified successfully.

AKSHAYA R 71812201017

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy