gpasm-1.7.0_beta1 (Feb  6 2015)NMOS_BOOST.asm     2015-7-31  16:11:24          PAGE  1


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00001 ;27M 实际芯片23M 仿真16M
                      00002 ;AD基准电压是2.5V
                      00003 ;注意十进制和十六进制的表示
                      00004 #include "mc32P7311.inc"
                      00001 
                      00002 
                      00003 ;mc32p7311 header file
                      00004 ;
                      00005 ; 
                      00006 
                      00007 ;define must write at first row
                      00008        
  00000180            00009 INDF0   EQU     0x180
  00000181            00010 INDF1   EQU     0x181
  00000182            00011 INDF2   EQU     0x182
  00000183            00012 HIBYTE  EQU     0x183
  00000184            00013 FSR0    EQU     0x184
  00000185            00014 FSR1    EQU     0x185
  00000186            00015 PCL     EQU     0x186
  00000187            00016 PFLAG   EQU     0x187
  00000188            00017 MCR     EQU     0x188
  00000189            00018 INDF3   EQU     0x189   
  0000018A            00019 INTE    EQU     0x18A
  0000018B            00020 INTF    EQU     0x18B
  0000018C            00021 DRVCR   EQU     0x18C
  0000018E            00022 KBCR    EQU     0x18E
                      00023 
  00000190            00024 IOP0    EQU     0x190
  00000191            00025 OEP0    EQU     0x191
  00000192            00026 PUP0    EQU     0x192
  00000193            00027 PDP0    EQU     0x193
  00000194            00028 IOP1    EQU     0x194
  00000195            00029 OEP1    EQU     0x195
  00000196            00030 PUP1    EQU     0x196
  00000197            00031 PDP1    EQU     0x197
                      00032 
  00000198            00033 T0CR    EQU     0x198
  00000199            00034 T0CNT   EQU     0x199
  0000019A            00035 T0LOAD  EQU     0x19A
  0000019B            00036 T0DATA  EQU     0x19B
  0000019C            00037 T1CR    EQU     0x19C
  0000019D            00038 T1CNT   EQU     0x19D
  0000019E            00039 T1LOAD  EQU     0x19E
  0000019F            00040 T1DATA  EQU     0x19F
                      00041 
  000001A0            00042 T2CR    EQU     0x1A0
  000001A1            00043 T2CNT   EQU     0x1A1
  000001A2            00044 T2LOAD  EQU     0x1A2
  000001A3            00045 T2DATA  EQU     0x1A3
  000001A4            00046 T3CR    EQU     0x1A4
  000001A5            00047 T3CNT   EQU     0x1A5
  000001A6            00048 T3LOAD  EQU     0x1A6
                      00049 
  000001A8            00050 PWM0DE  EQU     0x1A8
  000001A9            00051 PWM1DE  EQU     0x1A9
  000001AA            00052 PWM2DE  EQU     0x1AA
  000001AC            00053 PWMCR0  EQU     0x1AC
  000001AD            00054 PWMCR1  EQU     0x1AD
  000001AE            00055 OSCM    EQU     0x1AE
  000001AF            00056 LVDCR   EQU     0x1AF
                      00057 
  000001B0            00058 ADCR0   EQU     0x1B0
  000001B1            00059 ADCR1   EQU     0x1B1
  000001B2            00060 ADCR2   EQU     0x1B2
                      00061 
  000001B4            00062 ADRH    EQU     0x1B4
  000001B5            00063 ADRL    EQU     0x1B5
  000001B6            00064 ANSEL0  EQU     0x1B6
  000001B7            00065 ANSEL1  EQU     0x1B7
                      00066 
  000001F8            00067 VBGCAL  EQU     0x1F8
  000001FB            00068 OSCCAL1 EQU     0x1FB
  000001FC            00069 OSCCAL0 EQU     0x1FC
                      00070 
                      00071 #define         STATUS          PFLAG
                      00072 #define         INDF            INDF0
                      00073 #define         FSR             FSR0
                      00074 #define         P0HCON          PUP0
                      00075 #define         P1HCON          PUP1
                      00076 #define         INTECON         INTE
                      00077 #define         INTFLAG         INTF    
                      00078 
                      00079 
                      00080 ;INDF0
                      00081 #define         INDF07          INDF0,7
                      00082 #define         INDF06          INDF0,6
                      00083 #define         INDF05          INDF0,5
                      00084 #define         INDF04          INDF0,4
                      00085 #define         INDF03          INDF0,3
                      00086 #define         INDF02          INDF0,2
                      00087 #define         INDF01          INDF0,1
                      00088 #define         INDF00          INDF0,0
                      00089 
                      00090 ;INDF1
                      00091 #define         INDF17          INDF1,7
                      00092 #define         INDF16          INDF1,6
                      00093 #define         INDF15          INDF1,5
                      00094 #define         INDF14          INDF1,4
                      00095 #define         INDF13          INDF1,3
                      00096 #define         INDF12          INDF1,2
                      00097 #define         INDF11          INDF1,1
                      00098 #define         INDF10          INDF1,0
                      00099 
                      00100 ;INDF2
                      00101 #define         INDF27          INDF2,7
                      00102 #define         INDF26          INDF2,6
                      00103 #define         INDF25          INDF2,5
                      00104 #define         INDF24          INDF2,4
                      00105 #define         INDF23          INDF2,3
                      00106 #define         INDF22          INDF2,2
                      00107 #define         INDF21          INDF2,1
                      00108 #define         INDF20          INDF2,0
                      00109 
                      00110 ;HIBYTE
                      00111 #define         HIBYTE7         HIBYTE,7
                      00112 #define         HIBYTE6         HIBYTE,6
                      00113 #define         HIBYTE5         HIBYTE,5
                      00114 #define         HIBYTE4         HIBYTE,4
                      00115 #define         HIBYTE3         HIBYTE,3
                      00116 #define         HIBYTE2         HIBYTE,2
                      00117 #define         HIBYTE1         HIBYTE,1
                      00118 #define         HIBYTE0         HIBYTE,0
                      00119 
                      00120 ;FSR0
                      00121 #define         FSR07           FSR0,7
                      00122 #define         FSR06           FSR0,6
                      00123 #define         FSR05           FSR0,5
                      00124 #define         FSR04           FSR0,4
                      00125 #define         FSR03           FSR0,3
                      00126 #define         FSR02           FSR0,2
                      00127 #define         FSR01           FSR0,1
                      00128 #define         FSR00           FSR0,0
                      00129 
                      00130 ;FSR1
                      00131 #define         FSR17           FSR1,7
                      00132 #define         FSR16           FSR1,6
                      00133 #define         FSR15           FSR1,5
                      00134 #define         FSR14           FSR1,4
                      00135 #define         FSR13           FSR1,3
                      00136 #define         FSR12           FSR1,2
                      00137 #define         FSR11           FSR1,1
                      00138 #define         FSR10           FSR1,0
                      00139 
                      00140 ;PCL
                      00141 #define         PC7             PCL,7
                      00142 #define         PC6             PCL,6
                      00143 #define         PC5             PCL,5
                      00144 #define         PC4             PCL,4
                      00145 #define         PC3             PCL,3
                      00146 #define         PC2             PCL,2
                      00147 #define         PC1             PCL,1
                      00148 #define         PC0             PCL,0
                      00149 
                      00150 ;pflag bit 
                      00151 #define         Z               PFLAG,2
                      00152 #define         DC              PFLAG,1
                      00153 #define         C               PFLAG,0
                      00154 
                      00155 ;MCR 
                      00156 #define         GIE             MCR,7
                      00157 #define         T0              MCR,5
                      00158 #define         PD              MCR,4
                      00159 #define         MINT11          MCR,3
                      00160 #define         MINT10          MCR,2
                      00161 #define         MINT01          MCR,1
                      00162 #define         MINT00          MCR,0
                      00163 
                      00164 ;INDF3
                      00165 #define         INDF37          INDF3,7
                      00166 #define         INDF36          INDF3,6
                      00167 #define         INDF35          INDF3,5
                      00168 #define         INDF34          INDF3,4
                      00169 #define         INDF33          INDF3,3
                      00170 #define         INDF32          INDF3,2
                      00171 #define         INDF31          INDF3,1
                      00172 #define         INDF30          INDF3,0
                      00173 
                      00174 ;INTE
                      00175 #define         T3IE    INTE,7
                      00176 #define         ADIE    INTE,6
                      00177 #define         T2IE    INTE,5
                      00178 #define         KBIE    INTE,4
                      00179 #define         INT1IE  INTE,3
                      00180 #define         INT0IE  INTE,2
                      00181 #define         T1IE    INTE,1
                      00182 #define         T0IE    INTE,0
                      00183 
                      00184 ;INTF
                      00185 #define         T3IF    INTFLAG,7
                      00186 #define         ADIF    INTFLAG,6 
                      00187 #define         T2IF    INTFLAG,5
                      00188 #define         KBIF    INTFLAG,4
                      00189 #define         INT1IF  INTFLAG,3
                      00190 #define         INT0IF  INTFLAG,2
                      00191 #define         T1IF    INTFLAG,1
                      00192 #define         T0IF    INTFLAG,0
                      00193 
                      00194 ;DRVCR
                      00195 #define         DRVS    DRVCR,7
                      00196 #define         LDRVS   DRVCR,6 
                      00197 #define         PDRVS   DRVCR,5
                      00198 #define         PDRVS0  DRVCR,4
                      00199 #define         PDLYS1  DRVCR,3
                      00200 #define         PDLYS0  DRVCR,2
                      00201 #define         PSPDS1  DRVCR,1
                      00202 #define         PSPDS0  DRVCR,0
                      00203 
                      00204 ;KBCR
                      00205 #define         KBCR6   KBCR,6 
                      00206 #define         KBCR5   KBCR,5
                      00207 #define         KBCR4   KBCR,4
                      00208 #define         KBCR3   KBCR,3
                      00209 #define         KBCR2   KBCR,2
                      00210 #define         KBCR1   KBCR,1
                      00211 #define         KBCR0   KBCR,0
                      00212 
                      00213 ;IOP0
                      00214 #define         P0      IOP0
                      00215 #define         P05D    IOP0,5
                      00216 #define         P04D    IOP0,4
                      00217 #define         P03D    IOP0,3
                      00218 #define         P02D    IOP0,2
                      00219 #define         P01D    IOP0,1
                      00220 #define         P00D    IOP0,0
                      00221 
                      00222 ;OEP0
                      00223 #define         DDR0     OEP0
                      00224 #define         P05OE    OEP0,5
                      00225 #define         P04OE    OEP0,4
                      00226 #define         P03OE    OEP0,3
                      00227 #define         P02OE    OEP0,2
                      00228 #define         P01OE    OEP0,1
                      00229 #define         P00OE    OEP0,0
                      00230 
                      00231 ;PUP0
                      00232 #define         P05PU    PUP0,5
                      00233 #define         P04PU    PUP0,4
                      00234 #define         P03PU    PUP0,3
                      00235 #define         P02PU    PUP0,2
                      00236 #define         P01PU    PUP0,1
                      00237 #define         P00PU    PUP0,0
                      00238 
                      00239 ;PDP0
                      00240 #define         P05PD    PDP0,5
                      00241 #define         P04PD    PDP0,4
                      00242 #define         P03PD    PDP0,3
                      00243 #define         P02PD    PDP0,2
                      00244 #define         P01PD    PDP0,1
                      00245 #define         P00PD    PDP0,0
                      00246 
                      00247 ;IOP1
                      00248 #define         P1      IOP1
                      00249 #define         P17D    IOP1,7
                      00250 #define         P16D    IOP1,6
                      00251 #define         P15D    IOP1,5
                      00252 #define         P14D    IOP1,4
                      00253 #define         P13D    IOP1,3
                      00254 #define         P12D    IOP1,2
                      00255 #define         P11D    IOP1,1
                      00256 #define         P10D    IOP1,0
                      00257 
                      00258 ;OEP1
                      00259 #define         DDR1     OEP1
                      00260 #define         P17OE    OEP1,7
                      00261 #define         P16OE    OEP1,6
                      00262 #define         P15OE    OEP1,5
                      00263 #define         P14OE    OEP1,4
                      00264 #define         P13OE    OEP1,3
                      00265 #define         P12OE    OEP1,2
                      00266 #define         P11OE    OEP1,1
                      00267 #define         P10OE    OEP1,0
                      00268 
                      00269 ;PUP1
                      00270 #define         P17PU    PUP1,7
                      00271 #define         P16PU    PUP1,6
                      00272 #define         P15PU    PUP1,5
                      00273 #define         P14PU    PUP1,4
                      00274 #define         P13PU    PUP1,3
                      00275 #define         P12PU    PUP1,2
                      00276 #define         P11PU    PUP1,1
                      00277 #define         P10PU    PUP1,0
                      00278 
                      00279 ;PDP1
                      00280 #define         P17PD    PDP1,7
                      00281 #define         P16PD    PDP1,6
                      00282 #define         P15PD    PDP1,5
                      00283 #define         P14PD    PDP1,4
                      00284 #define         P13PD    PDP1,3
                      00285 #define         P12PD    PDP1,2
                      00286 #define         P11PD    PDP1,1
                      00287 #define         P10PD    PDP1,0
                      00288 
                      00289 ;T0CR
                      00290 #define         TC0EN           T0CR,7
                      00291 #define         PWM0OE          T0CR,6
                      00292 #define         BUZ0OE          T0CR,5
                      00293 #define         T0PS1           T0CR,4
                      00294 #define         T0PS0           T0CR,3
                      00295 #define         T0PR2           T0CR,2
                      00296 #define         T0PR1           T0CR,1
                      00297 #define         T0PR0           T0CR,0
                      00298 
                      00299 ;T0CNT
                      00300 #define         T0C7    T0CNT,7
                      00301 #define         T0C6    T0CNT,6
                      00302 #define         T0C5    T0CNT,5
                      00303 #define         T0C4    T0CNT,4
                      00304 #define         T0C3    T0CNT,3
                      00305 #define         T0C2    T0CNT,2
                      00306 #define         T0C1    T0CNT,1
                      00307 #define         T0C0    T0CNT,0
                      00308 
                      00309 ;T0LOAD
                      00310 #define         T0LOAD7    T0LOAD,7
                      00311 #define         T0LOAD6    T0LOAD,6
                      00312 #define         T0LOAD5    T0LOAD,5
                      00313 #define         T0LOAD4    T0LOAD,4
                      00314 #define         T0LOAD3    T0LOAD,3
                      00315 #define         T0LOAD2    T0LOAD,2
                      00316 #define         T0LOAD1    T0LOAD,1
                      00317 #define         T0LOAD0    T0LOAD,0
                      00318 
                      00319 ;T0DATA
                      00320 #define         T0DATA7    T0DATA,7
                      00321 #define         T0DATA6    T0DATA,6
                      00322 #define         T0DATA5    T0DATA,5
                      00323 #define         T0DATA4    T0DATA,4
                      00324 #define         T0DATA3    T0DATA,3
                      00325 #define         T0DATA2    T0DATA,2
                      00326 #define         T0DATA1    T0DATA,1
                      00327 #define         T0DATA0    T0DATA,0
                      00328 
                      00329 ;T1CR
                      00330 #define         TC1EN           T1CR,7
                      00331 #define         PWM1OE          T1CR,6
                      00332 #define         BUZ1OE          T1CR,5
                      00333 #define         T1PS1           T1CR,4
                      00334 #define         T1PS0           T1CR,3
                      00335 #define         T1PR2           T1CR,2
                      00336 #define         T1PR1           T1CR,1
                      00337 #define         T1PR0           T1CR,0
                      00338 
                      00339 ;T1CNT
                      00340 #define         T1C7    T1CNT,7
                      00341 #define         T1C6    T1CNT,6
                      00342 #define         T1C5    T1CNT,5
                      00343 #define         T1C4    T1CNT,4
                      00344 #define         T1C3    T1CNT,3
                      00345 #define         T1C2    T1CNT,2
                      00346 #define         T1C1    T1CNT,1
                      00347 #define         T1C0    T1CNT,0
                      00348 
                      00349 ;T1LOAD
                      00350 #define         T1LOAD7    T1LOAD,7
                      00351 #define         T1LOAD6    T1LOAD,6
                      00352 #define         T1LOAD5    T1LOAD,5
                      00353 #define         T1LOAD4    T1LOAD,4
                      00354 #define         T1LOAD3    T1LOAD,3
                      00355 #define         T1LOAD2    T1LOAD,2
                      00356 #define         T1LOAD1    T1LOAD,1
                      00357 #define         T1LOAD0    T1LOAD,0
                      00358 
                      00359 ;T1DATA
                      00360 #define         T1DATA7    T1DATA,7
                      00361 #define         T1DATA6    T1DATA,6
                      00362 #define         T1DATA5    T1DATA,5
                      00363 #define         T1DATA4    T1DATA,4
                      00364 #define         T1DATA3    T1DATA,3
                      00365 #define         T1DATA2    T1DATA,2
                      00366 #define         T1DATA1    T1DATA,1
                      00367 #define         T1DATA0    T1DATA,0
                      00368 
                      00369 ;T2CR
                      00370 #define         TC2EN           T2CR,7
                      00371 #define         PWM2OE          T2CR,6
                      00372 #define         BUZ2OE          T2CR,5
                      00373 #define         T2PS1           T2CR,4
                      00374 #define         T2PS0           T2CR,3
                      00375 #define         T2PR2           T2CR,2
                      00376 #define         T2PR1           T2CR,1
                      00377 #define         T2PR0           T2CR,0
                      00378 
                      00379 ;T2CNT
                      00380 #define         T2C7    T2CNT,7
                      00381 #define         T2C6    T2CNT,6
                      00382 #define         T2C5    T2CNT,5
                      00383 #define         T2C4    T2CNT,4
                      00384 #define         T2C3    T2CNT,3
                      00385 #define         T2C2    T2CNT,2
                      00386 #define         T2C1    T2CNT,1
                      00387 #define         T2C0    T2CNT,0
                      00388 
                      00389 ;T2LOAD
                      00390 #define         T2LOAD7    T2LOAD,7
                      00391 #define         T2LOAD6    T2LOAD,6
                      00392 #define         T2LOAD5    T2LOAD,5
                      00393 #define         T2LOAD4    T2LOAD,4
                      00394 #define         T2LOAD3    T2LOAD,3
                      00395 #define         T2LOAD2    T2LOAD,2
                      00396 #define         T2LOAD1    T2LOAD,1
                      00397 #define         T2LOAD0    T2LOAD,0
                      00398 
                      00399 ;T2DATA
                      00400 #define         T2DATA7    T2DATA,7
                      00401 #define         T2DATA6    T2DATA,6
                      00402 #define         T2DATA5    T2DATA,5
                      00403 #define         T2DATA4    T2DATA,4
                      00404 #define         T2DATA3    T2DATA,3
                      00405 #define         T2DATA2    T2DATA,2
                      00406 #define         T2DATA1    T2DATA,1
                      00407 #define         T2DATA0    T2DATA,0
                      00408 
                      00409 ;T3CR
                      00410 #define         TC3EN           T3CR,7
                      00411 #define         T3PS1           T3CR,4
                      00412 #define         T3PS0           T3CR,3
                      00413 #define         T3PR2           T3CR,2
                      00414 #define         T3PR1           T3CR,1
                      00415 #define         T3PR0           T3CR,0
                      00416 
                      00417 ;T3CNT
                      00418 #define         T3C7    T3CNT,7
                      00419 #define         T3C6    T3CNT,6
                      00420 #define         T3C5    T3CNT,5
                      00421 #define         T3C4    T3CNT,4
                      00422 #define         T3C3    T3CNT,3
                      00423 #define         T3C2    T3CNT,2
                      00424 #define         T3C1    T3CNT,1
                      00425 #define         T3C0    T3CNT,0
                      00426 
                      00427 ;T3LOAD
                      00428 #define         T3LOAD7    T3LOAD,7
                      00429 #define         T3LOAD6    T3LOAD,6
                      00430 #define         T3LOAD5    T3LOAD,5
                      00431 #define         T3LOAD4    T3LOAD,4
                      00432 #define         T3LOAD3    T3LOAD,3
                      00433 #define         T3LOAD2    T3LOAD,2
                      00434 #define         T3LOAD1    T3LOAD,1
                      00435 #define         T3LOAD0    T3LOAD,0
                      00436 
                      00437 ;PWM0DE
                      00438 #define         PWM0DE2    PWM0DE,2
                      00439 #define         PWM0DE1    PWM0DE,1
                      00440 #define         PWM0DE0    PWM0DE,0
                      00441 
                      00442 ;PWM1DE
                      00443 #define         PWM1DE2    PWM1DE,2
                      00444 #define         PWM1DE1    PWM1DE,1
                      00445 #define         PWM1DE0    PWM1DE,0
                      00446 
                      00447 ;PWM2DE
                      00448 #define         PWM2DE2    PWM2DE,2
                      00449 #define         PWM2DE1    PWM2DE,1
                      00450 #define         PWM2DE0    PWM2DE,0
                      00451 
                      00452 ;PWMCR0
                      00453 #define         FPWMEN     PWMCR0,7
                      00454 #define         PWM2INV    PWMCR0,6
                      00455 #define         PWM1INV    PWMCR0,5
                      00456 #define         PWM0INV    PWMCR0,4
                      00457 #define         FPWMR1     PWMCR0,3
                      00458 #define         FPWMR0     PWMCR0,2
                      00459 #define         FPWMF1     PWMCR0,1
                      00460 #define         FPWMF0     PWMCR0,0
                      00461 
                      00462 ;PWMCR1
                      00463 #define         TMRCKS1    PWMCR1,4
                      00464 #define         TMRCKS0    PWMCR1,3
                      00465 #define         PMODE2     PWMCR1,2
                      00466 #define         PMODE1     PWMCR1,1
                      00467 #define         PMODE0     PWMCR1,0
                      00468 
                      00469 ;OSCM
                      00470 #define         STBL    OSCM,5
                      00471 #define         STBH    OSCM,4
                      00472 #define         CLKS    OSCM,2
                      00473 #define         LFEN    OSCM,1
                      00474 #define         HFEN    OSCM,0          
                      00475 
                      00476 ;LVDCR
                      00477 #define         LVDEN    LVDCR,7
                      00478 #define         LVDS3    LVDCR,6
                      00479 #define         LVDS2    LVDCR,5
                      00480 #define         LVDS1    LVDCR,4
                      00481 #define         LVDS0    LVDCR,3
                      00482 #define         LVDF     LVDCR,0
                      00483 
                      00484 ;ADCR0
                      00485 #define         ADCHS3    ADCR0,7
                      00486 #define         ADCHS2    ADCR0,6
                      00487 #define         ADCHS1    ADCR0,5
                      00488 #define         ADCHS0    ADCR0,4
                      00489 #define         ADLEN     ADCR0,3
                      00490 #define         ADEOC     ADCR0,1
                      00491 #define         ADON      ADCR0,0
                      00492 
                      00493 ;ADCR1
                      00494 #define         ADCKS2    ADCR1,7
                      00495 #define         ADCKS1    ADCR1,6
                      00496 #define         ADCKS0    ADCR1,5
                      00497 #define         ADTST     ADCR1,4
                      00498 #define         RESS0     ADCR1,3
                      00499 #define         VRS2      ADCR1,2
                      00500 #define         VRS1      ADCR1,1
                      00501 #define         VRS0      ADCR1,0
                      00502 
                      00503 ;ADCR2
                      00504 #define         ADSMP3    ADCR2,3
                      00505 #define         ADSMP2    ADCR2,2
                      00506 #define         ADSMP1    ADCR2,1
                      00507 #define         ADSMP0    ADCR2,0
                      00508 
                      00509 ;ADRH
                      00510 #define         ADR11     ADRH,7
                      00511 #define         ADR10     ADRH,6
                      00512 #define         ADR9      ADRH,5
                      00513 #define         ADR8      ADRH,4
                      00514 #define         ADR7      ADRH,3
                      00515 #define         ADR6      ADRH,2
                      00516 #define         ADR5      ADRH,1
                      00517 #define         ADR4      ADRH,0
                      00518 
                      00519 ;ADRL
                      00520 #define         ADR3      ADRL,3
                      00521 #define         ADR2      ADRL,2
                      00522 #define         ADR1      ADRL,1
                      00523 #define         ADR0      ADRL,0
                      00524 
                      00525 ;ANSEL0
                      00526 #define         P12ANS    ANSEL0,7
                      00527 #define         P11ANS    ANSEL0,6
                      00528 #define         P05ANS    ANSEL0,5
                      00529 #define         P04ANS    ANSEL0,4
                      00530 #define         P03ANS    ANSEL0,3
                      00531 #define         P02ANS    ANSEL0,2
                      00532 #define         P01ANS    ANSEL0,1
                      00533 #define         P00ANS    ANSEL0,0
                      00534 
                      00535 ;ANSEL1
                      00536 #define         P15ANS    ANSEL1,1
                      00537 #define         P14ANS    ANSEL1,0
                      00538 
                      00539 ;VBGCAL
                      00540 #define         VBGCAL7    VBGCAL,7
                      00541 #define         VBGCAL6    VBGCAL,6
                      00542 #define         VBGCAL5    VBGCAL,5
                      00543 #define         VBGCAL4    VBGCAL,4
                      00544 #define         VBGCAL3    VBGCAL,3
                      00545 #define         VBGCAL2    VBGCAL,2
                      00546 #define         VBGCAL1    VBGCAL,1
                      00547 #define         VBGCAL0    VBGCAL,0
                      00548 
                      00549 ;OSCCAL0
                      00550 #define         OSCCAL7    OSCCAL0,7
                      00551 #define         OSCCAL6    OSCCAL0,6
                      00552 #define         OSCCAL5    OSCCAL0,5
                      00553 #define         OSCCAL4    OSCCAL0,4
                      00554 #define         OSCCAL3    OSCCAL0,3
                      00555 #define         OSCCAL2    OSCCAL0,2
                      00556 #define         OSCCAL1    OSCCAL0,1
                      00557 #define         OSCCAL0    OSCCAL0,0
                      00558 
                      00559 ;OSCCAL1
                      00560 #define         OSCCAL10   OSCCAL1,2
                      00561 #define         OSCCAL9    OSCCAL1,1
                      00562 #define         OSCCAL8    OSCCAL1,0
                      00005 
                      00006 ;==============IO口定义===============
                      00007 #define    VREF            P0,4    ;参考电压2.5V
                      00008 #define    DET_CURRENT     P0,2    ;电流检测
                      00009 #define    LIGHT_LED       P1,0    ;照明灯
                      00010 #define    BOOST_EN        P0,5    ;升压使能
                      00011 
                      00012 #define    KEY_I           P1,3    ;按键
                      00013 #define    LED34           P1,4    ;电量指示
                      00014 #define    LED12           P1,5
                      00015 #define    LED56           P1,0
                      00016 #define    LED78           P0,3
                      00017 #define    CHRG            P1,1    ;检测POWER5v
                      00018 
                      00019 #define    PMOS            P1,6    ;充电PWM控制
                      00020 #define    NMOS            P1,7    ;升压PWM控制
                      00021 
                      00022 ;==============常量定义===============
                      00023 #define   KEY_EFFECT         100 ;按键抖动计数
                      00024 #define   NO_KEY             0  ;无按键
                      00025 #define   SHORT_KEY          1  ;短按
                      00026 #define   LONG_KEY           2  ;长按--
                      00027 
                      00028 #define   BAT_ADCH           0xa9  ;AD通道选择;1/4VOUT1设为0xc9;1/4VDD设为0xa9
                      00029 #define   BOOST5V_ADCH       0xb9  ;1/4VOUT0
                      00030 #define   CURRENT_ADCH       0x59  ;AN5
                      00031 
                      00032 ;参考电压内部2V ,采样12Bit ,1/4 outv ,1/4vdd ,十进制
                      00033 #define         LOW_VBAT_AD         1536 ; 电池低于3v
                      00034 #define         VBAT_AD0            1638 ; 3.2v 低压报警1/4VOUT0 
                      00035 #define         VBAT_AD1            1792 ; 3.5v led1  
                      00036 #define         VBAT_AD2            1920 ; 3.75v led2  
                      00037 #define         VBAT_AD3            1997 ; 3.9v < led3 > led4
                      00038 
                      00039 ;====充电参数=======
                      00040 #define         CHARGE_PWM_DUTY_MAX             98 ;充电最大占空比
                      00041 #define         CHARGE_PWM_DUTY_MIN             10 ; 充电最小占空比
                      00042 
                      00043 ;============恒定充电电流为1A，则涓流充电电流为100mA
                      00044 #define         SHUT_OFF_CURRENT_AD             10  ; 充电电流关断值 100mA*0.05R（认为电池充满）
                      00045 
                      00046 #define         CONST_CURRENT_AD                102 ;1A  ，   136 :恒流充电值 2A
                      00047 
                      00048 #define         CONST_VOLTAGE_AD                2176;参考2V;   1450 ; 恒压充电值 4.25V
                      00049 #define         FULL_VOLTAGE_AD                 2190;充满电压值 4.25V
                      00050 
                      00051 #define         CHARGE_FULL_CNT                 100 ;充满计数
                      00052 
                      00053 ;=====升压参数=======
                      00054 #define         BOOST_PWM_DUTY_MIN              2 ;P16 P17反向输出 最小占空比不能为0 最大也不能到T1LOAD的值
                      00055 #define         BOOST_PWM_DUTY_MAX              50;47  已调好
                      00056 
                      00057 #define         BOOST_5V_CONST_AD               2560;5V    (内部参考2V)
                      00058 
                      00059 ;无负载计数值
                      00060 #define         NO_LOAD_CNT                     5 ;判断负载拔掉次数
                      00061 #define         LOAD_CNT                                                                5
                      00062 
                      00063 ;检测负载电流时的AD值范围
                      00064 #define         LOAD_CURRENT_AD_MIN             10   ; 100mA*0.05R
                      00065 #define         LOAD_CURRENT_AD_MAX            235  ;限流值 2.3A*0.05R
                      00066 #define         SHORT_CIRCUIT_AD               434  ;短路保护电流值
                      00067 
                      00068 ;==============变量定义 RAM ===============
                      00069         cblock  0x0
                      00070  accTemp  ;中断保存暂存器
                      00071  statusTemp
                      00072 
                      00073  DelayCnt ;延时计数
                      00074  DelayCnt1
                      00075 
                      00076  keyCode         ;键值
                      00077  keyFilterTime   ;按键去抖时间
                      00078  keyPressTime    ;按键时间 
                      00079 
                      00080  time_1ms  ;计时
                      00081  time_10ms
                      00082  time_100ms
                      00083  time_500ms
                      00084  sleepTime
                      00085 
                      00086  Flag                ;标志位寄存器
                      00087  Flag1
                      00088  Flag2
                      00089 
                      00090  ledFlags   ;LED灯标志位 用低4位
                      00091  ledScanCnt ; LED扫描计数
                      00092 
                      00093  displayMode ;电池显示模式
                      00094 
                      00095  cycleCnt ;循环计数
                      00096  cycleCnt1;
                      00097 
                      00098  sumAD        :2 ;多次AD值的和
                      00099  adValue      :2 ;单次采样值
                      00100  vbatAD       :2 ;电池电压值
                      00101  currentAD    :2 ;电流检测值
                      00102  lastAD       :2 ;上一次值
                      00103  boostAD5V    :2 ;升压5V值
                      00104  adAvg        :2
                      00105 
                      00106  adChTemp     ;AD通道
                      00107  ;shortCircuitAD; :2
                      00108  
                      00109  loadCnt 
                      00110  noLoadCnt
                      00111  chargeFullCnt ; 充满计数
                      00112  dutyChargeCnt
                      00113  dutyBoostCnt
                      00114  filterCnt
                      00115  marqueeLEDFlags ;跑马灯数量 值为0x1 x03 0x7 0xf
                      00116  loopCnt
                      00117         endc
                      00118 ;==========寄存器标志位=======================
                      00119 #define         F_keyRelease     Flag,0  ;按键释放
                      00120 #define         F_keyValid       Flag,1  ;按键有效
                      00121 #define         F_load           Flag,2  ;负载标志 1 active
                      00122 #define         F_power5V        Flag,3  ;检测5V接入
                      00123 #define         F_sleep          Flag,4  ;睡眠标志
                      00124 #define         F_ledOff         Flag,5  ;LED指示灯灭
                      00125 #define         F_showVBAT       Flag,6  ;电量显示
                      00126 #define         F_blink          Flag,7  ;闪烁标志
                      00127 
                      00128 #define         F_time10ms       Flag1,0 ;10ms标志 
                      00129 #define         F_time100ms      Flag1,1 ;100ms标志
                      00130 #define         F_chargeFull     Flag1,2 ;充满标志   
                      00131 #define         F_preCharge      Flag1,3 ;预充电
                      00132 #define         F_time500ms      Flag1,4 ;500ms标志
                      00133 #define         F_detLoad        Flag1,5 ;开始检测负载
                      00134 #define         F_lightSwitch    Flag1,6 ;照明灯开关
                      00135 #define         F_displayEn      Flag1,7 ;显示使能
                      00136 
                      00137 #define         F_noLoadState     Flag2,0 ;空载状态
                      00138 #define         F_marquee500ms    Flag2,1 ;跑马灯间隔时间
                      00139 
                      00140 ;=============程序开始======================
                      00141 
                      00142                 ORG             0x00                
0000   DF88           00143                 bclr            GIE     ;关中断
0001   A000           00144                 goto            START
                      00145 
                      00146 ;=============中断向量====================
                      00147                ORG              0x08
0008                  00148 InterruptVector:
0008   5600           00149                movra       accTemp   ;中断之前保存ACC里面的值
0009   4587           00150                swapar      STATUS    ;中断之前保存状态寄存器
000A   5601           00151                movra       statusTemp
                      00152 
000B                  00153 TIM0_IRQ:
                      00154           ;jbclr      T0IE     ;是否开启了定时器0  开启1 关闭0
000B   E18B           00155           jbset       T0IF     ;定时器0是否产生了中断 1产生 0无
000C   A000           00156           goto        TIM1_IRQ
000D   D18B           00157           bclr        T0IF
                      00158 
000E                  00159 TIM1_IRQ:
                      00160           ;jbclr      T1IE   ;是否开启了定时器1  开启1 关闭0
000E   E38B           00161           jbset       T1IF   ;定时器1是否产生了中断 1产生 0无
000F   A000           00162           goto        TIM2_IRQ
0010   D38B           00163           bclr        T1IF
                      00164           
                      00165 
0011                  00166 TIM2_IRQ:
                      00167           ;jbclr      T2IE   ;是否开启了定时器2  开启1 关闭0
0011   EB8B           00168           jbset       T2IF   ;定时器2是否产生了中断 1产生 0无
0012   A000           00169           goto        TIM3_IRQ
0013   DB8B           00170           bclr        T2IF          
                      00171 
0014                  00172 TIM3_IRQ:
                      00173           ;jbclr      T2IE   ;是否开启了定时器2  开启1 关闭0
0014   EF8B           00174           jbset       T3IF   ;定时器2是否产生了中断 1产生 0无
0015   A000           00175           goto        INT0_IRQ
0016   DF8B           00176           bclr        T3IF
0017   6607           00177           incr        time_1ms
0018   EE0D           00178           jbset       F_displayEn
0019   A000           00179           goto        TimeAccumulation ;时间累加
                      00180           ;call        _DisplayLED
001A                  00181 TimeAccumulation:
001A   3C0A           00182           movai       10
001B   4007           00183           xorar       time_1ms
001C   E587           00184           jbset       Z
001D   A000           00185           goto        INT0_IRQ
001E   7607           00186           clrr        time_1ms
001F   6608           00187           incr        time_10ms
0020   C00D           00188           bset        F_time10ms
                      00189                                 
                      00190 
0021                  00191 INT0_IRQ: ;外部中断0
                      00192           ;jbclr      INT0IE ; 1开启了外部中断0 0关闭
0021   E58B           00193           jbset       INT0IF
0022   A000           00194           goto        INT1_IRQ
0023   D58B           00195           bclr        INT0IF
                      00196 
0024                  00197 INT1_IRQ: ;外部中断1
                      00198             ;jbclr      INT1IE ; 1开启了外部中断 0关闭
0024   E78B           00199             jbset       INT1IF
0025   A000           00200             goto        KBIM_IRQ
0026   D78B           00201             bclr        INT1IF
                      00202 
0027                  00203 KBIM_IRQ: ;键盘中断
                      00204             ;jbclr      KBIE
0027   E98B           00205             jbset       KBIF
0028   A000           00206             goto        ExitInterrupt
0029   D98B           00207             bclr        KBIF
                      00208                                 
                      00209 
002A                  00210 ExitInterrupt:;中断恢复
002A   4401           00211                 swapar      statusTemp
002B   5787           00212                 movra       STATUS
                      00213                 ;swapr      acc_temp
                      00214                 ;swapar     acc_temp
002C   5800           00215                 movar       accTemp
002D   000D           00216                 retie
                      00217 ;=========end interrupt===========
                      00218 
                      00219 ;==========初始化寄存器===========
002E                  00220 _InitRst:
                      00221 
002E   3CDF           00222         movai       0xdf
002F   5790           00223         movra       IOP0
0030   3CFF           00224         movai       0xff
0031   5794           00225         movra       IOP1
                      00226         
0032   3C00           00227         movai       0x00
0033   5792           00228         movra       PUP0
0034   3C08           00229         movai       0x08
0035   5796           00230         movra       PUP1
0036   3C02           00231         movai       0x02
0037   5793           00232         movra       PDP0
0038   3C00           00233         movai       0x00
0039   5797           00234         movra       PDP1
                      00235         
003A   3CE9           00236         movai       0xe9
003B   5791           00237         movra       OEP0    ;P02 P01 P04 做输入
003C   3CF5           00238         movai       0xf5
003D   5795           00239         movra       OEP1    ;P11 P13做输入
                      00240         
003E   3C0A           00241         movai       0x0a
003F   57B6           00242         movra       ANSEL0   ;P02 P04做AD采样
                      00243         
0040   3C00           00244         movai       0x00    ;时钟源为FCPU 1分频 仿真只有16M 实际芯片23M
0041   5798           00245         movra       T0CR
0042   3C63           00246         movai       99
0043   579A           00247         movra       T0LOAD  ;PWM充电频率 ((1/23)/4)*1*(99+1) = 57K 充电频率
0044   3C28           00248         movai       40
0045   579B           00249         movra       T0DATA
                      00250         
0046   3C08           00251         movai       0x08     ;时钟源为FHOSC 1分频
0047   579C           00252         movra       T1CR
0048   3C3F           00253         movai       63
0049   579E           00254         movra       T1LOAD  ;升压PWM频率(1/27)*1*(63+1) 421K 实际23M
004A   3C00           00255         movai       0
004B   579F           00256         movra       T1DATA
                      00257         
004C   3C08           00258         movai       0x08
004D   57A0           00259         movra       T2CR        ;时钟源为FHOSC 1分频 
004E   3C3F           00260         movai       63
004F   57A2           00261         movra       T2LOAD
0050   3C01           00262         movai       1
0051   57A3           00263         movra       T2DATA
                      00264         
0052   3C0D           00265         movai       0x0d
0053   57A4           00266         movra       T3CR        ;32/8 = 4M  时钟为FHOSC，32分频
0054   3C7D           00267         movai       125        ;T3定时1ms中断
0055   57A6           00268         movra       T3LOAD
                      00269         
0056   3C01           00270         movai       0x01
0057   5788           00271         movra       MCR         ;外部中断0 下降沿中断
0058   3C00           00272         movai       0x00
0059   57AC           00273         movra       PWMCR0
005A   3C90           00274         movai       0x90
005B   57B1           00275         movra       ADCR1      ;AD采样频率FHIRC/32=1MHz  ,内部参考2V                
005C   3C09           00276         movai       0x09
005D   57B0           00277         movra       ADCR0 ;测内参2V时要开AD
                      00278         
                      00279         ;bset       TC2EN
                      00280         ;bset       T2IE
                      00281         ;bset       KBCR,3
                      00282         ;bset       INT0IE
                      00283         
005E   CF98           00284         bset      TC0EN
005F   CD98           00285         bset      PWM0OE
                      00286         
0060   CFAC           00287         bset      PWMCR0,7   ; 允许PWM1 翻转输出到PWM0 故PWM0无需设置
                      00288         ;bset      PWMCR0,5
                      00289         ;bset      PWMCR0,4   ; PWM0与FPWM1 取反
                      00290         ;movai     0xc5
                      00291         ;movra     PWMCR0
0061   CF9C           00292         bset      TC1EN
0062   CD9C           00293         bset      PWM1OE
0063   3C95           00294         movai     0x95
0064   578C           00295         movra     DRVCR   ;增强驱动能力选择     
0065   A000           00296         goto      $
0066   000C           00297         return
                      00298 ;==========end 初始化========
                      00299 
                      00300 ;=========初始化 RAM=========
0067                  00301 _InitRAM:
0067   7784           00302            clrr        FSR0   
0068                  00303 InitRAM0:
0068   7780           00304            clrr        INDF0                       
0069   6784           00305            incr        FSR0
006A   3C7F           00306            movai       0x7F
006B   4984           00307            rsubar      FSR0
006C   E587           00308            jbset       Z
006D   A000           00309            goto        InitRAM0
006E   000C           00310            return
                      00311 ;======END RAM===============
                      00312 
                      00313 ;======延时函数==============
006F                  00314 _Delay:
006F   3CFF           00315          movai       0xff 
0070   5602           00316          movra       DelayCnt
                      00317 
0071                  00318 Delay_1:
0071   3CFF           00319          movai       0xFF
0072   5603           00320          movra       DelayCnt1
0073                  00321 Delay_2:
0073   6A03           00322          djzr        DelayCnt1
0074   A000           00323          goto        Delay_2
0075   6A02           00324          djzr        DelayCnt
0076   A000           00325          goto        Delay_1
0077   000C           00326          return
                      00327 ;=====END 延时函数===========
                      00328 
                      00329 ;=============时基=====================
0078                  00330 _TimeBase:         
0078   3C0A           00331        movai       10
0079   4008           00332        xorar       time_10ms
007A   E587           00333        jbset       Z
007B   000C           00334        return
007C   7608           00335         clrr        time_10ms                                
007D   6606           00336         incr        keyPressTime                                
007E   C20D           00337         bset        F_time100ms                                
007F   6609           00338         incr        time_100ms
0080   3C05           00339         movai       5
0081   4009           00340         xorar       time_100ms
0082   E587           00341         jbset       Z
0083   000C           00342         return                                
0084   7609           00343         clrr        time_100ms ;500ms                                
0085   3C80           00344         movai        0x80
0086   420C           00345         xorra        Flag      ;异或,将bit7取反                                
0087   C80D           00346         bset         F_time500ms
0088   C20E           00347         bset         F_marquee500ms                                
0089   F60C           00348         jbclr        F_power5V   ;休眠计时
008A   000C           00349         return
008B   F40C           00350         jbclr        F_load      ;负载标志
008C   000C           00351         return
008D   FC0D           00352         jbclr        F_lightSwitch;照明灯开关
008E   000C           00353         return
008F   660B           00354         incr         sleepTime
0090   3C14           00355         movai        20
0091   400B           00356         xorar        sleepTime
0092   E587           00357         jbset        Z
0093   000C           00358         return
0094   760B           00359         clrr         sleepTime
0095   C80C           00360         bset         F_sleep
0096   000C           00361         return
                      00362 ;=============END  TIME=============
                      00363 ;===========AD检测=================
0097                  00364 _ADCSbr:
0097   57B0           00365      movra       ADCR0   ;0xb9  0x6d
0098   E3B0           00366      jbset       ADEOC   ;判断AD转换是否完毕
0099   A000           00367      goto        $-1     ;回到上一条指令     
009A   D187           00368      bclr        C
009B   7616           00369      clrr        adValue
009C   3C04           00370      movai       4
009D   5612           00371      movra       cycleCnt     
009E   59B4           00372      movar       ADRH
009F   5617           00373      movra       adValue+1   ;保存ADValue 高八位
00A0                  00374 GetADValue:
00A0   4E17           00375        rrr         adValue+1  ;寄存器R循环右移（带C标志），结果存到R  
00A1   4E16           00376        rrr         adValue     ;ADValue 低八位
00A2   6A12           00377        djzr        cycleCnt
00A3   A000           00378        goto        GetADValue
00A4   59B5           00379        movar       ADRL
00A5   5E16           00380        orra        adValue    ;寄存器R内容和ACC或操作，结果存到R
00A6   000C           00381        return
                      00382 
00A7                  00383 _MultipleADSampling: ;连续8次AD值
00A7   3C08           00384            movai       8
00A8   5613           00385            movra       cycleCnt1
00A9   7614           00386            clrr        sumAD
00AA   7615           00387            clrr        sumAD+1
00AB                  00388 ADSampling:
00AB   5822           00389         movar       adChTemp ;   传递AD通道VOUT 
00AC   8000           00390         call        _ADCSbr
00AD   D187           00391         bclr        C
00AE   5816           00392         movar       adValue
00AF   7E14           00393         addra       sumAD
00B0   5817           00394         movar       adValue+1
00B1   1215           00395         adcra       sumAD+1
00B2   6A13           00396         djzr        cycleCnt1
00B3   A000           00397         goto        ADSampling
00B4                  00398 Get_AD_AVG:  ;8次AD的平均值
00B4   7620           00399           clrr        adAvg
00B5   7621           00400           clrr        adAvg+1
00B6   D187           00401           bclr        C
00B7   3C03           00402           movai       3
00B8   5612           00403           movra       cycleCnt
00B9                  00404 Get_AD_AVG_1:
00B9   4E15           00405          rrr         sumAD+1
00BA   4E14           00406          rrr         sumAD
00BB   D187           00407          bclr        C
00BC   6A12           00408          djzr        cycleCnt
00BD   A000           00409          goto        Get_AD_AVG_1
                      00410          
00BE   5814           00411          movar       sumAD
00BF   5620           00412          movra       adAvg
00C0   5815           00413          movar       sumAD+1
00C1   5621           00414          movra       adAvg+1
00C2   000C           00415          return
                      00416 
                      00417 ;_BatSampleSbr:
                      00418 ;         movai       BAT_ADCH ;   采电池电压(取样)
                      00419 ;         movra       adChTemp
                      00420 ;         call        _MultipleADSampling
                      00421 ;         movar       adAvg
                      00422 ;         movra       vbatAD
                      00423 ;         movar       adAvg+1
                      00424 ;         movra       vbatAD+1
                      00425 ;         return
                      00426 ;
                      00427 ;_CurrentSampleSbr:
                      00428 ;           movai       CURRENT_ADCH ;电流采样
                      00429 ;           movra       adChTemp
                      00430 ;           call        _MultipleADSampling
                      00431 ;           movar       adAvg
                      00432 ;           movra       currentAD
                      00433 ;           movar       adAvg+1
                      00434 ;           movra       currentAD+1
                      00435 ;           return
                      00436 ;
00C3                  00437 _Boost5VSampleSbr:
00C3   3CB9           00438             movai       BOOST5V_ADCH ;升压5V采样
00C4   5622           00439             movra       adChTemp
00C5   8000           00440             call        _MultipleADSampling
00C6   5820           00441             movar       adAvg
00C7   561E           00442             movra       boostAD5V
00C8   5821           00443             movar       adAvg+1
00C9   561F           00444             movra       boostAD5V+1
00CA   000C           00445             return
                      00446 ;===============END AD==============
                      00447 
00CB                  00448 _Boost:
00CB   3C00           00449     movai           low(BOOST_5V_CONST_AD)
00CC   481E           00450     rsubar          boostAD5V
00CD   3C0A           00451     movai           high(BOOST_5V_CONST_AD)
00CE   0C1F           00452     rsbcar          boostAD5V+1
00CF   F187           00453     jbclr           C ;<设定值 加大PWM
00D0   A000           00454     goto            BoostPWM_DOWN                                                                                       
00D1   3C32           00455     movai           BOOST_PWM_DUTY_MAX
00D2   499F           00456     rsubar          T1DATA                                                                                                                          
00D3   F187           00457     jbclr           C
00D4   000C           00458     return                  
00D5   679F           00459     incr            T1DATA                                                                                                                                  
00D6   000C           00460     return                          
                      00461                                 
00D7                  00462 BoostPWM_DOWN:                                                                                                                                                  
00D7   3C02           00463      movai          BOOST_PWM_DUTY_MIN
00D8   499F           00464      rsubar         T1DATA                                                                                                                          
00D9   E187           00465      jbset           C                                                                                                                                                               
00DA   000C           00466      return                 
00DB   6F9F           00467      decr           T1DATA                                                                                                                                          
00DC   000C           00468      return                                        
                      00469                                 
                      00470 
00DD                  00471 _OffPMOS:
00DD   DF98           00472           bclr     TC0EN
00DE   DD98           00473           bclr     PWM0OE  
00DF   CD94           00474           bset     PMOS
00E0   000C           00475           return
                      00476 
00E1                  00477 _OffNMOS:
00E1   DF9C           00478           bclr     TC1EN ;关PWM
00E2   DD9C           00479           bclr     PWM1OE
00E3   DFAC           00480           bclr     PWMCR0,7
00E4   DBAC           00481           bclr     PWMCR0,5
00E5   D9AC           00482           bclr     PWMCR0,4
00E6   DF94           00483           bclr     NMOS
00E7   000C           00484           return
                      00485 
00E8                  00486 START:         
00E8   8000           00487           call        _InitRst
00E9   8000           00488           call        _InitRAM                                     
00EA                  00489 LoopDelay:                                   
00EA   8000           00490         call           _Boost5VSampleSbr
00EB   8000           00491         call           _Boost
00EC   A000           00492         goto           $-2
                      00493         en
gpasm-1.7.0_beta1 (Feb  6 2015)NMOS_BOOST.asm     2015-7-31  16:11:24          PAGE  2


SYMBOL TABLE
  LABEL                             VALUE

ADCR0                             000001B0
ADCR1                             000001B1
ADCR2                             000001B2
ADRH                              000001B4
ADRL                              000001B5
ADSampling                        000000AB
ANSEL0                            000001B6
ANSEL1                            000001B7
BoostPWM_DOWN                     000000D7
DRVCR                             0000018C
DelayCnt                          00000002
DelayCnt1                         00000003
Delay_1                           00000071
Delay_2                           00000073
ExitInterrupt                     0000002A
FSR0                              00000184
FSR1                              00000185
Flag                              0000000C
Flag1                             0000000D
Flag2                             0000000E
GetADValue                        000000A0
Get_AD_AVG                        000000B4
Get_AD_AVG_1                      000000B9
HIBYTE                            00000183
INDF0                             00000180
INDF1                             00000181
INDF2                             00000182
INDF3                             00000189
INT0_IRQ                          00000021
INT1_IRQ                          00000024
INTE                              0000018A
INTF                              0000018B
IOP0                              00000190
IOP1                              00000194
InitRAM0                          00000068
InterruptVector                   00000008
KBCR                              0000018E
KBIM_IRQ                          00000027
LVDCR                             000001AF
LoopDelay                         000000EA
MCR                               00000188
OEP0                              00000191
OEP1                              00000195
OSCCAL0                           000001FC
OSCCAL1                           000001FB
OSCM                              000001AE
PCL                               00000186
PDP0                              00000193
PDP1                              00000197
PFLAG                             00000187
PUP0                              00000192
PUP1                              00000196
PWM0DE                            000001A8
PWM1DE                            000001A9
PWM2DE                            000001AA
PWMCR0                            000001AC
PWMCR1                            000001AD
START                             000000E8
T0CNT                             00000199
T0CR                              00000198
T0DATA                            0000019B
T0LOAD                            0000019A
T1CNT                             0000019D
T1CR                              0000019C
T1DATA                            0000019F
T1LOAD                            0000019E
T2CNT                             000001A1
T2CR                              000001A0
T2DATA                            000001A3
T2LOAD                            000001A2
T3CNT                             000001A5
T3CR                              000001A4
T3LOAD                            000001A6
TIM0_IRQ                          0000000B
TIM1_IRQ                          0000000E
TIM2_IRQ                          00000011
TIM3_IRQ                          00000014
TimeAccumulation                  0000001A
VBGCAL                            000001F8
_.org_8_0065                      00000065
_.org_8_0099                      00000099
_.org_8_00EC                      000000EC
_ADCSbr                           00000097
_Boost                            000000CB
_Boost5VSampleSbr                 000000C3
_Delay                            0000006F
_InitRAM                          00000067
_InitRst                          0000002E
_MultipleADSampling               000000A7
_OffNMOS                          000000E1
_OffPMOS                          000000DD
_TimeBase                         00000078
__32P21                           00000001
accTemp                           00000000
adAvg                             00000020
adChTemp                          00000022
adValue                           00000016
boostAD5V                         0000001E
chargeFullCnt                     00000025
currentAD                         0000001A
cycleCnt                          00000012
cycleCnt1                         00000013
displayMode                       00000011
dutyBoostCnt                      00000027
dutyChargeCnt                     00000026
filterCnt                         00000028
keyCode                           00000004
keyFilterTime                     00000005
keyPressTime                      00000006
lastAD                            0000001C
ledFlags                          0000000F
ledScanCnt                        00000010
loadCnt                           00000023
loopCnt                           0000002A
marqueeLEDFlags                   00000029
noLoadCnt                         00000024
sleepTime                         0000000B
statusTemp                        00000001
sumAD                             00000014
time_100ms                        00000009
time_10ms                         00000008
time_1ms                          00000007
time_500ms                        0000000A
vbatAD                            00000018
ADCHS0                            ADCR0,4
ADCHS1                            ADCR0,5
ADCHS2                            ADCR0,6
ADCHS3                            ADCR0,7
ADCKS0                            ADCR1,5
ADCKS1                            ADCR1,6
ADCKS2                            ADCR1,7
ADEOC                             ADCR0,1
ADIE                              INTE,6
ADIF                              INTFLAG,6
ADLEN                             ADCR0,3
ADON                              ADCR0,0
ADR0                              ADRL,0
ADR1                              ADRL,1
ADR10                             ADRH,6
ADR11                             ADRH,7
ADR2                              ADRL,2
ADR3                              ADRL,3
ADR4                              ADRH,0
ADR5                              ADRH,1
ADR6                              ADRH,2
ADR7                              ADRH,3
ADR8                              ADRH,4
ADR9                              ADRH,5
ADSMP0                            ADCR2,0
ADSMP1                            ADCR2,1
ADSMP2                            ADCR2,2
ADSMP3                            ADCR2,3
ADTST                             ADCR1,4
BAT_ADCH                          0xa9
BOOST5V_ADCH                      0xb9
BOOST_5V_CONST_AD                 2560
BOOST_EN                          P0,5
BOOST_PWM_DUTY_MAX                50
BOOST_PWM_DUTY_MIN                2
BUZ0OE                            T0CR,5
BUZ1OE                            T1CR,5
BUZ2OE                            T2CR,5
C                                 PFLAG,0
CHARGE_FULL_CNT                   100
CHARGE_PWM_DUTY_MAX               98
CHARGE_PWM_DUTY_MIN               10
CHRG                              P1,1
CLKS                              OSCM,2
CONST_CURRENT_AD                  102
CONST_VOLTAGE_AD                  2176
CURRENT_ADCH                      0x59
DC                                PFLAG,1
DDR0                              OEP0
DDR1                              OEP1
DET_CURRENT                       P0,2
DRVS                              DRVCR,7
FPWMEN                            PWMCR0,7
FPWMF0                            PWMCR0,0
FPWMF1                            PWMCR0,1
FPWMR0                            PWMCR0,2
FPWMR1                            PWMCR0,3
FSR                               FSR0
FSR00                             FSR0,0
FSR01                             FSR0,1
FSR02                             FSR0,2
FSR03                             FSR0,3
FSR04                             FSR0,4
FSR05                             FSR0,5
FSR06                             FSR0,6
FSR07                             FSR0,7
FSR10                             FSR1,0
FSR11                             FSR1,1
FSR12                             FSR1,2
FSR13                             FSR1,3
FSR14                             FSR1,4
FSR15                             FSR1,5
FSR16                             FSR1,6
FSR17                             FSR1,7
FULL_VOLTAGE_AD                   2190
F_blink                           Flag,7
F_chargeFull                      Flag1,2
F_detLoad                         Flag1,5
F_displayEn                       Flag1,7
F_keyRelease                      Flag,0
F_keyValid                        Flag,1
F_ledOff                          Flag,5
F_lightSwitch                     Flag1,6
F_load                            Flag,2
F_marquee500ms                    Flag2,1
F_noLoadState                     Flag2,0
F_power5V                         Flag,3
F_preCharge                       Flag1,3
F_showVBAT                        Flag,6
F_sleep                           Flag,4
F_time100ms                       Flag1,1
F_time10ms                        Flag1,0
F_time500ms                       Flag1,4
GIE                               MCR,7
HFEN                              OSCM,0
HIBYTE0                           HIBYTE,0
HIBYTE1                           HIBYTE,1
HIBYTE2                           HIBYTE,2
HIBYTE3                           HIBYTE,3
HIBYTE4                           HIBYTE,4
HIBYTE5                           HIBYTE,5
HIBYTE6                           HIBYTE,6
HIBYTE7                           HIBYTE,7
INDF                              INDF0
INDF00                            INDF0,0
INDF01                            INDF0,1
INDF02                            INDF0,2
INDF03                            INDF0,3
INDF04                            INDF0,4
INDF05                            INDF0,5
INDF06                            INDF0,6
INDF07                            INDF0,7
INDF10                            INDF1,0
INDF11                            INDF1,1
INDF12                            INDF1,2
INDF13                            INDF1,3
INDF14                            INDF1,4
INDF15                            INDF1,5
INDF16                            INDF1,6
INDF17                            INDF1,7
INDF20                            INDF2,0
INDF21                            INDF2,1
INDF22                            INDF2,2
INDF23                            INDF2,3
INDF24                            INDF2,4
INDF25                            INDF2,5
INDF26                            INDF2,6
INDF27                            INDF2,7
INDF30                            INDF3,0
INDF31                            INDF3,1
INDF32                            INDF3,2
INDF33                            INDF3,3
INDF34                            INDF3,4
INDF35                            INDF3,5
INDF36                            INDF3,6
INDF37                            INDF3,7
INT0IE                            INTE,2
INT0IF                            INTFLAG,2
INT1IE                            INTE,3
INT1IF                            INTFLAG,3
INTECON                           INTE
INTFLAG                           INTF
KBCR0                             KBCR,0
KBCR1                             KBCR,1
KBCR2                             KBCR,2
KBCR3                             KBCR,3
KBCR4                             KBCR,4
KBCR5                             KBCR,5
KBCR6                             KBCR,6
KBIE                              INTE,4
KBIF                              INTFLAG,4
KEY_EFFECT                        100
KEY_I                             P1,3
LDRVS                             DRVCR,6
LED12                             P1,5
LED34                             P1,4
LED56                             P1,0
LED78                             P0,3
LFEN                              OSCM,1
LIGHT_LED                         P1,0
LOAD_CNT                          5
LOAD_CURRENT_AD_MAX               235
LOAD_CURRENT_AD_MIN               10
LONG_KEY                          2
LOW_VBAT_AD                       1536
LVDEN                             LVDCR,7
LVDF                              LVDCR,0
LVDS0                             LVDCR,3
LVDS1                             LVDCR,4
LVDS2                             LVDCR,5
LVDS3                             LVDCR,6
MINT00                            MCR,0
MINT01                            MCR,1
MINT10                            MCR,2
MINT11                            MCR,3
NMOS                              P1,7
NO_KEY                            0
NO_LOAD_CNT                       5
OSCCAL0                           OSCCAL0,0
OSCCAL1                           OSCCAL0,1
OSCCAL10                          OSCCAL1,2
OSCCAL2                           OSCCAL0,2
OSCCAL3                           OSCCAL0,3
OSCCAL4                           OSCCAL0,4
OSCCAL5                           OSCCAL0,5
OSCCAL6                           OSCCAL0,6
OSCCAL7                           OSCCAL0,7
OSCCAL8                           OSCCAL1,0
OSCCAL9                           OSCCAL1,1
P0                                IOP0
P00ANS                            ANSEL0,0
P00D                              IOP0,0
P00OE                             OEP0,0
P00PD                             PDP0,0
P00PU                             PUP0,0
P01ANS                            ANSEL0,1
P01D                              IOP0,1
P01OE                             OEP0,1
P01PD                             PDP0,1
P01PU                             PUP0,1
P02ANS                            ANSEL0,2
P02D                              IOP0,2
P02OE                             OEP0,2
P02PD                             PDP0,2
P02PU                             PUP0,2
P03ANS                            ANSEL0,3
P03D                              IOP0,3
P03OE                             OEP0,3
P03PD                             PDP0,3
P03PU                             PUP0,3
P04ANS                            ANSEL0,4
P04D                              IOP0,4
P04OE                             OEP0,4
P04PD                             PDP0,4
P04PU                             PUP0,4
P05ANS                            ANSEL0,5
P05D                              IOP0,5
P05OE                             OEP0,5
P05PD                             PDP0,5
P05PU                             PUP0,5
P0HCON                            PUP0
P1                                IOP1
P10D                              IOP1,0
P10OE                             OEP1,0
P10PD                             PDP1,0
P10PU                             PUP1,0
P11ANS                            ANSEL0,6
P11D                              IOP1,1
P11OE                             OEP1,1
P11PD                             PDP1,1
P11PU                             PUP1,1
P12ANS                            ANSEL0,7
P12D                              IOP1,2
P12OE                             OEP1,2
P12PD                             PDP1,2
P12PU                             PUP1,2
P13D                              IOP1,3
P13OE                             OEP1,3
P13PD                             PDP1,3
P13PU                             PUP1,3
P14ANS                            ANSEL1,0
P14D                              IOP1,4
P14OE                             OEP1,4
P14PD                             PDP1,4
P14PU                             PUP1,4
P15ANS                            ANSEL1,1
P15D                              IOP1,5
P15OE                             OEP1,5
P15PD                             PDP1,5
P15PU                             PUP1,5
P16D                              IOP1,6
P16OE                             OEP1,6
P16PD                             PDP1,6
P16PU                             PUP1,6
P17D                              IOP1,7
P17OE                             OEP1,7
P17PD                             PDP1,7
P17PU                             PUP1,7
P1HCON                            PUP1
PC0                               PCL,0
PC1                               PCL,1
PC2                               PCL,2
PC3                               PCL,3
PC4                               PCL,4
PC5                               PCL,5
PC6                               PCL,6
PC7                               PCL,7
PD                                MCR,4
PDLYS0                            DRVCR,2
PDLYS1                            DRVCR,3
PDRVS                             DRVCR,5
PDRVS0                            DRVCR,4
PMODE0                            PWMCR1,0
PMODE1                            PWMCR1,1
PMODE2                            PWMCR1,2
PMOS                              P1,6
PSPDS0                            DRVCR,0
PSPDS1                            DRVCR,1
PWM0DE0                           PWM0DE,0
PWM0DE1                           PWM0DE,1
PWM0DE2                           PWM0DE,2
PWM0INV                           PWMCR0,4
PWM0OE                            T0CR,6
PWM1DE0                           PWM1DE,0
PWM1DE1                           PWM1DE,1
PWM1DE2                           PWM1DE,2
PWM1INV                           PWMCR0,5
PWM1OE                            T1CR,6
PWM2DE0                           PWM2DE,0
PWM2DE1                           PWM2DE,1
PWM2DE2                           PWM2DE,2
PWM2INV                           PWMCR0,6
PWM2OE                            T2CR,6
RESS0                             ADCR1,3
SHORT_CIRCUIT_AD                  434
SHORT_KEY                         1
SHUT_OFF_CURRENT_AD               10
STATUS                            PFLAG
STBH                              OSCM,4
STBL                              OSCM,5
T0                                MCR,5
T0C0                              T0CNT,0
T0C1                              T0CNT,1
T0C2                              T0CNT,2
T0C3                              T0CNT,3
T0C4                              T0CNT,4
T0C5                              T0CNT,5
T0C6                              T0CNT,6
T0C7                              T0CNT,7
T0DATA0                           T0DATA,0
T0DATA1                           T0DATA,1
T0DATA2                           T0DATA,2
T0DATA3                           T0DATA,3
T0DATA4                           T0DATA,4
T0DATA5                           T0DATA,5
T0DATA6                           T0DATA,6
T0DATA7                           T0DATA,7
T0IE                              INTE,0
T0IF                              INTFLAG,0
T0LOAD0                           T0LOAD,0
T0LOAD1                           T0LOAD,1
T0LOAD2                           T0LOAD,2
T0LOAD3                           T0LOAD,3
T0LOAD4                           T0LOAD,4
T0LOAD5                           T0LOAD,5
T0LOAD6                           T0LOAD,6
T0LOAD7                           T0LOAD,7
T0PR0                             T0CR,0
T0PR1                             T0CR,1
T0PR2                             T0CR,2
T0PS0                             T0CR,3
T0PS1                             T0CR,4
T1C0                              T1CNT,0
T1C1                              T1CNT,1
T1C2                              T1CNT,2
T1C3                              T1CNT,3
T1C4                              T1CNT,4
T1C5                              T1CNT,5
T1C6                              T1CNT,6
T1C7                              T1CNT,7
T1DATA0                           T1DATA,0
T1DATA1                           T1DATA,1
T1DATA2                           T1DATA,2
T1DATA3                           T1DATA,3
T1DATA4                           T1DATA,4
T1DATA5                           T1DATA,5
T1DATA6                           T1DATA,6
T1DATA7                           T1DATA,7
T1IE                              INTE,1
T1IF                              INTFLAG,1
T1LOAD0                           T1LOAD,0
T1LOAD1                           T1LOAD,1
T1LOAD2                           T1LOAD,2
T1LOAD3                           T1LOAD,3
T1LOAD4                           T1LOAD,4
T1LOAD5                           T1LOAD,5
T1LOAD6                           T1LOAD,6
T1LOAD7                           T1LOAD,7
T1PR0                             T1CR,0
T1PR1                             T1CR,1
T1PR2                             T1CR,2
T1PS0                             T1CR,3
T1PS1                             T1CR,4
T2C0                              T2CNT,0
T2C1                              T2CNT,1
T2C2                              T2CNT,2
T2C3                              T2CNT,3
T2C4                              T2CNT,4
T2C5                              T2CNT,5
T2C6                              T2CNT,6
T2C7                              T2CNT,7
T2DATA0                           T2DATA,0
T2DATA1                           T2DATA,1
T2DATA2                           T2DATA,2
T2DATA3                           T2DATA,3
T2DATA4                           T2DATA,4
T2DATA5                           T2DATA,5
T2DATA6                           T2DATA,6
T2DATA7                           T2DATA,7
T2IE                              INTE,5
T2IF                              INTFLAG,5
T2LOAD0                           T2LOAD,0
T2LOAD1                           T2LOAD,1
T2LOAD2                           T2LOAD,2
T2LOAD3                           T2LOAD,3
T2LOAD4                           T2LOAD,4
T2LOAD5                           T2LOAD,5
T2LOAD6                           T2LOAD,6
T2LOAD7                           T2LOAD,7
T2PR0                             T2CR,0
T2PR1                             T2CR,1
T2PR2                             T2CR,2
T2PS0                             T2CR,3
T2PS1                             T2CR,4
T3C0                              T3CNT,0
T3C1                              T3CNT,1
T3C2                              T3CNT,2
T3C3                              T3CNT,3
T3C4                              T3CNT,4
T3C5                              T3CNT,5
T3C6                              T3CNT,6
T3C7                              T3CNT,7
T3IE                              INTE,7
T3IF                              INTFLAG,7
T3LOAD0                           T3LOAD,0
T3LOAD1                           T3LOAD,1
T3LOAD2                           T3LOAD,2
T3LOAD3                           T3LOAD,3
T3LOAD4                           T3LOAD,4
T3LOAD5                           T3LOAD,5
T3LOAD6                           T3LOAD,6
T3LOAD7                           T3LOAD,7
T3PR0                             T3CR,0
T3PR1                             T3CR,1
T3PR2                             T3CR,2
T3PS0                             T3CR,3
T3PS1                             T3CR,4
TC0EN                             T0CR,7
TC1EN                             T1CR,7
TC2EN                             T2CR,7
TC3EN                             T3CR,7
TMRCKS0                           PWMCR1,3
TMRCKS1                           PWMCR1,4
VBAT_AD0                          1638
VBAT_AD1                          1792
VBAT_AD2                          1920
VBAT_AD3                          1997
VBGCAL0                           VBGCAL,0
VBGCAL1                           VBGCAL,1
VBGCAL2                           VBGCAL,2
VBGCAL3                           VBGCAL,3
VBGCAL4                           VBGCAL,4
VBGCAL5                           VBGCAL,5
VBGCAL6                           VBGCAL,6
VBGCAL7                           VBGCAL,7
VREF                              P0,4
VRS0                              ADCR1,0
VRS1                              ADCR1,1
VRS2                              ADCR1,2
Z                                 PFLAG,2

Errors   :     0
Warnings :     0 reported,     0 suppressed
Messages :     0 reported,     0 suppressed

