23
LCD - L iquid C rystal D isplay Mostly used for Display of Message Highly user interactive Robo India http://roboindia.com

LCD Theory and Working Principles

Embed Size (px)

Citation preview

Page 1: LCD Theory and Working Principles

• LCD - Liquid Crystal Display

• Mostly used for Display of Message

• Highly user interactive

Robo Indiahttp://roboindia.com

Page 2: LCD Theory and Working Principles

• 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

Page 3: LCD Theory and Working Principles
Page 4: LCD Theory and Working Principles

Click here to visit -ROBO INDIA

Page 5: LCD Theory and Working Principles

• 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

Click here to visit -ROBO INDIA

Page 6: LCD Theory and Working Principles

• 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

Click here to visit -ROBO INDIA

Page 7: LCD Theory and Working Principles

• RS – Reset

• RW – Rewrite

• E – Enable

• D3 …. D7 – Data Line

• Anode - +5V

• Cathode - GND

Click here to visit -ROBO INDIA

Page 8: LCD Theory and Working Principles

Click here to visit -ROBO INDIA

Page 9: LCD Theory and Working Principles
Page 10: LCD Theory and Working Principles
Page 11: LCD Theory and Working Principles
Page 12: LCD Theory and Working Principles
Page 13: LCD Theory and Working Principles
Page 14: LCD Theory and Working Principles
Page 15: LCD Theory and Working Principles
Page 16: LCD Theory and Working Principles
Page 17: LCD Theory and Working Principles

• #define LCD_DATA C //Port PC0-PC3 are connected to D4-D7

• #define LCD_E C //Enable signal

• #define LCD_E_POS PC5 //Position of enable in above port

• #define LCD_RS C

• #define LCD_RS_POS PC7

• #define LCD_RW C

• #define LCD_RW_POS PC6

Click here to visit -ROBO INDIA

Page 18: LCD Theory and Working Principles

INITIALIZING LCD

InitLCD(LS_BLINK); //initialize LCD

• Above command will initialize the LCD

Click here to visit -ROBO INDIA

Page 19: LCD Theory and Working Principles

CLEAR LCD

LCDClear(); // To clear the display

• Above command will CLEAR the LCD

Click here to visit -ROBO INDIA

Page 20: LCD Theory and Working Principles

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

Click here to visit -ROBO INDIA

Page 21: LCD Theory and Working Principles

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

Click here to visit -ROBO INDIA

Page 22: LCD Theory and Working Principles

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

Click here to visit -ROBO INDIA

Page 23: LCD Theory and Working Principles

In case of queries please write us-

[email protected]

www.roboindia.com

Click here to visit -ROBO INDIA