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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 芯海單片機(jī)定時(shí)中斷

          芯海單片機(jī)定時(shí)中斷

          作者: 時(shí)間:2016-11-30 來源:網(wǎng)絡(luò) 收藏
          ;============================================
          ; filename: 定時(shí)器.asm
          ; chip : csu1181b
          ; author :
          ; date : 2012-08-14
          ;============================================
          include csu1181b.inc
          ;============================================
          ; program start
          ;============================================
          org 000h
          GOTO A1
          ORG 004H ;中斷入口地址
          GOTO DS01
          ORG 05H
          ;**********************************************
          ; 主程序及設(shè)置
          ;**********************************************
          A1:
          MOVLW 0FFH ;
          MOVWF PT3EN ;設(shè)置PT3為輸出模式
          MOVWF PT3 ;PT3輸出高電平
          MOVLW 00001111B ;
          MOVWF TMCON ;設(shè)置中斷源中斷時(shí)間(1S)及復(fù)位計(jì)數(shù)器
          BCF INTF,TMIF ;清定時(shí)中斷標(biāo)志
          MOVLW 10010000B ;
          MOVWF INTE ;開定時(shí)中斷及總中斷
          GOTO $
          ;************************************************
          ; 定時(shí)中斷程序
          ;************************************************
          DS01: MOVLW 0 ;
          MOVWF INTE ;關(guān)閉中斷
          BTFSS INTF,TMIF ;判斷是否發(fā)生定時(shí)中斷
          GOTO DS02 ;
          COMF PT3,1 ;取反PT3
          BCF INTF,TMIF ;清定時(shí)中斷標(biāo)志
          DS02: MOVLW 10010000B ;
          MOVWF INTE ;開定時(shí)中斷及總中斷
          RETFIE ;中斷返回
          ;***********************************************
          ; 結(jié)束
          ;***********************************************
          end
          ;============================================


          評(píng)論


          技術(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); })();