最近在搞倒車?yán)走_(dá) 其中有一個(gè)模塊是超聲波測距 哪位大俠能幫忙解釋下這段匯編程序啊!!不勝感激
- 程序面仿真圖形我想知道 通程序看 圖數(shù)碼管顯示間距離啊 ORG 0000H LJMP MAIN ORG 0003H LJMP INTT0 ORG 0013H LJMP INTT1 ORG 0030HMAIN: MOV TMOD,#01H MOV TL0,#00H MOV TH0,#00H MOV IE,#0FFH SETB IT1 CLR EX1 CLR IT0 CLR P3.4DDD: JB P1.0,JJJ SETB P3.4 SETB EX1 MOV 30H,#00H MOV 31H,#00H MOV 32H,#00HJJJ: LCALL DIS LJMP DDD INTT0: CLR P3.4 CLR EX1 RETI INTT1: MOV A,30H CJNE A,#09H,L1 MOV 30H,#00H MOV A,31H ADD A,#01H MOV 31H,A LJMP L2L1: ADD A,#01H MOV 30H,A LJMP L3L2: CJNE A,#09H,L3 MOV 31H,#00H MOV A,32H ADD A,#01H MOV 32H,A CJNE A,#09H,L3 MOV 32H,#00HL3: RETI DIS: MOV R0,#30H MOV R1,#03H MOV R2,#0FEHLLL: MOV A,R2 MOV DPTR,#0BFFFH MOVX @DPTR,A MOV A,@R0 MOV DPTR,#TAB MOVC A,@A+DPTR MOV DPTR,#7FFFH MOVX @DPTR,A LCALL TIME INC R0 MOV A,R2 RL A MOV R2,A DJNZ R1,LLL RET TIME: MOV R7,#04HKKK: MOV R6,#0FFH DJNZ R6,$ DJNZ R7,KKK RET TAB: DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FH END
-
問
提問者:網(wǎng)友
2017-08-23