见笑了2*AT89C2051/24M
发送:
ks:mov tmod,#22h
mov a,#01010101b
mov th0,#230
mov tl0,#230
mov r3,#80
setb tr0
fsqs:mov r3,#160 ; 发起始位
here:jnb tf0,here ;`13US
clr tf0
cpl p3.7 ;出38k
djnz r3,here ;发完起始位
lf:mov r3,#80 ;发8位数开始
mov r4,#8
rlc a
jc bfs ;0发1不发
here1:jnb tf0,here1
clr tf0
cpl p3.7
djnz r3,here1
djnz r4,lf ;8位发完?
ftzw:setb p3.7;发停止位
mov r3,#160
here2:jnb tf0,here2
clr tf0
djnz r3,here2
ljmp fsqs ;连发01010101
bfs:setb p3.7 ;发1
here3:jnb tf0,here3
clr tf0
djnz r3,here3
djnz r4,lf
ljmp ftzw
end
接收编的太差,不好意思还是大虾自己。。。。。。。
发表时间:2002年2月1日13:52:00