Department of Computer Scien
ce and Information Engineering
National Cheng Kung University, TAIWAN
8255 HANEL
INTERFACING
LCD
Connection To The 8255
(cont
;Writing commands to the LC’)
D without checking busy flag
;PA of 8255 connected
to D0-D7 of LCD and
;PB0=RS, PB1=R/W, PB2=E for 8255 to LCD
’s control pins connection
MOV A,#80H ;all 8
255 ports as output
MOV R0,#CNTPORT ;load
control reg address
MOVX @R0,A ;issue control wordMOV A,#38H ;LCD:2 LINES, 5X7 matrixACALL NCMDWRT ;write command to LCDMOV A,#0EH ;LCD c
ommand for cursor on
ACALL NCMDWRT ;write command to LCDMOV A,#01H ;clear LCDACALL NCMDWRT ;write command to LCDMOV A,#06H ;shift cursor right commandACALL NCMDWRT ;write command to LCD.... ;etc. for all LCD commandsMOV A,#’N’ ;display data (letter N)ACALL NDATAWRT ;send data to LCD displayMOV A,#’O’ ;display data (letter O)CALL NDATAWRT ;send data to LCD display.... ;etc. for other dataProgram 15-2.