You are on page 1of 17

82C55

Programmable Peripheral
Interface

82C55 : Pin Layout

Programming 82C55

Interfacing
44780 LCD
with 8088 CPU
through 8255
PPI

Pinout, commands,
interfacing

Liquid Crystal Display (LCD)


Module

44780 LCD Controller

Controls alphanumeric printing on LCD

Has 8-bit and 4-bit interface

Single controller can control one 16x2


character LCD

Takes ASCII codes as input for


characters to be printed

LCD module pinouts

LCD Commands
Comma
nd

Function

38H

8-bit Interface (*must be the first


command sent to LCD controller)

0EH
0FH
0CH
06H

Turn on underline cursor


Turn on blinking block cursor
Make cursor invisible
Cursor auto-right move

80H

Cursor on column0, row0 (80H+column


no.)

C0H

Cursor on column0, row1 (C0H+column


no.)
8

Interfacing LCD
with PPI

Writing a command
byte to LCD

10

Writing a data byte


to LCD

11

LCD Connections &


Commands
LCD Lines

PPI Lines

RS

PC0

RW

PC1

EN

PC2

D0

PA0

D1

PA1

D2

PA2

D3

PA3

D4

PA4

D5

PA5

D6

PA6

D7

PA7

Function

Byte value

Clear display

01H

8-bit interface

38H

Cursor auto-increment

06H

Display ON, with NO cursor blinking

0EH

Cursor at home position

80H

12

Writing Data on
LCD-Code

Initialize the PPI with settings


BEGIN:
MOV AL, 80H
OUT 83H, AL
CALL CMD

13

Writing Command on
LCD-Code
Program the LCD
CMD:
MOV AL, 04H
OUT 82H, AL
MOV AL, 01H
OUT 80H, AL
XOR AL, AL
OUT 82H, AL
RET

14

Writing Data on
LCD-Code

Main Program starts here


BEGIN:
MOV AL, 80H
OUT 83H, AL
CALL CMD
MOV CX, 10
MAIN:
CALL CHAR
LOOP
MAIN
HLT

15

Writing Data on
LCD-Code

Procedure that displays Character on


LCD
CHAR:
MOV AL, 05H
OUT 82H, AL
MOV AH,1
INT 21H
OUT 80H, AL
XOR AL, AL
OUT 82H, AL
RET
16

Assignment # 3
(part 1)

Assume that the data to be displayed


on
LCD
is
saved
at
location
F000H:1200H n onward.
Modify this program to display 10
characters from this location to LCD

17

You might also like