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.

Use A51 control nokia 3310 lcd

Status
Not open for further replies.

bigreat

Member level 1
Joined
Jul 11, 2004
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
278
nokia a51

Code:
sdin     bit p1.1 
sclk     bit p1.0 
dc        bit p1.2 
sce      bit p1.3 
res       bit p1.4 



xadd     data 30h ;0-83
yadd     data 31h ;0-5



lcdd      data 32h



org 0000h
JMP start

start: clr res 
         nop
         nop
         setb res
         mov a,#00100001b
         lcall enable  
         mov a,#10011001b 
         lcall  enable  
         mov a,#00100000b 
        lcall enable 
        mov a,#00001100b
        lcall enable 
        lcall deldisp  
        mov xadd,#00h ;
        mov yadd,#00h ;
        lcall setadd 
        mov a,#0ffh
        lcall write






setadd: mov a,#20h 
            lcall enable
            mov a,yadd
            clr acc.7
            setb acc.6
            clr acc.5
            clr acc.4
            clr acc.3
            lcall enable
            mov a,xadd
            setb acc.7
            lcall enable
            ret

deldisp:mov r0,#07 
deld1:  mov r1,#84 
deld2:  mov a,#00h 
           lcall write 
           djnz r1,deld2
           djnz r0,deld1
           ret
enable: clr dc 
write:    clr sce 
            mov lcdd,#08h
tot     clr sclk
            rlc a
            mov sdin,c
            setb sclk
            djnz lcdd,toto
            setb dc
            setb sce
            ret
            end
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top