|
编了一个中断程序,在keil中运行冒的问题,为何接在仿真软件中却不能跑?请高手给指点下.具体硬件图是:P0:是段选; P2:是数码管的位选,P3.2 ~P3.6是开关.程序附下:
ORG 1000H
STAR: MOV TMOD,#60H
MOV TH1,#00H
MOV TL1,#00H
MAIN: MOV P0,#0c6h
DISP: JB P3.2, DISP
ACALL DELAY
JB P3.2,DISP
DISP1: JNB P3.2,DISP1
ACALL DELAY
JNB P3.2,DISP1
SETB TR1
DISP2: MOV A,TL1
MOVC A,@A+DPTR
MOV P0,A
CJNE A,#8eh,DISP2
LJMP STAR
TAB: db 0c0h,0f9h,0a4h,0b0h,099h,92h,82h,0f8h,080h,90h,88h,83h,0c6h;,0XA1H,0X86H,0X8EH,0X89H,0X89H,0X8CH
DELAY: MOV R2,#14H
DELAY1: MOV R3,#0FAH
DJNZ R3,$
DJNZ R2,DELAY1
RET
END
|
|