0% found this document useful (0 votes)
157 views23 pages

LCD Theory and Working Principles

This presentation is exhibitting how to does a LCD works and how to use such LCD in you embedded system or robotic project using AVR microcontroller Series. The complete procedure of using 16X2 Character LCD is given in this presentation. Please share your views and queries with us, we are found at- website: http://roboindia.com mail- [email protected]

Uploaded by

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

LCD Theory and Working Principles

This presentation is exhibitting how to does a LCD works and how to use such LCD in you embedded system or robotic project using AVR microcontroller Series. The complete procedure of using 16X2 Character LCD is given in this presentation. Please share your views and queries with us, we are found at- website: http://roboindia.com mail- [email protected]

Uploaded by

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

LCD THEORY

& WORKING PRINCIPLES


USE LCD WITH AVR

LCD - Liquid Crystal Display


Mostly used for Display of
Message
Highly
Robo
India user interactive
http://roboindia.com

LCD
We are using 16x2 character LCD
16x2 LCD means max 16
characters per line can be
displayed and there are 2 lines
Single character is displayed in
5x7 pixel matrix

LCD SCHEMATIC

LCD SCHEMATIC

CONNECTIONS

RS To any pin of your choice


RW To any pin of your choice
E To any pin of your choice
D0.D3 Not Connected
D4.D7 PINX,0 . PINX,3
D4 must be connected to PIN0 of X
PORT
:
D7 must be connected to PIN3 of X
PORT

CONNECTIONS

RS To any pin of your choice


RW To any pin of your choice
E To any pin of your choice
D0.D3 Not Connected
D4.D7 PINX,0 . PINX,3
D4 must be connected to PIN0 of X
PORT
:
D7 must be connected to PIN3 of X
PORT

PIN DESCRIPTION

RS Reset
RW Rewrite
E Enable
D3 . D7 Data Line
Anode - +5V
Cathode - GND

ADDING HEADER FILE

HEADER FILE HANDLING

#define LCD_DATA C
to D4-D7

#define LCD_E C //Enable signal


#define LCD_E_POS PC5 //Position of enable in abov
port

#define LCD_RS C
#define LCD_RS_POS PC7

#define LCD_RW C
#define LCD_RW_POS PC6

//Port PC0-PC3 are connected

FUNCTIONS OF HEADER
INITIALIZING LCD
InitLCD(LS_BLINK); //initialize
LCD
Above command will initialize the
LCD

FUNCTIONS OF HEADER
CLEAR LCD
LCDClear(); // To clear the display
Above command will CLEAR the
LCD

FUNCTIONS OF HEADER
DISPLAY TEXT ON LCD
LCDWriteStringXY(X,Y,Message");

Above command Write the text on LCD


X,Y are coordinates
X = 0 . 15
Y = 0 and 1

FUNCTIONS OF HEADER
DISPLAY VARIABLE ON LCD
LCDWriteInt(X,Y,variable,field length);

Above command Write the variable on LCD


X,Y define position of coordinates
X = 0 . 15
Y = 0 and 1
Variable = variable which we print
Field length = Num of Decimal places

FUNCTIONS OF HEADER
DISPLAY VARIABLE ON LCD
LCDWriteInt(X,Y,variable,field length);

Above command Write the variable on LCD


X,Y define position of coordinates
X = 0 . 15
Y = 0 and 1
Variable = variable which we print
Field length = Num of Decimal places

THANKS

In case of queries please write


[email protected]

You might also like