49F72-GRDL31CC(debug)_a.asm
上传用户:bjrpdx
上传日期:2019-10-15
资源大小:5k
文件大小:29k
- ; original File = D:数字点火器源程序目标代码31CC程序49F72-GRDL31CC.HEX
- processor 12F629
- #include <P12F629.INC>
- __config 0x3E44
- ; _CPD_ON & _CP_ON & _BODEN_ON & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF
- ; & _INTRC_OSC_NOCLKOUT
- ; RAM-Variable
- flaga equ 0x20
- flagb equ 0x21
- LRAM_0x22 equ 0x22
- LRAM_0x23 equ 0x23
- LRAM_0x26 equ 0x26
- LRAM_0x29 equ 0x29
- LRAM_0x2A equ 0x2A
- LRAM_0x2C equ 0x2C
- COPY_TMR1H equ 0x30
- COPY_TMR1L equ 0x31
- LRAM_0x32 equ 0x32
- LRAM_0x33 equ 0x33
- RAM_34_TALB_L equ 0x34
- LRAM_0x35 equ 0x35
- LRAM_0x36 equ 0x36
- LRAM_0x37 equ 0x37
- LRAM_0x38 equ 0x38
- LRAM_0x39 equ 0x39
- SUM_TMR1H equ 0x3A
- LRAM_0x3C equ 0x3C
- LRAM_0x3D equ 0x3D
- LRAM_0x3E equ 0x3E
- LRAM_0x3F equ 0x3F
- LRAM_0x40 equ 0x40
- LRAM_0x41 equ 0x41
- LRAM_0x42 equ 0x42
- LRAM_0x43 equ 0x43
- SUM_TMR1L equ 0x44
- RAM_45_TMR1H equ 0x45
- RAM_46_TMR1L equ 0x46
- LRAM_0x48 equ 0x48
- LRAM_0x49 equ 0x49
- LRAM_0x4A equ 0x4A
- LRAM_0x4B equ 0x4B
- LRAM_0x4C equ 0x4C
- LRAM_0x4D equ 0x4D
- LRAM_0x4E equ 0x4E
- LRAM_0x4F equ 0x4F
- LRAM_0x51 equ 0x51
- LRAM_0x52 equ 0x52
- TM0_INTCOUNT equ 0x56
- LRAM_0x57 equ 0x57
- RAM_58_TALB_H equ 0x58
- LRAM_0x59 equ 0x59
- LRAM_0x5A equ 0x5A
- FLAGC equ 0x5B
- LRAM_0x5C equ 0x5C
- LRAM_0x5D equ 0x5D
- LRAM_0x5E equ 0x5E
- #DEFINE flag0 flaga,0
- #DEFINE flag1 flaga,1
- #DEFINE flag2 flaga,2
- #DEFINE flag3 flaga,3
- #DEFINE flag4 flaga,4
- #DEFINE flag5 flaga,5
- #DEFINE flag6 flaga,6
- #DEFINE flag7 flaga,7
- #DEFINE flag8 flagb,0
- #DEFINE flag9 flagb,1
- #DEFINE flag10 flagb,2
- #DEFINE flag11 flagb,3
- ; Program
- Org 0x0000
- ; Reset-Vector
- NOP
-
- GOTO LADR_0x0076
- Org 0x0004
- ; Interrupt-Vector ;中断程序入口
- MOVWF LRAM_0x29 ;将W内容送LRAM_0x29保存
- MOVF STATUS,W ;将状态寄存器内容送W
- MOVWF LRAM_0x2A ;将W内容送LRAM_0x2A保存,即保存状态寄存器内容于LRAM_0x2A
- MOVF TM0_INTCOUNT,W ;将TM0_INTCOUNT内容送W
- XORLW 0xFF ;将W与0xff相或
- BTFSC STATUS,Z
- GOTO LADR_0x000E ;TM0_INTCOUNT内容为0xff则跳转到LADR_0x000E执行
- BCF INTCON,T0IF ;TM0_INTCOUNT内容不是0xff则清除TMR0 溢出中断标志位
- INCF TM0_INTCOUNT,F ;TM0_INTCOUNT内容+1
- GOTO LADR_0x0021 ;跳转到LADR_0x0021执行
-
- LADR_0x000E
- BTFSS flag5 ;判flaga。5是否为“1”
- GOTO LADR_0x001E ;flaga。5不为“1”则跳转LADR_0x001E执行
- BTFSC flag4 ;flaga。5为“1”则再判flaga。4是否为“0”
- GOTO LADR_0x001E ;flaga。4不为“0” 则跳转LADR_0x001E执行
- BSF GPIO,0 ;flaga。4为“0” 则 GP0为高“1” ; !!Bank!! GPIO - TRISIO
- MOVLW 0x11 ;将立即数0x11送W寄存器
- MOVWF LRAM_0x2C ;将立即数0x11送LRAM_0x2C 暂存
-
- LADR_0x0015
- DECFSZ LRAM_0x2C,F ;LRAM_0x2C-1并为0则隔一条指令执行,否则顺序执行
- GOTO LADR_0x0015
- BCF GPIO,0 ;LRAM_0x2C为0后GP0为低“0” ; !!Bank!! GPIO - TRISIO
- MOVLW 0xFA ;将立即数0xFA送W寄存器
- BTFSS flag7 ;判flaga.7是否为“1”
- MOVLW 0x64 ;flaga.7不为“1”则将立即数0x64送LRAM_0x2C 暂存
- MOVWF LRAM_0x2C ;flaga.7为“1”则将立即数0xfa送LRAM_0x2C 暂存
-
- LADR_0x001C
- DECFSZ LRAM_0x2C,F ;LRAM_0x2C-1并为0则隔一条指令执行,否则顺序执行
- GOTO LADR_0x001C
-
- LADR_0x001E
- BSF flag4 ;LRAM_0x2为0时将 flaga.4 置“1”
- BCF INTCON,T0IE ;清除TMR0 溢出中断使能位
- BCF INTCON,T0IF ;清除TMR0 溢出中断标志位
-
- LADR_0x0021
- MOVF LRAM_0x2A,W
- MOVWF STATUS
- SWAPF LRAM_0x29,F ;还原状态寄存器值
- SWAPF LRAM_0x29,W ;还原累加器W值
- RETFIE ;中断返回
- LADR_0x0026
- BSF STATUS,RP0 ;
- MOVLW 0x80
- MOVWF TMR0 ;
- BCF STATUS,RP0 ;
- BCF INTCON,GIE
- MOVF RAM_34_TALB_L,W
- MOVWF LRAM_0x57
- MOVWF TMR0 ;
- MOVF RAM_58_TALB_H,W
- MOVWF TM0_INTCOUNT
- CLRF INTCON
- BSF INTCON,GIE
- BSF INTCON,T0IE
- BCF flag4
- RETURN
-
- LADR_0x0035
- MOVF LRAM_0x32,W
- MOVWF LRAM_0x33
-
- LADR_0x0037
- BCF STATUS,C
- RRF COPY_TMR1H,F
- RRF COPY_TMR1L,F
- DECFSZ LRAM_0x33,F
- GOTO LADR_0x0037
- CLRF LRAM_0x33
- MOVF COPY_TMR1L,W
- RETURN
-
- LADR_0x003F
- MOVF RAM_46_TMR1L,W
- ADDWF SUM_TMR1L,F
- BTFSS STATUS,C
- GOTO LADR_0x0049
- MOVLW 0x01
- ADDWF SUM_TMR1H,F
- BTFSS STATUS,C
- GOTO LADR_0x0049
- MOVLW 0x01
- ADDWF LRAM_0x39,F
-
- LADR_0x0049
- MOVF RAM_45_TMR1H,W
- ADDWF SUM_TMR1H,F
- BTFSS STATUS,C
- GOTO LADR_0x004F
- MOVLW 0x01
- ADDWF LRAM_0x39,F
- LADR_0x004F
- RETURN
- LADR_0x0050
- BCF flag9 ;以下是一个双字节减法子程序
- MOVF RAM_46_TMR1L,W ;
- SUBWF SUM_TMR1L,F ;
- BTFSC STATUS,C
- GOTO LADR_0x0059 ;
- MOVLW 0x01 ;
- SUBWF SUM_TMR1H,F
- BTFSS STATUS,C ;
- BSF flag9 ;
-
- LADR_0x0059
- MOVF RAM_45_TMR1H,W
- SUBWF SUM_TMR1H,F
- BTFSC flag9
- BCF STATUS,C ;如果C为1则返回的是够减,否则标示不够减
- RETURN ;以上是一个双字节减法子程序
- LADR_0x005E
- BTFSC STATUS,C ;
- RETURN ;
- COMF SUM_TMR1L,F
- COMF SUM_TMR1H,F
- MOVLW 0x01 ;SUM_TMR1H(h),SUM_TMR1L(l)求反+1
- ADDWF SUM_TMR1L,F
- BTFSS STATUS,C
- RETURN ;子程序返回
- MOVLW 0x01
- ADDWF SUM_TMR1H,F
- RETURN ;子程序返回
-
- LADR_0x0069
- DECFSZ LRAM_0x26,F ;LRAM_0x26单元递减1做段小延时
- GOTO LADR_0x0069
- CLRF LRAM_0x26 ;延时到则清除LRAM_0x26单元
- RETURN ;子程序返回
-
- LADR_0x006D
- MOVLW 0xAA
- MOVWF LRAM_0x26
- GOTO LADR_0x0069
-
- LADR_0x0070 ;因GP2为1所以调用此子程序段
- MOVLW 0x10
- MOVWF LRAM_0x26 ;将立即数0x10通过W传送到LRAM_0x26单元
- GOTO LADR_0x0069 ;跳往LADR_0x0069去执行
-
- LADR_0x0073
- MOVLW 0x46
- MOVWF LRAM_0x26
- GOTO LADR_0x0069
-
- LADR_0x0076
- CALL LADR_0x03FF ;调用 LADR_0x03FF子程序段
- BSF STATUS,RP0 ;选择存储器1体!!Bank Register-Bank(0/1)-Select
- MOVWF OSCCAL ;将0x80数值送TIMER1 控制寄存器(!!Bank!! T1CON - OSCCAL
- ;=================================================================
- ;bit6(选通使能位)=0 启动Timer1
- ;bit5,4=00 预分频值为1:1
- ;bit3=0 LP 振荡器关闭
- ;bit2=0 与外部时钟输入同步
- ;bit1=0 内部时钟(FOSC/4)
- ;bit0(启动控制位)=0 停止Timer1
- ;=================================================================
- BCF STATUS,RP0 ; 选择存储器0体 !!Bank Register-Bank(0/1)-Select
- MOVLW 0x07
- MOVWF CMCON ; 将0x07数值送比较器控制寄存器 !!Bank!! CMCON - VRCON
- ;=================================================================
- ;bit6(比较器输出位)
- ;当bit4 = 0 时:
- ;bit6 =1-- VIN+ > VIN-
- ;bit6 =0-- VIN+ < VIN-
- ;当bit4 = 1 时:
- ;bit6 =1-- VIN+ < VIN-
- ;bit6 =0-- VIN+ > VIN
- ;bit5=nc
- ;bit4(比较器输出翻转位) bit4=0--输出不翻转; bit4=1--输出翻转
- ;bit3(比较器输入开关位)
- ;当bit2:bit0 = 110 或101 时:
- ;bit3 =1--- VIN- 连接到CIN+
- ;bit3 =0--- VIN- 连接到CIN-
- ;bit2-0 CM2:CM0:比较器模式位
- ;=================================================================
- CLRF TMR0 ; 清除定时器0数据 !!Bank!! TMR0 - OPTION_REG
- CLRF GPIO ; GP0口输出低电平 !!Bank!! GPIO - TRISIO
- CLRF INTCON ; 清除中断控制器内容
- CLRF PIR1 ; 清除外设中断寄存器1 !!Bank!! PIR1 - PIE1
- CLRF TMR1H ; !!Bank!! TMR1H - Unimplemented
- CLRF TMR1L ; !!Bank!! TMR1L - PCON
- MOVLW 0x14
- MOVWF T1CON ; 将0x14送TIMER1 控制寄存器 !!Bank!! T1CON - OSCCAL
- ; Timer1--不与外部时钟输入同步,内部时钟(FOSC/4),预分频值为1:2
- ; 停止计数
- MOVLW 0x85
- MOVWF LRAM_0x35 ; 将立即数0x85通过W送往LRAM_0x35
- BSF STATUS,RP0 ; 选择特殊功能寄存器1体 !!Bank Register-Bank(0/1)-Select
- MOVLW 0x85
- MOVWF OPTION_REG ; 将初始数据0x85通过W送往OPTION_REG !!Bank!! TMR0 - OPTION_REG
- MOVLW 0xFE
- MOVWF TRISIO ;
- CLRF PIR1 ;
- CLRF WPU ;
- CLRF IOCB ;
- CLRF CMCON ;
- CLRF EEDATA ;
- CLRF EEADR ;
- CLRF EECON1 ;
- BCF STATUS,RP0 ;
- ; 以上这些都是对特殊功能寄存器初始化工作
- ;===============================================================
- ;###############################################################
- MOVLW 0x20
- MOVWF FSR
-
- LADR_0x0095
- CLRF INDF
- INCF FSR,F
- MOVLW 0x60
- XORWF FSR,W
- BTFSS STATUS,Z
- GOTO LADR_0x0095
- ; 以上片段是清除内存工作
- ;###############################################################
- CLRF INTCON
- CLRF PIR1 ;
- BCF T1CON,0 ;
- BCF GPIO,0 ;
- CLRF flaga
- CLRF flagb
- LADR_0x00A0
- BTFSS GPIO,2 ; ★★★检测开始了 !!Bank!! GPIO - TRISIO
- GOTO LADR_0x00A0
- CALL LADR_0x0070 ; 如果GP2为1那么,调用LADR_0x0070程序段
- BTFSS GPIO,2 ; !!Bank!! GPIO - TRISIO
- GOTO LADR_0x00A0 ; 经过一段时间延时,再判GP2如果是低电平则继续延时判定
-
- LADR_0x00A5
- BTFSC GPIO,2 ;
- GOTO LADR_0x00A5
- CALL LADR_0x0070
- BTFSC GPIO,2 ;
- GOTO LADR_0x00A5
- ;===============================================================
- ;经过一个从低到高再到低的一个脉冲回到这里将往下执行
- CLRF TMR1H ;
- CLRF TMR1L ;
- BSF T1CON,0 ;
- CLRF PIR1 ;
- BSF flag6
- ;--------------------清空计数器1的高低数据单元并将 flaga.6置“1”
- LADR_0x00AF
- CALL LADR_0x03FF ; 0x80数据送W
- BSF STATUS,RP0 ;
- MOVWF OSCCAL ; 将W中的数据送T1CON
- NOP
- MOVLW 0xFE ; 确定GP0为输出口,其余为输入口
- MOVWF GPIO ;
- CLRF PIR1 ;
- CLRF WPU ;
- CLRF IOCB ;
- CLRF CMCON ;
- BCF STATUS,RP0 ;
- MOVLW 0x01
- ANDWF GPIO,F ;
- MOVLW 0x01
- ANDWF PIR1,F ;
- MOVLW 0x07
- MOVWF CMCON ;
- LADR_0x00C0
- BTFSS GPIO,2 ;
- CALL LADR_0x0070
- BTFSS GPIO,2 ;
- GOTO LADR_0x00C0
-
- LADR_0x00C5
- BTFSC GPIO,2 ;
- GOTO LADR_0x00C5
- MOVLW 0x05
- MOVWF LRAM_0x26
-
- LADR_0x00C9
- BTFSC GPIO,2 ;
- GOTO LADR_0x00C5
- DECFSZ LRAM_0x26,F
- GOTO LADR_0x00C9
- BTFSC GPIO,2 ;
- GOTO LADR_0x00C5
-
- ;======================================================== ; 再经历一个从低到高在到低的脉冲后,停止计数
- BCF T1CON,0 ; !!Bank!! T1CON - OSCCAL
- ;========================================================
- ; 将计数器高位值存放到TCOPY_TMR1H中,将计数器低位值存放到COPY_TMR1L中
- MOVF TMR1H,W ;
- MOVWF COPY_TMR1H
- MOVF TMR1L,W ;
- MOVWF COPY_TMR1L
- ;========================================================
- ; 清除两个计数器值
- CLRF TMR1H ;
- CLRF TMR1L ;
-
- MOVLW 0x15
- MOVWF T1CON ; 重置计数器1的控制寄存器分频比
- BCF flag8 ; 清除flag8
- MOVF LRAM_0x51,W ; 将LRAM_0x51内容送SUM_TMR1H暂存
- MOVWF SUM_TMR1H
- MOVF LRAM_0x52,W ; 将LRAM_0x52内容送SUM_TMR1L暂存
- MOVWF SUM_TMR1L
- MOVF COPY_TMR1H,W ; 将计数值的高位转存到RAM_45_TMR1H
- MOVWF RAM_45_TMR1H
- MOVF COPY_TMR1L,W ; 将计数值的低位转存到RAM_46_TMR1L
- MOVWF RAM_46_TMR1L
- CALL LADR_0x0050 ; 调用0x0050子程序
- BTFSS STATUS,C
- BSF flag8 ; SUM_TMR1H(h),SUM_TMR1L(l)小于计数器值,flag8=1
- CALL LADR_0x005E ; SUM_TMR1H(h),SUM_TMR1L(l)大于计数器值 调用LADR_0x005E
- CLRF RAM_46_TMR1L
- MOVLW 0x03
- MOVWF RAM_45_TMR1H
- CALL LADR_0x0050
- BTFSC STATUS,C
- GOTO LADR_0x00EE ;两个值之差大于0X0300时转00EE
- CLRF LRAM_0x59
- CLRF LRAM_0x5A
- GOTO LADR_0x0100
-
- LADR_0x00EE
- BTFSC flag8
- GOTO LADR_0x0100
- BTFSS flag3
- GOTO LADR_0x00F4
- BTFSS flag11
- GOTO LADR_0x0100
-
- LADR_0x00F4
- BCF flag0
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x51
- MOVWF LRAM_0x59
- MOVF COPY_TMR1L,W
- MOVWF LRAM_0x52
- MOVWF LRAM_0x5A
- BTFSC flag7
- CALL LADR_0x0026
- BTFSS flag11
- GOTO LADR_0x00AF
- GOTO LADR_0x0116
-
- LADR_0x0100
- BSF flag0
- BTFSC flag7
- GOTO LADR_0x0104
- CALL LADR_0x0026
-
- LADR_0x0104
- CLRF LRAM_0x39
- MOVF LRAM_0x59,W
- MOVWF SUM_TMR1H
- MOVF LRAM_0x5A,W
- MOVWF SUM_TMR1L
- MOVF COPY_TMR1H,W
- MOVWF RAM_45_TMR1H
- MOVWF LRAM_0x51
- MOVF COPY_TMR1L,W
- MOVWF RAM_46_TMR1L
- MOVWF COPY_TMR1L
- CALL LADR_0x003F
- MOVF SUM_TMR1H,W
- MOVWF COPY_TMR1H
- MOVF SUM_TMR1L,W
- MOVWF COPY_TMR1L
- CLRF LRAM_0x59
- CLRF LRAM_0x5A
-
- LADR_0x0116
- BTFSS flag11
- GOTO LADR_0x011F
- BTFSS flag0
- GOTO LADR_0x011C
- CALL LADR_0x0073
- BSF GPIO,0 ;
-
- LADR_0x011C
- BTFSS flag0
- BCF GPIO,0 ;
- CALL LADR_0x0073
-
- LADR_0x011F
- MOVF COPY_TMR1H,W
- MOVWF SUM_TMR1H
- MOVF COPY_TMR1L,W
- MOVWF SUM_TMR1L
- MOVF LRAM_0x5D,W
- MOVWF RAM_45_TMR1H
- MOVF LRAM_0x5E,W
- MOVWF RAM_46_TMR1L
- CALL LADR_0x0050
- CALL LADR_0x005E
- CLRF RAM_46_TMR1L
- MOVLW 0x01
- MOVWF RAM_45_TMR1H
- CALL LADR_0x0050
- BTFSC STATUS,C
- GOTO LADR_0x0146
- MOVF LRAM_0x22,W
- MOVWF RAM_45_TMR1H
- MOVF LRAM_0x23,W
- MOVWF RAM_46_TMR1L
- CLRF LRAM_0x39
- MOVF COPY_TMR1H,W
- MOVWF SUM_TMR1H
- MOVWF LRAM_0x22
- MOVF COPY_TMR1L,W
- MOVWF SUM_TMR1L
- MOVWF LRAM_0x23
- CALL LADR_0x003F
- BCF STATUS,C
- RRF LRAM_0x39,F
- RRF SUM_TMR1H,F
- RRF SUM_TMR1L,F
- MOVF SUM_TMR1H,W
- MOVWF LRAM_0x5D
- MOVWF COPY_TMR1H
- MOVF SUM_TMR1L,W
- MOVWF LRAM_0x5E
- MOVWF COPY_TMR1L
- GOTO LADR_0x014C
-
- LADR_0x0146
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x5D
- MOVWF LRAM_0x22
- MOVF COPY_TMR1L,W
- MOVWF LRAM_0x5E
- MOVWF LRAM_0x23
-
- LADR_0x014C
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVF COPY_TMR1L,W
- MOVWF LRAM_0x37
- BTFSC PIR1,0
- GOTO LADR_0x0156
- MOVLW 0xC0
- SUBWF LRAM_0x36,W
- BTFSS STATUS,C
- GOTO LADR_0x015A
-
- LADR_0x0156
- BCF flag3
- BSF flag1
- BCF flag2
- GOTO LADR_0x027C
-
- LADR_0x015A
- MOVLW 0x09 ;0x0E将限速点由原来的8000转/分,改为12000转/分
- MOVWF RAM_45_TMR1H
- MOVLW 0xC4 ;0x1F
- MOVWF RAM_46_TMR1L
- MOVF LRAM_0x36,W
- MOVWF SUM_TMR1H
- MOVF LRAM_0x37,W
- MOVWF SUM_TMR1L
- CALL LADR_0x0050
- BTFSC STATUS,C
- GOTO LADR_0x0169
- BSF flag3
- BCF flag1
- BCF flag2
- GOTO LADR_0x027C
-
- LADR_0x0169
- BCF flag3
- BCF flag1
- BSF flag2
- BSF flag5
- BCF flag7
- BCF flag10
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVF COPY_TMR1L,W
- MOVWF LRAM_0x37
- MOVLW 0xAB
- SUBWF LRAM_0x37,W
- BTFSS STATUS,C
- DECF LRAM_0x36,F
- MOVLW 0x5E
- SUBWF LRAM_0x36,W
- BTFSC STATUS,C
- GOTO LADR_0x01F3 ;-------------T=5EABH,T*N=30000000→N=1200PRM
-
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVLW 0xC8
- SUBWF LRAM_0x37,W
- BTFSS STATUS,C
- DECF LRAM_0x36,F
- MOVLW 0x41
- SUBWF LRAM_0x36,W
- BTFSC STATUS,C
- GOTO LADR_0x01E8 ;-------------T=41C8H,T*N=30000000→N=1500PRM
-
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVLW 0x71
- SUBWF LRAM_0x37,W
- BTFSS STATUS,C
- DECF LRAM_0x36,F
- MOVLW 0x2F
- SUBWF LRAM_0x36,W
- BTFSC STATUS,C
- GOTO LADR_0x01E0 ;-------------T=2F71H,T*N=30000000→N=2500PRM
-
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVLW 0x7F
- SUBWF LRAM_0x37,W
- BTFSS STATUS,C
- DECF LRAM_0x36,F
- MOVLW 0x23
- SUBWF LRAM_0x36,W
- BTFSC STATUS,C
- GOTO LADR_0x01CE ;-------------T=237FH,T*N=30000000→N=3300PRM
-
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVLW 0x80
- SUBWF LRAM_0x37,W
- BTFSS STATUS,C
- DECF LRAM_0x36,F
- MOVLW 0x18
- SUBWF LRAM_0x36,W
- BTFSC STATUS,C
- GOTO LADR_0x01C6 ;-------------T=1880H,T*N=30000000→N=4800PRM
-
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVLW 0xD1
- SUBWF LRAM_0x37,W
- BTFSS STATUS,C
- DECF LRAM_0x36,F
- MOVLW 0x0F
- SUBWF LRAM_0x36,W
- BTFSC STATUS,C
- GOTO LADR_0x01BF ;-------------T=0FD1H,T*N=30000000→N=7500PRM
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVLW 0xB8
- SUBWF LRAM_0x37,W
- BTFSS STATUS,C
- DECF LRAM_0x36,F
- MOVLW 0x0B
- SUBWF LRAM_0x36,W
- BTFSC STATUS,C
- GOTO LADR_KT1 ;-------------T=0FD1H,T*N=30000000→N=100000PRM
-
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVLW 0xFC
- SUBWF LRAM_0x37,W
- BTFSS STATUS,C
- DECF LRAM_0x36,F
- MOVLW 0x08
- SUBWF LRAM_0x36,W
- BTFSC STATUS,C
- GOTO LADR_0x01B8 ;-------------T=08FCH,T*N=30000000→N=13000PRM
-
- GOTO LADR_0x020F
-
- LADR_0x01B8
- MOVLW 0x05
- MOVWF LRAM_0x32
- CALL LADR_0x0035
- MOVLW 0x01
- SUBWF COPY_TMR1L,W
- MOVWF LRAM_0x38
- GOTO LADR_0x01D5
- LADR_KT1
- MOVLW 0x05
- MOVWF LRAM_0x32
- CALL LADR_0x0035
- MOVLW 0x40
- SUBWF COPY_TMR1L,W
- MOVWF LRAM_0x38
- GOTO LADR_0x01D5
-
- LADR_0x01BF
- MOVLW 0x06
- MOVWF LRAM_0x32
- CALL LADR_0x0035
- MOVLW 0x1C
- SUBWF COPY_TMR1L,W
- MOVWF LRAM_0x38
- GOTO LADR_0x01D5
-
- LADR_0x01C6
- MOVLW 0x07
- MOVWF LRAM_0x32
- CALL LADR_0x0035
- MOVLW 0x24
- SUBWF COPY_TMR1L,W
- MOVWF LRAM_0x38
- BSF flag7
- GOTO LADR_0x01D5
-
- LADR_0x01CE
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- MOVLW 0x23
- SUBWF LRAM_0x36,W
- MOVWF LRAM_0x38
- BSF flag7
-
- LADR_0x01D5
- MOVLW 0x03
- MOVWF PCLATH ;
- MOVF LRAM_0x38,W
- CALL LADR_0x037F
- MOVWF RAM_34_TALB_L
- MOVLW 0x03
- MOVWF PCLATH ;
- MOVF LRAM_0x38,W
- CALL LADR_0x0300
- MOVWF RAM_58_TALB_H
- GOTO LADR_0x0211
-
- LADR_0x01E0
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- BCF STATUS,C
- RRF COPY_TMR1H,F
- MOVLW 0x04
- ADDWF COPY_TMR1H,W
- MOVWF LRAM_0x38
- GOTO LADR_0x0203
-
- LADR_0x01E8
- BSF flag10
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- BCF STATUS,C
- RRF COPY_TMR1H,F
- BCF STATUS,C
- RRF COPY_TMR1H,F
- MOVLW 0x03
- ADDWF COPY_TMR1H,W
- MOVWF LRAM_0x38
- GOTO LADR_0x0203
-
- LADR_0x01F3
- BSF flag10
- MOVF COPY_TMR1H,W
- MOVWF LRAM_0x36
- BCF STATUS,C
- RRF COPY_TMR1H,F
- BCF STATUS,C
- RRF COPY_TMR1H,F
- BCF STATUS,C
- RRF COPY_TMR1H,F
- MOVLW 0x0B
- SUBWF COPY_TMR1H,W
- MOVWF LRAM_0x38
- SUBLW 0x12
- BTFSS STATUS,C
- GOTO LADR_0x020F
-
- LADR_0x0203
- BSF flag7
- MOVLW 0x02
- MOVWF PCLATH ;
- MOVF LRAM_0x38,W
- CALL LADR_0x02D6
- MOVWF RAM_34_TALB_L
- MOVLW 0x02
- MOVWF PCLATH ;
- MOVF LRAM_0x38,W
- CALL LADR_0x02B0
- MOVWF RAM_58_TALB_H
- GOTO LADR_0x0211
-
- LADR_0x020F
- BCF flag5
- GOTO LADR_0x00AF
-
- LADR_0x0211
- MOVF RAM_58_TALB_H,W
- MOVWF SUM_TMR1H
- MOVF RAM_34_TALB_L,W
- MOVWF SUM_TMR1L
- MOVF LRAM_0x42,W
- MOVWF RAM_45_TMR1H
- MOVF LRAM_0x43,W
- MOVWF RAM_46_TMR1L
- CALL LADR_0x0050
- CALL LADR_0x005E
- CLRF RAM_45_TMR1H
- MOVLW 0x5A
- MOVWF RAM_46_TMR1L
- CALL LADR_0x0050
- BTFSC STATUS,C
- GOTO LADR_0x026A
- CLRF LRAM_0x39
- MOVF LRAM_0x4E,W
- MOVWF SUM_TMR1H
- MOVF LRAM_0x4F,W
- MOVWF SUM_TMR1L
- MOVF LRAM_0x4C,W
- MOVWF LRAM_0x4E
- MOVWF RAM_45_TMR1H
- MOVF LRAM_0x4D,W
- MOVWF LRAM_0x4F
- MOVWF RAM_46_TMR1L
- CALL LADR_0x003F
- MOVF LRAM_0x4A,W
- MOVWF LRAM_0x4C
- MOVWF RAM_45_TMR1H
- MOVF LRAM_0x4B,W
- MOVWF LRAM_0x4D
- MOVWF RAM_46_TMR1L
- CALL LADR_0x003F
- MOVF LRAM_0x48,W
- MOVWF LRAM_0x4A
- MOVWF RAM_45_TMR1H
- MOVF LRAM_0x49,W
- MOVWF LRAM_0x4B
- MOVWF RAM_46_TMR1L
- CALL LADR_0x003F
- MOVF LRAM_0x40,W
- MOVWF LRAM_0x48
- MOVWF RAM_45_TMR1H
- MOVF LRAM_0x41,W
- MOVWF LRAM_0x49
- MOVWF RAM_46_TMR1L
- CALL LADR_0x003F
- MOVF LRAM_0x3E,W
- MOVWF LRAM_0x40
- MOVWF RAM_45_TMR1H
- MOVF LRAM_0x3F,W
- MOVWF LRAM_0x41
- MOVWF RAM_46_TMR1L
- CALL LADR_0x003F
- MOVF LRAM_0x3C,W
- MOVWF LRAM_0x3E
- MOVWF RAM_45_TMR1H
- MOVF LRAM_0x3D,W
- MOVWF LRAM_0x3F
- MOVWF RAM_46_TMR1L
- CALL LADR_0x003F
- MOVF RAM_58_TALB_H,W
- MOVWF LRAM_0x3C
- MOVWF RAM_45_TMR1H
- MOVF RAM_34_TALB_L,W
- MOVWF LRAM_0x3D
- MOVWF RAM_46_TMR1L
- CALL LADR_0x003F
- MOVLW 03H
- MOVWF FLAGC
- LADR_KT2
- BCF STATUS,C
- RRF LRAM_0x39,F
- RRF SUM_TMR1H,F
- RRF SUM_TMR1L,F
- DECFSZ FLAGC
- GOTO LADR_KT2
- MOVF SUM_TMR1H,W
- MOVWF LRAM_0x42
- MOVWF RAM_58_TALB_H
- MOVF SUM_TMR1L,W
- MOVWF LRAM_0x43
- MOVWF RAM_34_TALB_L
- GOTO LADR_0x027C
-
- LADR_0x026A
- MOVF RAM_58_TALB_H,W
- MOVWF LRAM_0x42
- MOVWF LRAM_0x3C
- MOVWF LRAM_0x3E
- MOVWF LRAM_0x40
- MOVWF LRAM_0x48
- MOVWF LRAM_0x4A
- MOVWF LRAM_0x4C
- MOVWF LRAM_0x4E
- MOVF RAM_34_TALB_L,W
- MOVWF LRAM_0x43
- MOVWF LRAM_0x3D
- MOVWF LRAM_0x3F
- MOVWF LRAM_0x41
- MOVWF LRAM_0x49
- MOVWF LRAM_0x4B
- MOVWF LRAM_0x4D
- MOVWF LRAM_0x4F
-
- LADR_0x027C
- BTFSC flag11
- GOTO LADR_0x0289
- BTFSC GPIO,1 ;
- GOTO LADR_0x0286
- INCF LRAM_0x5C,F
- MOVLW 0x04
- SUBWF LRAM_0x5C,W
- BTFSC STATUS,C
- BSF flag11
- GOTO LADR_0x0287
-
- LADR_0x0286
- CLRF LRAM_0x5C
-
- LADR_0x0287
- BTFSS flag11
- GOTO LADR_0x028E
-
- LADR_0x0289
- BCF flag5
- BTFSS flag10
- GOTO LADR_0x00AF
- BCF GPIO,0 ; !!Bank!! GPIO - TRISIO
- GOTO LADR_0x0289
-
- LADR_0x028E
- BCF INTCON,GIE
- BTFSS flag1
- GOTO LADR_0x0295
- BCF PIR1,0 ; !!Bank!! PIR1 - PIE1
- BCF flag5
- BSF flag6
- GOTO LADR_0x02AE
-
- LADR_0x0295
- BTFSS flag3
- GOTO LADR_0x02A6
- BCF flag5
- ; BSF GPIO,0 ; !!Bank!! GPIO - TRISIO
- ; CALL LADR_0x006D
- ; CALL LADR_0x006D
- ; CALL LADR_0x006D
- ; CALL LADR_0x006D
- ; CALL LADR_0x006D
- ; CALL LADR_0x006D
- ; BCF GPIO,0 ; !!Bank!! GPIO - TRISIO
- ; CALL LADR_0x006D
- MOVF LRAM_0x36,W
- MOVWF LRAM_0x51
- MOVF LRAM_0x37,W
- MOVWF LRAM_0x52
- GOTO LADR_0x02AE
-
- LADR_0x02A6
- BTFSS flag2
- GOTO LADR_0x02AA
- BSF flag5
- GOTO LADR_0x02AE
-
- LADR_0x02AA
- BCF flag5
- BTFSS flag6
- BSF flag5
- BCF flag6
-
- LADR_0x02AE
- BSF INTCON,GIE
- GOTO LADR_0x00AF
-
- LADR_0x02B0
- ADDWF PCL,F
- RETLW 0xF5
- RETLW 0xF5
- RETLW 0xF4
- RETLW 0xF4
- RETLW 0xF3
- RETLW 0xF4
- RETLW 0xF3
- RETLW 0xF3
- RETLW 0xF2
- RETLW 0xF2
- RETLW 0xF2
- RETLW 0xF2
- RETLW 0xF2
- RETLW 0xF2
- RETLW 0xF2
- RETLW 0xF2
- RETLW 0xF2
- RETLW 0xF3
- RETLW 0xF3
- RETLW 0xF7
- RETLW 0xF7
- RETLW 0xF6
- RETLW 0xF6
- RETLW 0xF6
- RETLW 0xF5
- RETLW 0xF5
- RETLW 0xF5
- RETLW 0xFE
- RETLW 0xFE
- RETLW 0xFE
- RETLW 0xFE
- RETLW 0xFE
- RETLW 0xFE
- RETLW 0xFE
- RETLW 0xFE
- RETLW 0xFD
- RETLW 0xFD
-
- LADR_0x02D6
- ADDWF PCL,F
- RETLW 0xE0
- RETLW 0x68
- RETLW 0xEE
- RETLW 0x62
- RETLW 0xC1
- RETLW 0x1A
- RETLW 0xAC
- RETLW 0x48
- RETLW 0xEE
- RETLW 0xA1
- RETLW 0x7E
- RETLW 0x69
- RETLW 0x61
- RETLW 0x6B
- RETLW 0x7B
- RETLW 0x9F
- RETLW 0xCD
- RETLW 0x0C
- RETLW 0x55
- RETLW 0xC3
- RETLW 0x7F
- RETLW 0xF9
- RETLW 0x9C
- RETLW 0x36
- RETLW 0xC4
- RETLW 0x46
- RETLW 0xB3
- RETLW 0xEE
- RETLW 0xE5
- RETLW 0xCA
- RETLW 0xA7
- RETLW 0x89
- RETLW 0x68
- RETLW 0x44
- RETLW 0x1E
- RETLW 0xFB
- RETLW 0xC7
- Org 0x0300
- LADR_0x0300
- ADDWF PCL,F
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFE
- RETLW 0xFE
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFF
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFA
- RETLW 0xFA
- RETLW 0xFA
- RETLW 0xFA
- RETLW 0xFA
- RETLW 0xFD
- RETLW 0xFD
- RETLW 0xFD
- RETLW 0xFD
- RETLW 0xFD
- RETLW 0xFD
- RETLW 0xFD
- RETLW 0xFD
- RETLW 0xFD
- RETLW 0xFD
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFB
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- RETLW 0xFC
- LADR_0x037F
- ADDWF PCL,F
- RETLW 0x60
- RETLW 0x59
- RETLW 0x51
- RETLW 0x49
- RETLW 0x3D
- RETLW 0x34
- RETLW 0x2C
- RETLW 0x23
- RETLW 0x19
- RETLW 0x0D
- RETLW 0x06
-
- RETLW 0xF9
- RETLW 0xEF
- RETLW 0xC9
- RETLW 0xC6
- RETLW 0xC2
- RETLW 0xBF
- RETLW 0xBD
- RETLW 0xBA
- RETLW 0xB3
- RETLW 0xAE
- RETLW 0xA9
- RETLW 0xA4
- RETLW 0x9F
- RETLW 0x99
- RETLW 0x92
- RETLW 0x8D
- RETLW 0x87
- RETLW 0x80
- RETLW 0x7B
- RETLW 0x76
- RETLW 0x73
- RETLW 0x6E
- RETLW 0x6A
- RETLW 0x64
- RETLW 0x90
- RETLW 0x80
- RETLW 0x73
- RETLW 0x66
- RETLW 0x58
- RETLW 0x4B
- RETLW 0x42
- RETLW 0x33
- RETLW 0x24
- RETLW 0x1A
- RETLW 0x0A
- RETLW 0x00
-
- RETLW 0xF6
- RETLW 0xEB
- RETLW 0xE0
- RETLW 0xD5
- RETLW 0xC9
- RETLW 0xBE
- RETLW 0xB1
- RETLW 0xA5
- RETLW 0x98
- RETLW 0x8B
- RETLW 0x7F
- RETLW 0x78
- RETLW 0x6A
- RETLW 0x4A
- RETLW 0x3A
- RETLW 0x24
- RETLW 0x17
- RETLW 0x00
-
- RETLW 0xF2
- RETLW 0xE1
- RETLW 0xCD
- RETLW 0xBE
- RETLW 0xA7
- RETLW 0x5B
- RETLW 0x51
- RETLW 0x48
- RETLW 0x3E
- RETLW 0x34
- RETLW 0x2B
- RETLW 0x21
- RETLW 0x18
- RETLW 0x0E
- RETLW 0x05
-
- RETLW 0xFB
- RETLW 0xF2
- RETLW 0xE8
- RETLW 0xDF
- RETLW 0xD5
- RETLW 0xCC
- RETLW 0xC3
- RETLW 0xB9
- RETLW 0xB0
- RETLW 0xA6
- RETLW 0x9D
- RETLW 0x94
- RETLW 0x8C
- RETLW 0x82
- RETLW 0x7C
- RETLW 0x71
- RETLW 0x67
- RETLW 0x5C
- RETLW 0x55
- RETLW 0x4A
- RETLW 0x43
- RETLW 0x38
- RETLW 0x30
- RETLW 0x28
- RETLW 0x1C
- RETLW 0x14
- RETLW 0x0C
- RETLW 0x04
-
- RETLW 0xFB
- RETLW 0xF3
- RETLW 0xE5
- RETLW 0xDC
- RETLW 0xD3
- RETLW 0xCF
- RETLW 0xC5
- RETLW 0xBC
- RETLW 0xC7
- RETLW 0xC0
- RETLW 0xB9
- RETLW 0xB7
- RETLW 0xB0
- RETLW 0xA8
- RETLW 0xA3
- RETLW 0xA0
- RETLW 0x98
- RETLW 0x94
- Org 0x03FF
- LADR_0x03FF
- RETLW 0x3480
- End