- Back to Home »
- LCD Interfacing with 8051 »
- lcd interfacing with 8051
This is the circuit diagram of interfacing of 2x16 LCD interfacing with 8051.
LCD interfacing is very very important in embedded System. I have connected LCD to port 1 of microcontroller 8051.But LCD cannot display data directly sent throgugh port 1 of microcontroller 8051. For LCD to display the data sent by the port 1 we have to send the command first to LCD to prepare it to display the data.
There are so many factor that we have to consider while displaying data on LCD that where we want to display the data. In 2x16 LCD, there are two row and 16 column.
The address of first row starting from 80h to 8Fh and the address of the second row starting from C0h to CFh. Before display the data, first of all we have to declare the address of that block.
Important command of LCD:
38H: It is sent to declare 5x7 pixel for each block.
01h: Clear LCD screen
0Ch: display on cursor off
06h: auto increase cursor by one
0eh: display on cursor blink
07h: shift entire display to right
One important thing i want to tell you that how LCD considers the data sent by port 1 as a command or as a data. To send command to LCD we have to set the rs pin of LCD. To send data to LCD we have to reset the rs pin of LCD.
CLICK HERE TO SEE THE PROGRAM FOR LCD INTERFACING
LCD interfacing is very very important in embedded System. I have connected LCD to port 1 of microcontroller 8051.But LCD cannot display data directly sent throgugh port 1 of microcontroller 8051. For LCD to display the data sent by the port 1 we have to send the command first to LCD to prepare it to display the data.
There are so many factor that we have to consider while displaying data on LCD that where we want to display the data. In 2x16 LCD, there are two row and 16 column.
The address of first row starting from 80h to 8Fh and the address of the second row starting from C0h to CFh. Before display the data, first of all we have to declare the address of that block.
Important command of LCD:
38H: It is sent to declare 5x7 pixel for each block.
01h: Clear LCD screen
0Ch: display on cursor off
06h: auto increase cursor by one
0eh: display on cursor blink
07h: shift entire display to right
One important thing i want to tell you that how LCD considers the data sent by port 1 as a command or as a data. To send command to LCD we have to set the rs pin of LCD. To send data to LCD we have to reset the rs pin of LCD.
CLICK HERE TO SEE THE PROGRAM FOR LCD INTERFACING