Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

lcd interfaced wit 89c52 coding

Status
Not open for further replies.

pnm

Junior Member level 1
Joined
Sep 2, 2010
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,409
i hav written code for lcd intitialisation and display of message which is in the program but m not getting wat changes to make for displaying a message which is stored on eeprom ?help plz

---------- Post added at 05:06 ---------- Previous post was at 05:03 ----------

hav written code in assembly language
 

Use movx command to fetch data from eeprom and then send to lcd
 

It is better if you can post your code/part with the comments then others may be able to check that properly
 

in our project we have transmitter and receiver ,so watever data is transmitted is received by the receiver and this received data we are sending it to microcontroller we are manipulating it and sending to eeprom ,from eeprom to lcd display .now we are not getting to write code for eeprom part help us in this

MOD: USING SMS/SHORT HAND TYPING IS NOT ALLOWED HERE
 
Last edited:

Are u sure that data is written to eeprom during receiving
 

LCDPRT EQU P0

;=========BITS ASSIGNMENTS ===============

EN BIT P2.7
RS BIT P2.6

;========RESET SUBROUTINE===============

ORG 00H
JMP INI

;=========== INITILIZATION SUBROUTINE=========

ORG 30H
INI:
MOV LCDPRT,#0
CALL INIDLY ;INITILIZATION 20msec DELAY
CLR RS ;INSTRUCTION MODE
SETB EN ;ENABLE

;================= LCD PORT =================

MOV LCDPRT,#01H ;CLEAR
CALL CLOCK

;===============RETURN HOME===================

MOV LCDPRT,#02H
CALL CLOCK

;==============ENTRY MODE======================

MOV LCDPRT,#00111100B ;DATA-8,LINE-2,CHR-5X8
CALL CLOCK ;3CH

;==============DISPLAY ON/OFF CONTROL==========

MOV LCDPRT,#00001100B ;DISP-ON,BLINK-OFF,CUR-OFF
CALL CLOCK ;0CH

;===============MAIN PROGRAM ====================

MAIN:
CALL LINE1
CALL LINE2
CALL LDLY
CALL LDLY
CALL LDLY
CALL LDLY
CALL LDLY
CALL LINE3
CALL LINE4
CALL LDLY
CALL LDLY
CALL LDLY
CALL LDLY
CALL LDLY
JMP MAIN

;==================================================

LINE1:
MOV LCDPRT,#80H ;CURSER SET AT 1st LINE 1st CHARACTER
CALL CLOCK
MOV DPTR,#MSG1
CALL DISPLAY
RET

;==================================================

LINE2:
MOV LCDPRT,#40H ;CURSER SET AT 2st LINE 1st CHARACTER
CALL CLOCK
MOV DPTR,#MSG2
CALL DISPLAY
RET

;==================================================

LINE3:
MOV LCDPRT,#80H ;CURSER SET AT 1st LINE 1st CHARACTER
CALL CLOCK
MOV DPTR,#MSG3
CALL DISPLAY
RET

;==================================================

LINE4:
MOV LCDPRT,#40H ;CURSER SET AT 2st LINE 1st CHARACTER
CALL CLOCK
MOV DPTR,#MSG4
CALL DISPLAY
RET

;==================================================

;============DISPLAY SUBROUTINE===================

DISPLAY:
SETB RS ;DATA MODE PRINTING MODE
MOV R0,#0H
RETURN:
MOV A,R0
MOVC A,@A+DPTR
MOV LCDPRT,A
CALL CLOCK
INC R0
CJNE R0,#20,RETURN
CLR RS
RET


;=========LCD INITILALIZATION DELAY==============
;===============DELAY OF 20 msec ================
;========== 50H * FFH = 20.4 msec ===============

INIDLY:
MOV R2,#50H
BBB:
MOV R3,#0FFH
DJNZ R3,$
DJNZ R2,BBB
RET

;===============150 uSec (SMALL DELAY) ==========
SDLY:
MOV R7,#0FFH ;255 usec DELAY
DJNZ R7,$
RET

;================= DELAY ====================
LDLY:
MOV R4,#0FFH
MOV R5,#0FFH
DJNZ R5,$
DJNZ R4,$-4
RET

;=============DELAY & EN,DISABLE===============

CLOCK:
CALL SDLY
CLR EN
CALL SDLY
SETB EN
RET

;===============================================

MSG1: DB ' NAME '
MSG2: DB ' ENGINEER '
MSG3: DB ' H E L P '
MSG4: DB ' E V E R Y O N E '
END

---------- Post added at 05:26 ---------- Previous post was at 05:24 ----------

this code just displays only messages stored in program ,but v need to display received messages

---------- Post added at 06:12 ---------- Previous post was at 05:26 ----------

org 0000h

mov r0,#00
mov r1,#00
mov r2,#00
mov r3,#00

lcall loop


loop: mov a,p2.0
cjne a,#01h, label1

LABEL1:inc r0
sjmp xx


xx:ret
end






there is bug in this code even its not working,help
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top