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.

Conneting ATMEL 8051 to LCD

Status
Not open for further replies.

pradyu77

Newbie level 4
Newbie level 4
Joined
Mar 21, 2006
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,323
Hey!! I have some problem conneting my ATMEL 8051 kit to an LCD.. The LCD seems to be workin well but the program i write does not seem to get transferred.. I mean i have checked the program and it seems to be perfect but I am not gettin any output in the LCD.. Do we need to initialise it separately or something?? The LCD we use is a DMC 16249 and the kit is a EDS 8051 ATMEL kit..??
 

i am attaching a simple program

This "hello world" type program for LCD

Code:
	.equ lcdrs,	p2.5	;Port pin for LCD RS pin   	
	.equ lcdrw,	p2.6	;Port pin for LCD R/W pin  	
	.equ lcden,	p2.7	;Port pin for LCD Enable pin 	


        mov a,#3ch
        acall comd
        mov a,#0eh
        acall comd
        mov a,#06h         
        acall comd
        mov a,#01h         
        acall comd
        mov a,#87h           
        acall comd
        mov a,#'h'
        acall disp
        mov a,#'e'
        acall disp
        mov a,#'l'
        acall disp
        mov a,#'l'
        acall disp
        mov a,#'o'
        acall disp
here:sjmp here


comd:
	acall ready
	mov p1,a
	clr lcdrs
	clr lcdrw
                setb lcden
                clr lcden
                ret 



disp:
	acall ready
	mov p1,a
                setb lcdrs
	clr lcdrw
                setb p3.4
	clr lcden
                ret 



ready:
	clr lcden
	mov p1,#0ffh
	clr lcdrs
                setb lcdrw
wait:
	clr lcden
                setb lcden
                jb p1.7,wait
	clr lcden
        ret 


        .end
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top