9:43 AM
Interfacing of LCD with 8051 Micro-controller with program code

Aim: Interfacing of LCD with8051 Microcontroller

Requirements: 8051, 11.0592MHz Crystal, 33pF (2), 10uF, 10K, push button, 1K (10), LCD (Liquid Crystal Display), Bread Board, Connecting wires, 5V power supply.

Circuit Diagram:

 

 

Program:

 

ORG 0000H

MOV A,#38H

ACALL COM

MOV A,#0EH

ACALL COM

MOV A,#01H

ACALL COM

MOV A,#10H

ACALL COM

MOV A,#80H

ACALL COM

AGAIN: ACALL DISPLAY

MOV A,#01H

ACALL COM

SJMP AGAIN

COM: ACALL DELAY

CLR P2.0

CLR P2.1

SETB P2.2

MOV P1,A

ACALL DELAY

CLR P2.2

ACALL DELAY

RET

DATA1: ACALL DELAY

SETB P2.0

CLR P2.1

SETB P2.2

MOV P1,A

ACALL DELAY

CLR P2.2

ACALL DELAY

RET

DELAY: MOV R0,#15H

GO: MOV TMOD,#01H

MOV TL0,#0FFH

MOV TH0,#0DBH

SETB TR0

BACK: JNB TF0,BACK

CLR TR0

CLR TF0

DJNZ R0,GO

RET

DISPLAY: MOV R1,#14D

MOV A,#00H

MOV DPTR,#MYDATA

NEXT: CLR A

MOVC A,@A+DPTR

JZ OUT

ACALL DATA1

INC DPTR

CLR A

DJNZ R1,NEXT

OUT: RET

MYDATA:DB "*I LOVE INDIA*"

END

 

Learning outcomes: to be written by the students in 50-70 words.

Views: 105 | Added by: vijoriya | Tags: Program code, interfacing, 8051 Microcontroller, lcd | Rating: 0.0/0
Total comments: 0
avatar