0% found this document useful (0 votes)
88 views3 pages

Interfacing LCD Display: Connection and Circuit

This document contains code for interfacing with an LCD display and writing text to it. The code initializes the LCD, clears the display, and uses commands and data to display the text "Google" repeatedly. It defines subroutines for initialization, writing data, writing commands, and clearing the display. The code controls the data/command and read/write pins to interface with the LCD.

Uploaded by

Anupa Chandan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views3 pages

Interfacing LCD Display: Connection and Circuit

This document contains code for interfacing with an LCD display and writing text to it. The code initializes the LCD, clears the display, and uses commands and data to display the text "Google" repeatedly. It defines subroutines for initialization, writing data, writing commands, and clearing the display. The code controls the data/command and read/write pins to interface with the LCD.

Uploaded by

Anupa Chandan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

DARSHAN M , 1MS10EC025 1 [Type the document title]

(4) INTERFACING LCD DISPLAY


CONNECTION AND CIRCUIT

CODE
ORG 0000H LCALL INITIALIZATION LCALL CLEAR MOV A,#'H' LCALL DATA MOV A,#'I' LCALL DATA MOV A,#8AH LCALL COMMAND MOV A,#'G' LCALL DATA MOV A,#'o' LCALL DATA MOV A,#'o' LCALL DATA MOV A,#'g' LCALL DATA MOV A,#'l' LCALL DATA MOV A,#'e' LCALL DATA AGAINS: SJMP AGAINS INITIALIZATION: MOV A,#38H

; Initialize, 2-lines, 5X7 matrix.

DARSHAN M , 1MS10EC025 2 [Type the document title] LCALL COMMAND MOV A,#0EH LCALL COMMAND MOV A,#01H LCALL COMMAND MOV A,#06H LCALL COMMAND READY: SETB P1.7 CLR P2.1 SETB P2.0 AGAIN: SETB P2.2 CLR P2.2 JB P1.7,AGAIN RET DATA: MOV P1,A SETB P2.1 CLR P2.0 SETB P2.2 CLR P2.2 LCALL READY RET COMMAND: MOV P1,A CLR P2.0 CLR P2.1 SETB P2.2 CLR P2.2 LCALL READY RET CLEAR: SETB P2.2 CLR P2.1 MOV A,#01H CLR P2.2 LCALL READY RET END

; LCD on, cursor on ; Clear LCD Screen ; Shift cursor right

; D7 as input ; RS=0 cmd ; RW=1 for read ; H->L pulse on E

; move acc. data to port ; RS=1 data ; RW=0 for write ; H->L pulse on E

; move acc. data to port ; RS=0 for cmd ; RW=0 for write ; H->L pulse on E

; enable EN ; RS=0 for cmd. ; disable EN

DARSHAN M , 1MS10EC025 3 [Type the document title]

You might also like