ORG 0000H LJMP J100 ORG 0810H J100: MOV A,#00H J101: JB P3.3,J101 MOV R2,#10H LCALL DELY JB P3.3,J101 ;P3.3电平为低吗? J102: JNB P3.3,J102 MOV R2,#10H LCALL DELY JNB P3.3,J102 ;P3.3电平为高吗? INC A ;加1 PUSH ACC CPL A ;取反 MOV P1,A ;驱动发光二极管 POP ACC AJMP J101 ;循环 DELY: PUSH 02H DEL2: PUSH 02H DEL3: PUSH 02H DEL4: DJNZ R2,DEL4 ;延时 POP 02H DJNZ R2,DEL3 POP 02H DJNZ R2,DEL2 POP 02H DJNZ R2,DELY RET END 谁能解释一下,程序中为什么要用延时程序啊 (LCALL DELY),还有延时是多长时间,做梦实现的啊! |