Pin assignment or Pin configurations of LCD
To interface a LCD with microcontroller , one should understand its all pins and how to use them at different time and purpose. Fore example a LCD having 4 line and 80 characters have two seprate controllers to controls two lines each.
PIN 1 DB7 I/O Data bus line 7 (MSB)
PIN 2 DB6 I/O Data bus line 6
PIN 3 DB5 I/O Data bus line 5
PIN 4 DB4 I/O Data bus line 4
PIN 5 DB3 I/O Data bus line 3
PIN 6 DB2 I/O Data bus line 2
PIN 7 DB1 I/O Data bus line 1
PIN 8 DB0 I/O Data bus line 0 (LSB)
PIN 9 E1 1, 1->0 I
(Enable signal for row 0 and 1 (1stcontroller) )
PIN 10 R/W 0/1
( 0 = Write to LCD module )
(1 = Read from LCD module )
PIN 11 RS I
(0 = Instruction input)
(1 = Data input )
PIN 12 Vee - - Contrast adjust
PIN 13 Vss - - Power supply (GND)
PIN 14 Vcc - - Power supply (+5V)
PIN 15 E2 1, 1->0
(I Enable signal for row 2 and 3 (2ndcontroller) )
PIN 16 n.c.
Instructions of LCD:
Below are some instruction and functions used in the interface of LCD.
Status of different bits for clear display function, how it will be performed.
RS = 0, R/W =0, DB7=0, DB6 = 0, DB5 =0, DB4 =0,DB3 = 0, DB2 =0, DB1 =0, DB0 = 1.
Clears display and returns cursor to the home position (address 0). It took almost 1.64mS to complete the instruction.
RS = 0, R/W =0, DB7=0, DB6 = 0, DB5 =0, DB4 =0,DB3 = 0, DB2 =0, DB1 =1, DB0 = *.
Returns cursor to home position (address 0). Also returns display being shifted to the original position. DDRAM contents remains unchanged. It means the data being disply on LCD will not be deleted or effected.
Entry mode set:
RS = 0, R/W =0, DB7=0, DB6 = 0, DB5 =0, DB4 =0,DB3 = 0, DB2 =1, DB1 =I/D, DB0 = s.
Sets cursor move direction (I/D), specifies to shift the display (S). These operations are performed during data read/write.
Display On/Off control:
RS = 0, R/W =0, DB7=0, DB6 = 0, DB5 =0, DB4 =0,DB3 = 1, DB2 =D, DB1 =C, DB0 = B.
Sets On/Off of all display (D), cursor On/Off (C) and blink of cursor position character (B).
RS = 0, R/W =0, DB7=0, DB6 = 0, DB5 =0, DB4 =1,DB3 = S/C, DB2 =R/L, DB1 =*, DB0 = *.
Sets cursor-move or display-shift (S/C), shift direction (R/L). DDRAM contents remains unchanged.
RS = 0, R/W =0, DB7=0, DB6 = 0, DB5 =1, DB4 =DL,DB3 = N, DB2 =F, DB1 =*, DB0 = *.
Sets interface data length (DL), number of display line (N) and character font(F).
Write to LCD:
RS = 1, R/W =0, DB7=d, DB6 = d, DB5 =d, DB4 =d,DB3 = d, DB2 =d, DB1 =d, DB0 = d.
Writes data (d) one bit.
Read from LCD:
RS = 1, R/W =1, DB7=d, DB6 = d, DB5 =d, DB4 =d,DB3 = d, DB2 =d, DB1 =d, DB0 = d.
Read data d one bit and eight d = one byte at a time from LCD.
microcontroller 8051 security alarm based system circuits GSM based Home security system hidden camerasGSM based home security system project using microcontroller 8051. Main aim of this project is to provide sms based tracking of different lo...
MOVING MESSAGE DISPLAY USING ATMEL 89C51 LED moving message diaply using PIC16f628 CD4017 and 74LS595 moving message display using 8051 m...
The use of microcontroller is in every field even we can use it in the design and fabrication of biomedical equipments. A little example is ...
GSM modem interfacing with microcontroller 8051 for SMS control of industrial equipments:- This is a beginner tutorial in which a GSM modem...
This is revised version of heart beat monitor using 8051 heart beat monitor located in this blog ob post. http://microcontroller51.blogspo...
4 The Hardware Description of the Automatic carparking project using microcontroller 8051 4.1 Stepper Motor Control Board This board have ...
The most character LCD module can be interface with micro-controller in any of these two ways of interface: 1. 4-Bit Interface ( a litt...
This is ciruit diagram of interfacing of LCD with microcontroller 8051 family. This project was to measure heart beat and to display on LC...
Three stories Lift or Elevator controller with microcontroller At89c51 In this project, we will learn circuit design for a elevator, how ...
SMS Based Controlling Different Industrial Machines Using GSM Mobile and microcontroller 8051 This project (interfacing mobile phone with m...