<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 用8031單片機(jī)控制的數(shù)字鐘

          用8031單片機(jī)控制的數(shù)字鐘

          作者: 時(shí)間:2012-02-17 來(lái)源:網(wǎng)絡(luò) 收藏

          MOV A,30H
          MOVX @R1,A
          MOV R0,31H
          MOV A,@R0
          MOV DPTR,#SC
          MOVC A,@A+DPTR
          MOV R1,#22H
          MOVX @R1,A
          LCALL D1
          MOV A,30H
          RR A
          MOV 30H,A
          DEC 31H
          DJNZ R7,SS1
          DJNZ R6,SS2
          RET
          SC: DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H,0FFH
          KEY: MOV 42H,#00H
          A0: MOV P1,#0FFH
          MOV A,P1
          ANL A,#38H
          MOV R3,A
          LCALL DELAY
          MOV P1,#0FFH
          MOV A,P1
          ANL A,#38H
          CLR C
          SUBB A,R3
          JNZ A0
          MOV A,R3
          CJNE A,#38H,A00
          SJMP A0
          A00: CJNE A,#30H,TOK2
          INC 41H
          MOV R2,41H
          CJNE R2,#3CH,A1
          MOV 41H,#00H
          A1: MOV P1,#0FFH
          MOV A,P1
          ANL A,#08H
          JNZ A0
          LCALL DELAY
          SJMP A1
          TOK2: CJNE A,#28H,TOK3
          DEC 41H
          MOV R2,41H
          CJNE R2,#0FFH,A2
          MOV 41H,#3BH
          A2: MOV P1,#0FFH
          MOV A,P1
          ANL A,#10H
          JNZ A0
          LCALL DELAY
          SJMP A2
          TOK3: CJNE A,#18H,A0
          AA: MOV P1,#0FFH
          MOV A,P1
          ANL A,#20H
          JNZ A3
          LCALL DELAY
          SJMP AA
          A3: MOV P1,#0FFH
          MOV A,P1
          ANL A,#38H
          MOV R3,A
          LCALL DELAY
          MOV P1,#0FFH
          MOV A,P1
          ANL A,#38H
          CLR C
          SUBB A,R3
          JNZ A3
          MOV A,R3
          CJNE A,#38H,A33
          SJMP A3
          A33: CJNE A,#30H,TO2
          INC 40H
          MOV R2,40H
          CJNE R2,#18H,A4
          MOV 40H,#00H
          A4: MOV P1,#0FFH
          MOV A,P1
          ANL A,#08H
          JNZ A3
          LCALL DELAY
          SJMP A4
          TO2: CJNE A,#28H,TO3
          DEC 40H
          MOV R2,40H
          CJNE R2,#0FFH,A5
          MOV 40H,#17H
          A5: MOV P1,#0FFH
          MOV A,P1
          ANL A,#10H
          JNZ A3
          LCALL DELAY
          SJMP A5
          TO3: CJNE A,#18H,A3
          RET
          KEY0: MOV 41H,21H
          MOV 40H,20H
          CLR TR0
          ACALL KEY
          CLR PSW.5
          MOV 22H,42H
          MOV 21H,41H
          MOV 20H,40H
          MOV TL0,#0B7H
          MOV TH0,#3CH
          SETB TR0
          RET
          KEY1: MOV 41H,51H
          MOV 40H,50H
          LCALL KEY
          CLR 7FH
          MOV 51H,41H
          MOV 50H,40H
          RET
          D1: MOV R4,#02H
          D11: MOV R5,#0FFH
          DJNZ R5,$
          DJNZ R4,D11
          RET
          DELAY: PUSH ACC
          LCALL CUTIN1
          LCALL SSCAN
          POP ACC
          RET

          本文引用地址:http://www.ex-cimer.com/article/172074.htm


          上一頁(yè) 1 2 下一頁(yè)

          關(guān)鍵詞: 數(shù)字 控制 單片機(jī)

          評(píng)論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();