You are on page 1of 30

s

Department of Engineering, Sciences and H

Liquid Crystal Display

Y
F

– Uses Super Twisted Nematic (STN) in the

e
Composition
i

a
• A LCD Module contains
m

Department of Engineering, Sciences and H

• LCD Controller
• LCD Glass/Panel

simple Alfa-Numeric displays


-

F
i

t
Types
a
• Segmented
m

Department of Engineering, Sciences and H

• Alpha Numeric •
Graphics
• Thin Film Transistor (TFT)
-

e
Segmented Alpha Numeric s

u
Department of Engineering, Sciences and H
e

u
Department of Engineering, Sciences and H
-

Department of Engineering, Sciences and H


-

Block Diagram
F

e
Interface pin description s

Department of Engineering, Sciences and H


-
Y

i
• The following slides shows the initialization
n
• In UnoArduSim we need to use
a

u
steps and command descriptions.
Department of Engineering, Sciences and H

• This is used in a normal microcontroller


system.
• In Arduino system the library will take care
of all this.
• This library is LiquidCrystal.h
Native_LiquidCrystal.h
-

F
s

Department of Engineering, Sciences and H


-

Department of Engineering, Sciences and H


-

F
s

Department of Engineering, Sciences and H


-

Department of Engineering, Sciences and H


-

In Lab
F

On Web
s

Department of Engineering, Sciences and H


-
F

e
Using SimulIDE s

Department of Engineering, Sciences and H


-
Y

e
Assignments s

a
• Display the Potentiometer data on the LCD
m

Department of Engineering, Sciences and H

• Create and display the Rupee logo on


LCD• Roll the text on the display
-

• lcd.begin(16, 2); // for 16 char and 2 lines•


lcd.createChar(0, rupee); // create a
Functions to be used
e

i
s

n
• #include <Native_LiquidCrystal.h>
a

• lcd.setCursor(0, 0); // set the cursor to the top left


Department of Engineering, Sciences and H

• lcd.print("VIT MAR LAB4 LCD"); // Print a


message to the lcd.

new character
• lcd.write(byte(0)); //to display special char
-

u
Department of Engineering, Sciences and H
-

Department of Engineering, Sciences and H


-

#include <Native_LiquidCrystal.h> // include the library code:


F

// with the arduino pin number it is connected to


const int rs = 2, en = 3, d4 = 5, d5 = 6, d6 = 7, d7 = 8;
Native_LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
byte rupee[8] = { // make some custom characters:
// initialize the library by associating any needed LCD interface pin

Department of Engineering, Sciences and H


B11111,
B00010,
B11111,
B00010,
B01100,
B11000,
B01100,
B00111
};
void setup() {
lcd.begin(16, 2); // initialize LCD and set up the number of columns and rows:
lcd.createChar(0, rupee); // create a new character
lcd.setCursor(0, 0); // set the cursor to the top left
lcd.print("VIT MAR LAB4 LCD"); // Print a message to the lcd.
lcd.setCursor(0, 1);
-
lcd.write(byte(0)); // when calling lcd.write() '0' must be cast as a byte }
void loop() {}
Y

F
s

Department of Engineering, Sciences and H


-

m
u

Department of Engineering, Sciences and H


-

n
a

Department of Engineering, Sciences and H


-

You might also like