⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 remote.inc

📁 使用三菱芯片开发的空调程序,具有低压保护功能
💻 INC
📖 第 1 页 / 共 2 页
字号:
Vect_TimerY:             ;cai yong cha xun fang shi mei 0.25ms
      PHA
      TXA
      PHA
      clb      ty_request
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;clb      B_Remote        no use   20051017
      bbc      b_remoteBit,low     ;2,port4  di dian ping tiaozhuan
      clb      f_state             ;gao dian ping wei ling
      bra      transit
low:
      nop
      nop
      nop
      bbs      b_remoteBit,high     ;2,port4
      seb      f_state             ;DI DIAN PING
      bra      transit
high:
     clb       f_state              ;GAO DIAN PING
transit:                                     ;ce liang dian ping de  chang du
     a = [f_remote] & 03h
     [c_state] = ++[c_state]
     if a==00h || a==03h
                bbc  f_state,end_trans
                a= [c_state] & 0F0h
                if a == 0F0h
                        jmp endcheck
                endif
     end_trans:
                jmp      endall      ;tuichu ding shi cha xue zhongduan
     else
                a = [f_remote]
                eor   #02h
                sta   f_remote
     endif
l_stage:
        if [c_stage] < 06h                ;dai biao shi yao kong ma de na yi jie duan
                x = [c_stage]
                [w_work0] =[t_hcsdl,x]
                [w_work1] =[t_hcsdh,x]
                jmp   (w_work0)
        else
                [c_stage]=00h
                [c_data] =00h
                [c_bit]  =00h
                [c_sep]  =00h
                jmp    endall
        endif
l_start:
        [c_state] = 0
        inc   c_stage
        jmp   endall
l_head:
    if  [f_state] == 0          ;2005-11-27 10:32
        if [c_state] > [n_hdmax_U] || [c_state] < [n_hdmin_U]     ;6ms
             if [c_state] > [n_hdmax] || [c_state] < [n_hdmin] ;9ms
                     jmp endcheck
             else
                     [c_state] =00h
                     inc     c_stage
                     jmp     endall
             endif
                [b_Round_Uremote] = 0
        else
                [b_Round_Uremote] = 1
                [c_state] =00h
                inc     c_stage
                jmp     endall
        endif
   else                       ;2005-11-27 11:15
        jmp endcheck
   endif
        
l_sep1:
    if   [b_Round_Uremote] == 1   ;20051017
                if [c_state] > [n_sepmax_U] || [c_state] < [n_sepmin_U]   ;3
                    jmp      endcheck
                    [b_Round_Uremote] = 0
                else
                    [c_state] =00h
                    LDM     #00H,remotecount
                    LDM     #03H,f_remote
                    [remote_end] = 0
                    ;SEB     Ok_flag
                    inc     c_stage
                    jmp      endall
                endif
    else
        if [c_state] > [n_sepmax] || [c_state] < [n_sepmin] ;4.5ms
                    jmp      endcheck
        else
                [c_state] =00h
                LDM     #00H,remotecount
                LDM     #03H,f_remote
                [remote_end] = 0
                ;SEB     Ok_flag             ; add 2000,6,6 for Eeprom
                inc     c_stage
                jmp      endall
        endif
    endif
l_data:
    if   [b_Round_Uremote] == 1   ;20051017
        jsr     s_code_U
        if   [f_finish] == 0
                jmp     endall
        endif
        clb     f_finish
        inc     c_stage
        [c_state] = 00h
    else                                 ;20051017
        jsr     s_code
        if   [f_finish] == 0
                jmp     endall
        endif
        clb     f_finish
        inc     c_stage
        [c_state] = 00h
    endif
l_custom:
        [c_sep]=++[c_sep]
        if [w_code] == 5Ah
            if   [b_Round_Uremote] == 1   ;20051017
                [c_state]=00h
                ;CLB     Ok_flag
                [b_Round_Uremote] = 0
                [M_RoomTempremote] = [temp_code]
                [Round_Utimes] = 0         ;2005-11-9 15:50
                [Round_Utimem] = 0         ;2005-11-9 15:50
                [temp_code] = 0
                ;[Custom_code] = 0
                JSR     clrremote  ;2005-11-4 0:22
                ;[remote_end] = 1   ;2005-11-4 0:22
                jmp     endall
            else
                if [b_SigerCool] == 1 && [m_ir2mode] & 0F0H == 11000000B        ; 2002.2.25
                        jmp     endcheck
                endif
                [c_state]=00h
                ;CLB     Ok_flag       ;20051018  pingbi suoyou de gai wei ,yin wei meiyong
                JSR     Fun_SaveRemote
                JSR     clrremote
                jsr     buzzerselc


                [m_del3ssave] = 00h
                [b_remamber] = 1
                [setsecond] = 0
                [shinktime] = 0

                if  [ir1_onoff] == 1
                        [key_first] = 1
                endif
                ldm     #00h,soundtime
                [remote_end] = 1
                CLB     b_LEDflash
                jmp     endall
             endif
        else
                [b_Round_Uremote] = 0   ;2005-11-3 22:36
                jmp     endcheck
        endif
l_sep2:
        if [c_sep] == 02h
                [c_sep] =00h
                [c_state]=00h
                inc c_stage
         endif
         jmp    endall

s_final:
        if [w_code] == [w_pcode]
                [w_ecode]  = [w_code]
        else
                [w_pcode]  = [w_code]
        endif
        clb     f_ng
        jmp     endall
endcheck:
        a=[f_remote]
        eor   #08h
        [f_remote] = a
        bbs     f_ng,l_contin
        if [w_pcode] == 0ffh
                [w_ecode] = 0ffh
        else
                [w_pcode] = 0ffh
        endif
l_contin:
        [c_stage] = 01h
        [c_state] = 00h
        [c_data ] = 00h
        [c_bit]   = 00h
        [c_sep]   = 00h
        [b_Round_Uremote] = 0 ;2005-11-4 0:09  2005-11-5 17:38
endall:                      ;ding shiqi chong xin kaishi jishi ,tui chu cha xun zhong duan
        CLB     Start_timerY
        pla
        tax
        pla
        rti
;=================code detection routine=================
s_code:
        [c_data] = ++[c_data]
        if [c_data]  == 02h               ;1 high + 1 low = 1 bit  jie shou wan cheng
                [c_data]  = 00h
                [c_bit]  =++[c_bit]
                if [c_state] >= 2 && [c_state] <= 14
                        if [c_state] >=8
                                sec
                        else
                                clc
                        endif
                else
                        seb      f_finish
                        [w_code] =0ffh
                        jmp     end_s1
               endif
               ROR      w_code              ;ROR
               ROR      m_ir2else
               ROR      m_ir2TimerOff
               ROR      m_ir2TimerOnOff
               ROR      m_ir2TimerOn
               ROR      m_ir2ClockHigh
               ROR      m_ir2ClockLow
               ROR      m_ir2fantem
               ROR      m_ir2mode
               [c_state] = 00h
               inc      remotecount
               if [remotecount] >= 68   ;35
                        [remotecount] = 00h
                        seb      f_finish
                        [c_sep]=++[c_sep]
               else
                        clb      f_finish
               endif
          endif
end_s1:
          rts
s_code_U:
         [c_data] = ++[c_data]
        if [c_data]  == 02h               ;1 high + 1 low = 1 bit  jie shou wan cheng
                [c_data]  = 00h
                [c_bit]  =++[c_bit]
                if [c_state] >= 2 && [c_state] <= 14

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -