p3.7接swr
p3.0接pin
p3.1接clk
ad0809的clk接脉冲
cs接8000h的译码电路程序:ad0809 xdata 8000h
org 0000h
ajmp main
org 0030h
main:mov dptr,#8000h
mov a,#01h
movx @dptr,a
call delay
movx a,@dptr
mov r0,a
call disp
call delay
call delay
call delay
ajmp maindisp:mov a,r0
anl a,#00001111b
acall dsend
mov a,r0
swap a
anl a,#00001111b
acall dsend
ret
dsend:mov dptr,#tab
movc a,@a+dptr
mov sbuf,a
jnb ti,$
clr ti
ret delay:mov r4,#250
delay1:mov r5,#250
djnz r5,$
djnz r4,delay1
ret
tab:db 03h 0
db 9fh 1
db 25h 2
db 0dh 3
db 99h 4
db 49h 5
db 41h 6
db 1fh 7
db 01h 8
db 09h 9
db 11h 灭
db 11h
db 0c1h
db 63h
db 85h
db 61h
db 71h
db 00h
end
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)