Usa A51 controllo lcd nokia 3310

B

bigreat

Guest
Codice:

sdin po 'p1.1

sclk po 'p1.0

dc po 'p1.2

SCE po 'p1.3

res bit p1.4
30h xadd dati; 0-83

yadd dati 31h; 0-5
lcdd dati 32h
org 0000H

JMP inizioinizio: clr res

nop

nop

setb res

mov a, # 00100001b

lcall consentire

mov a, # 10011001b

lcall consentire

mov a, # 00100000b

lcall consentire

mov a, # 00001100b

lcall consentire

lcall deldisp

mov xadd, # 00h;

mov yadd, # 00h;

lcall setadd

mov a, # 0ffh

lcall scriveresetadd: mov a, # 20h

lcall consentire

mov a, yadd

clr acc.7

setb acc.6

clr acc.5

clr acc.4

clr acc.3

lcall consentire

mov a, xadd

setb acc.7

lcall consentire

retdeldisp: mov r0, # 07

deld1: mov r1, # 84

deld2: mov a, # 00h

lcall scrivere

djnz r1, deld2

djnz r0, deld1

ret

consentire che: clr dc

scrivere: clr SCE

mov lcdd, # 08h

tot clr sclk

RLC uno

mov sdin, c

setb sclk

djnz lcdd, toto

setb dc

setb SCE

ret

fine
 

Welcome to EDABoard.com

Sponsor

Back
Top