中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 中斷練習(xí)--P1口輸出

        中斷練習(xí)--P1口輸出

        ——
        作者:塵封往事 時(shí)間:2007-11-02 來源:中國單片機(jī)資訊網(wǎng) 收藏
        練習(xí)
        ;p1口 

               org   00h
               ljmp  main
               org   0bh
               ljmp  time0
               org   30h
        main:  mov   tmod,#01h   ;定時(shí)器0,方式1
               mov   th0,#0d8h      ;定時(shí)初值為10ms     
               mov   tl0,#0f0h
               setb  tr0         ;啟動定時(shí)器
               mov   ie,#82h     ;定時(shí)器允許
               mov   r5,#100     ;100次為1s
               ljmp  $
        time0: push  acc
               push  psw
               mov   th0,#0d8h
               mov   tl0,#0f0h
               djnz  r5,loop               ;中斷100次到否
               mov   r5,#100
               mov   a,p1                    ; 實(shí)現(xiàn)左移
               rl    a
               mov   p1,a
        loop:  pop   psw                   ;中斷返回
               pop   acc
               reti                      

               end 
        linux操作系統(tǒng)文章專題:linux操作系統(tǒng)詳解(linux不再難懂)


        關(guān)鍵詞: 中斷 P1口 輸出 程序 嵌入式

        評論


        相關(guān)推薦

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

        關(guān)閉