Probably this very post should have come before the number of other posts related to 8051 LCD interfacing, but its never too late. This post will describe you about the pins of LCD normally available in the market. It looks almost like the one shown below. As you guys can see that there are 8 data pins along with 3 control pins. One ground and two power pins are also there. Lets study about these pins of LCD
VSS, VDD and VEE
Pin 1 (VSS) is a ground pin and it is certainly needed that this pin should be grounded for LCD to work properly. VEE and VDD are given +5 vlots normally. However VEE may have a potentiometer voltage divider network to get the contrast adjusted. But VDD is always at +5V.
RS, R/W and E
These three pins are numbered 4, 5 and 6 as shown above. RS is used to make the selection between data and command register. For RS=0, command register is selected and for RS=1 data register is selected.
R/W gives you the choice between writing and reading. If set (R/W=1) reading is enabled. R/W=0 when writing.
Enable pins is used by the LCD to latch information presented to its data pins. When data is supplied to data pins, a high to low pulse must be applied to this pin in-order for the LCD to latch in the data present at the data pins. It maybe noted here that the pulse must be of minimum 450ns wide.
The 8-bit data pins, D0-D7, are used to send information to the LCD or read the contents of LCD's internal register.
The following paragraph is taken and included from "Muhammad Ali Mazidi",
"To display letters and numbers, we send ASCII code for the letters A-Z, a-z and numbers 0-9 while making RS=1. We also use RS=0 to check the busy flag bit to see if the LCD is ready to receive information. The busy flag is D-7 and can be read when R/W=1 and RS=0, as follows: if R/W=1, RS=0. When D7=1 (busy flag=1), the LCD is busy taking care of internal operations and will not accept any new information. When D7=0, the LCD is ready to receive new information. It is recommended to check the busy flag before writing any data to LCD"