新聞中心

EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 7s數(shù)碼管電子鐘匯編程序

7s數(shù)碼管電子鐘匯編程序

作者: 時(shí)間:2016-11-30 來(lái)源:網(wǎng)絡(luò) 收藏
TWO EQU 31H
THR EQU 32HFOU EQU 33HORG 0000H LJMP STARTORG 000BHLJMP INT_T0START: SETB ET0SETB EAMOV TMOD,#01HMOV TH0,#3CHMOV TL0,#0B0H;50ms初值SETB TR0MOV R5,#00HMOV DPTR,#TABLOOP:   CLR P1.0SETB P1.3MOV A,ONEMOVC A,@A+DPTRMOV P2,ALJMP DYCLR P1.3SETB P1.2MOV A,TWOMOVC A,@A+DPTRMOV P2,ALJMP DYCLR P1.2SETB P1.1MOV A,THRMOVC A,@A+DPTRMOV P2,ALJMP DYCLR P1.1SETB P1.0MOV A,FOUMOVC A,@A+DPTRMOV P2,ALJMP DYLJMP LOOPDY:  MOV R3,#200D1:  MOV R4,#100DJNZ R4,$DJNZ R3,D1RETINT_T0:MOV TH0,#3CHMOV TL0,#0B0HINC R5CJNE R5,#20,EXITMOV R5,#00HINC ONEMOV A,ONECJNE A,#10,EXITMOV ONE,#00HINC TWOMOV A,TWOCJNE A,#6,EXITMOV TWO,#00HINC THRMOV A,THRCJNE A,#10,EXITMOV THR,#00HINC FOUMOV A,FOU CJNE A,#3,EXITMOV FOU,#00HEXIT:RETITAB:   DB 01H,4FH,12H,06H,4CHDB 24H,20H,0FH,00H,04HEND


評(píng)論


技術(shù)專(zhuān)區(qū)

關(guān)閉