相关代码 |
|
;11-17-1.ASM $MOD51 ORG 0000H SJMP START ORG 0023H SJMP SERIAL ; ORG 0030H START: MOV TMOD,#21H MOV TH1,#0FDH SETB TR1 MOV SCON,#50H MOV R1,#0 SETB ES SETB EA SETB TI STOP: SJMP STOP ; SERIAL: JNB RI,NEXT CLR RI MOV A,SBUF CPL A MOV P1,A NEXT: JNB TI,EXIT CLR TI ACALL DELAY MOV A,R1 MOV SBUF,A INC R1 EXIT: RETI ; DELAY: MOV R2,#0 L1: MOV R3,#0 DJNZ R3,$ DJNZ R2,L1 RET END
相关资源 |
|