Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

LCD display

Hex keyboard and 2 line, 16 characters LCD display

Description:

This interface, board consists of Matrix Hex keyboard and 2 line, 16 characters LCD
text display.

LCD Display:

LCD display has got built in controller. To display a character or numeral, the
corresponding ASCII value is to be given as input. The controller in turn converts the
ASCII value into dot matrix format and displays it. The characters are displayed in
5*7 matrix format. The LCD display works with 5V power supply. The contrast of
the display is adjusted through a variable resistance, which is connected across 5V
power supply.

Before writing the data, certain commands are to be sent to the controller like at what
position the character is to be displayed, the cursor is to be blinking or not.

The LCD display has got 8 data inputs namely DB0 to DB7 (Data Bus signals)

There is another pin namely RS (Register select signal). If a command is written, this
pin is to be made as 0 level, (RS =0, Command Register). If data is written, then this
pin is to be made as 1 level (RS =1, Data register).

There is another pin namely E (Enable signal). The data or command is written into
the controller only by making the Enable signal high to low.

LCD display contains internal buffer memory to store the data. It is also possible to
read the content of the memory. Normally, the command and data are written in the
LCD controller. At the time of writing inside the controller, in addition to giving
proper inputs to the control input pins RS and E, the R/W pin of the LCD display
must be kept zero.

The pin details are given as follows.

Interface pin connections

Pin No Symbol Function


1 Vss Gnd
2 Vdd +5V
3 V0 Contrast adjustment
4 RS Register select signal
5 R/W Read/Write signal
6 E Enable signal
7 DB0 Data bus signal
8 DB1 Data bus signal
9 DB2 Data bus signal
10 DB3 Data bus signal
11 DB4 Data bus signal
12 DB5 Data bus signal
13 DB6 Data bus signal
14 DB7 Data bus signal
15 A +4.2 V for BKL
16 K Power supply for BKL (OV)

There are many commands to be used in the LCD display. The following table gives 8
bit code for selected commands.

LCD Command Codes


Code (Hex) Command to LCD
1 Clear display screen
2 Return home
4 Decrement cursor (shift cursor to left)
6 Increment cursor (shift cursor to right)
5 Shift display right
7 Shift display left
8 Display off, cursor off
A Display off, cursor on
C Display on, cursor off
E Display on, cursor blinking
10 Shift cursor position to left
14 Shift cursor position to right
18 Shift the entire display to the left
1C Shift the entire display to right
80 Force cursor to beginning of 1st Line
C0 Force cursor to the beginning of 2nd Line
38 2 line and 5*7 matrix

In this interface board, the LCD data lines are connected to the port A of IC 8255.
RS pin is connected to PB0
R/W pin is connected to PB1
E Pin is connected to PB2

The signals are to be given appropriately through the Microprocessor or Micro


controller to write information in the controller.

Once the commands and data are written in the LCD controller, there is no necessity
to refresh the display externally. The controller inside the LCD display will take care
of this.

Matrix Hex Keyboard:

The keyboard is a 16 keys keyboard. It is constructed in 4*4 matrix. There are 4 rows
and 4 column lines. In the intersections of rows and columns, the keys are wired. The
row lines are called scan lines and the column lines are called return lines. The
columns are read inside the processor or controller through port. Normally, the
columns are tied with 5V and hence they will be in level.
Then the row lines are given 0 level one by one. At that instant, any key is pressed in
that row, 0 level is transferred to the column line. It is read inside as key input. The
row line and the column line nos generate the key code.

In the application board, PC0- PC3 are used as row lines (input port) and PC4- PC7
are used as column lines (output port).

You might also like