单片机原理及应用答案(张毅刚) 下载本文

SETB 0D3H CLR TI INC DPTR MOVX A,@DPTR MOV C,P MOV MOV POP POP POP POP CLR CLR RETURN: RETI END 接收程序: ORG 0000H LJMP ORG LJMP ORG MOV TB8,C SBUF,A ACC PSW DPL DPH 0D4H 0D3H MAIN 0023H RRES

0100H MAIN: TMOD,#20H MOV SP,#60H

MOV TH1,#0F3H MOV TL1,#0F3H MOV R2,#0FFH SETB TR1

MOV DPTR,#3000H RRES: RES: L1: L2: MOV MOV SETB SETB SJMP DJNZ AJMP CLR MOV MOV JNC JNB AJMP JB MOVX INC AJMP 87H,#80H SCON,#0D0H ES EA $ R2,RES RETURN RI A,SBUF C,P L1 RB8,ERP L2 RB8,ERP @DPTR,A DPTR RETURN

ERP: SETB P1.0 CPL P1.0 RETURN: RETI END

查询方式: 发送程序 ORG 0000H MAIN: MOV MOV MOV MOV MOV MOV MOV SETB SEND: MOVX MOV MOV STI: JNB CLR INC TMOD,#20H TH1,#0F3H TL1,#0F3H 87H,#80H SCON,#0C0H DPTR,#2000H R2,#0FFH TR1 A,@DPTR C,P

TB8,C TI,STI TI DPTR

MOV SBUF,A

DJNZ R2,SEND END 接收程序: ORG 0000H

MOV TMOD,#20H MOV MOV SETB MOV MOV MOV MOV RES: JNB CLR MOV MOV JNC JNB AJMP L1: JB L2: MOVX INC TH1,#0F3H TL1,#0F3H TR1

DPTR,#3000H 87H,#80H SCON,#0D0H R2,#0FFH RI,RES RI A,SBUF C,P L1 RB8,ERP L2 RB8,ERP @DPTR,A DPTR