发表于:2007-01-07 20:38:00
24楼
汇编程序
RVC: mov tmod,#20H
mov th1, #0fdH
mov tl1, #0fdH
mov scon, #50H
mov pcon, #00H
setb tr1
mov r1,#50H(接收单元)
mov r3,#10H(接收字数)
WAIT:JBC RI,PRI(等待接收)
sjmp wait
PRI:mov a,sbuf
mov @RI,A
inc r1
djne r3,wait
不好意思 ,大小写乱了,这是单片机接收PLC的程序