Introduction to LCD

12
INTRODUCTION TO LIQUID CRYSTAL DISPLAY (LCD)

description

lcd

Transcript of Introduction to LCD

INTRODUCTION TO LIQUID CRYSTAL DISPLAY (LCD)

INTRODUCTION TO LIQUID CRYSTAL DISPLAY (LCD)

LCD InterfacingHave 16 pins8 pins data interfacing3 pins control1 pin contras2 pins power2 pins back light

The EN line is called Enable. This control line is used to tell the LCD that you are sending in data. 0>1>0The RS line is the Register Select line :RS is low (0), the data is to be treated as a command or special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the data being sent is text data which should be displayed on the screen.The RW line is the Read/Write control line : RW is low (0), the information on the data bus is being written to the LCD, When RW is high (1), the program is effectively querying (or reading) the LCD.

2Hardware ConnectionLCD need delay:Waiting busy flag or wait (delay) 5msTo read Busy Flag, the condition RS = 0 and R/W = 1 must be met and the MSB of the LCD data bus (D7) acts as busy flag.Block diagram:

Need to respond to Buzy flag or wait around 5ms before send another command to LCD 3Cursor address We are using 16x2 LCD type:First line (80 to 8F)Second line (C0 to CF)

LCD CommandExample:Clear LCD:LCDCommand (0x01);Using 2 line 5x7 matrixLCDCommand(0x38);

Timing diagram to read

Example reading buzzy flag from LCD7Timing diagram to write

Example want display a character to LCD 8Example code

> 8 places user iconQ & ATAKE FIVE