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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > sonix單片機(jī)做的消毒柜

          sonix單片機(jī)做的消毒柜

          作者: 時(shí)間:2013-05-11 來源:網(wǎng)絡(luò) 收藏

          C1:
          clr combuffer
          call Adjhour
          b0 MOV a,bufferHH
          cmprs a,#0x00
          jmp C1_1
          b0 MOV a,bufferH
          cmprs a,#00
          jmp $+2
          jmp C1_1
          b0 MOV Y,#Segtable$M
          b0 MOV Z,#Segtable$L
          ; b0 MOV a,bufferH
          add Z,a
          MOV c
          jmp C1_2
          C1_1:
          MOV a,#0x00
          C1_2:
          b0 MOV P2,a
          b0bset COM0
          b0bts1 F_ON_OFF
          jmp C1_3
          b0bts0 F_STER90
          b0bset DATA8
          C1_3:
          b0bclr KMINUTE
          b0bclr KSTER90
          b0bts1 KEY1
          b0bset KSTER90
          b0bts1 KEY2
          b0bset KMINUTE
          jmp Interruptend
          C2:
          call Adjhour
          b0 MOV a,bufferHH
          cmprs a,#0x00
          jmp C2_1
          b0 MOV a,bufferL
          jmp C2_2
          C2_1:
          b0 MOV a,bufferHH
          C2_2:
          b0 MOV Y,#Segtable$M
          b0 MOV Z,#Segtable$L
          add Z,a
          MOV c
          b0 MOV P2,a
          b0bset COM1
          b0bts0 F_ON_OFF
          b0bts0 F_DELAY
          b0bts0 F_FLASH
          b0bset DOT
          b0 MOV a,bufferHH
          cmprs a,#00
          b0bclr DOT
          b0bts1 F_ON_OFF
          jmp C2_3
          b0bts0 F_STER45
          b0bset DATA8
          C2_3:
          b0bts1 F_DISPLAY_FLASH
          jmp $+7
          b0bset DOT
          b0bts0 F_FLASH1
          b0bset DOT
          b0 MOV a,bufferHH
          cmprs a,#00
          b0bclr DOT

          b0bclr KPOWER
          b0bclr KHOUR
          b0bts1 KEY1
          b0bset KPOWER
          b0bts1 KEY2
          b0bset KHOUR
          jmp Interruptend
          C3:

          call Adjhour
          b0 MOV a,bufferHH
          cmprs a,#0x00
          jmp C3_1
          call Adjminute
          C3_1:
          b0 MOV a,bufferH
          b0 MOV Y,#Segtable$M
          b0 MOV Z,#Segtable$L
          add Z,a
          MOV c
          b0 MOV P2,a
          b0bset COM2
          b0bts1 F_ON_OFF
          jmp C3_3
          b0bts0 F_DRY60
          b0bset DATA8
          C3_3:
          b0bclr KDRY30
          b0bclr KLIGHT
          b0bts1 KEY1
          b0bset KDry30
          b0bts1 KEY2
          b0bset KLIGHT
          jmp Interruptend
          C4:
          call Adjhour
          b0 MOV a,bufferHH
          cmprs a,#0x00
          jmp C4_1
          call Adjminute
          C4_1:
          b0 MOV a,bufferL
          b0 MOV Y,#Segtable$M
          b0 MOV Z,#Segtable$L
          add Z,a
          MOV c
          b0 MOV P2,a
          b0bset COM3
          b0bts1 F_ON_OFF
          jmp C4_3
          b0bts0 F_DRY30
          b0bset DATA8
          C4_3:
          b0bclr KDRY60
          b0bclr KSTER45
          b0bts1 KEY1
          b0bset KSTER45
          b0bts1 KEY2
          b0bset KDRY60

          Readkeyend:
          clr keycounter
          b0 MOV a,keybuffer
          b0 MOV databuffer,a
          Readkeyend01:
          MOV a,#0x08
          b0 MOV counter,a
          Readkeyend02:
          rrcm databuffer
          b0bts0 FC
          incms keycounter
          nop
          decms counter
          jmp Readkeyend02
          b0 MOV a,keycounter
          cmprs a,#0x01
          jmp Readkeyend06
          b0 MOV a,keybuffer
          cmprs a,keybuffercopy
          jmp Readkeyend04
          b0bts0 KMINUTE
          jmp Readkeyend03
          b0bts1 KHOUR
          jmp Readkeyend06
          Readkeyend03:
          b0 MOV a,keytime
          cmprs a,#0
          jmp Interruptend
          b0bset F_NO_TONE
          MOV a,#40
          jmp Readkeyend05
          Readkeyend04:
          b0 MOV a,keybuffer
          b0 MOV keybuffercopy,a
          b0bclr F_NO_TONE
          MOV a,#100
          Readkeyend05:
          b0 MOV keytime,a
          b0bset F_KEY
          jmp Interruptend
          Readkeyend06:
          b0 MOV a,keybuffer
          b0 MOV keybuffercopy,a
          MOV a,#100
          b0 MOV keytime,a
          b0bclr F_KEY
          b0bclr F_NO_TONE
          Interruptend:
          b0bts1 F_DISPLAY_FLASH
          jmp $+3
          b0bts1 F_FLASH1
          clr P2
          Interruptend01:
          clr INTRQ
          b0xch a,pflagbuffer
          b0xch a,PFLAG
          b0xch a,accbuffer
          reti
          ;*******************
          Adjhour:
          b0bts0 F_DISPLAY_FLASH
          jmp Adjhour04
          b0bts0 F_DELAY
          jmp Adjhour01
          b0bts0 F_STER
          jmp Adjhour03
          b0bts0 F_DRY
          jmp Adjhour03
          Adjhour01:
          b0 MOV a,hour
          cmprs a,#0x00
          jmp Adjhour02
          MOV a,#12
          jmp Tobcd
          Adjhour02:
          b0 MOV a,hour
          jmp Tobcd
          Adjhour03:
          b0 MOV a,Dminute
          jmp Tobcd
          Adjhour04:
          b0 MOV a,Dminute_Dry
          jmp Tobcd
          ;**************
          Adjminute:
          b0bts0 F_DISPLAY_FLASH
          jmp Adjminute03
          b0bts0 F_DELAY
          jmp Adjminute01
          b0bts0 F_STER
          jmp Adjminute02
          b0bts0 F_DRY
          jmp Adjminute02
          Adjminute01:
          b0 MOV a,minute
          jmp Tobcd
          Adjminute02:
          b0 MOV a,Dsecond
          jmp Tobcd
          Adjminute03:
          MOV a,#0
          ;\\\\\\\\
          Tobcd:
          b0 MOV bufferL,a
          clr bufferHH
          clr bufferH
          Tobcd01:
          b0 MOV a,bufferL
          sub a,#10
          b0bts1 FC
          jmp Tobcd02
          b0 MOV bufferL,a
          incms bufferH
          jmp Tobcd01
          Tobcd02:
          add a,#10
          b0 MOV bufferL,a
          Tobcd03:
          b0 MOV a,bufferH
          sub a,#10
          b0bts1 FC
          jmp Tobcd04
          b0 MOV bufferH,a
          incms bufferHH
          jmp Tobcd03
          Tobcd04:
          add a,#10
          b0 MOV bufferH,a
          ret
          ;\\\\\

          ;**********************
          Clrstatus:
          b0bclr F_ON_OFF
          b0bclr F_FINISH
          Clrstatus01:
          clr flag1
          clr fantime
          b0bclr DRY
          b0bclr STER
          b0bclr FAN
          ret
          ;\\\\
          Sum:
          MOV a,#7
          b0 MOV counter,a
          clr Y
          clr Z
          b0 MOV a,@YZ
          Verify01:
          incms Z
          add a,@YZ
          decms counter
          jmp Verify01
          b0 MOV databuffer,a
          ret
          ;*****************
          Start:
          clr OSCM
          clr PFLAG
          MOV a,#11110011b
          b0 MOV P1M,a
          MOV a,#11111111b
          b0 MOV P2M,a
          b0 MOV P5M,a
          @SET_PUR 0x23

          call Sum
          MOV a,databuffer
          cmprs a,sumbuffer
          jmp Verify03
          MOV a,#0x09
          b0 MOV counter,a
          clr Y
          clr Z
          Verify02:
          b0 MOV a,@YZ
          cmprs a,#0x00
          jmp Verify04
          incms Z
          nop
          decms counter
          jmp Verify02
          Verify03:
          clr P1
          clr P2
          clr P5
          Init:
          clr Y
          clr Z
          Init01:
          MOV a,#0
          b0 MOV @YZ,a
          incms Z
          MOV a,#0x7f
          cmprs a,Z
          jmp Init01
          b0bset TONE_ENABLE
          jmp Init02
          Verify04:
          b0 MOV a,P1copy
          b0 MOV P1,a
          b0 MOV a,P2copy
          b0 MOV P2,a
          b0 MOV a,P5copy
          b0 MOV P5,a
          Init02:
          MOV a,#0xb0 ;1:32
          b0 MOV TC1M,a
          MOV a,#131
          b0 MOV TC1C,a
          b0bset FTC1IEN
          b0bset FGIE
          clr INTRQ
          Main:
          b0bset FWDRST
          call Sum
          b0 MOV a,databuffer
          b0 MOV sumbuffer,a
          b0 MOV a,P1
          b0 MOV P1copy,a
          b0 MOV a,P2
          b0 MOV P2copy,a
          b0 MOV a,P5
          b0 MOV P5copy,a

          b0bts1 F_FINISH
          jmp main00
          call Clrstatus
          jmp Keyactive01


          關(guān)鍵詞: sonix單片機(jī) 消毒柜

          評論


          相關(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); })();