bigreat
Member level 1
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