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

📄 ancap1.lst

📁 Embedded camera control program.
💻 LST
📖 第 1 页 / 共 5 页
字号:
017F:  INCF   53,W
0180:  SUBWF  57,F
0181:  BTFSC  03.0
0182:  GOTO   204
0183:  DECF   46,F
0184:  INCF   53,W
0185:  MOVWF  51
0186:  MOVF   56,W
0187:  SUBWF  51,F
0188:  MOVF   51,W
0189:  MOVWF  4F
018A:  MOVF   55,W
018B:  MOVWF  4E
018C:  MOVF   46,W
018D:  BTFSC  03.2
018E:  GOTO   194
018F:  MOVWF  50
0190:  BCF    03.0
0191:  RRF    4E,F
0192:  DECFSZ 50,F
0193:  GOTO   190
0194:  MOVF   51,W
0195:  BTFSC  03.2
0196:  GOTO   1E2
0197:  MOVLW  30
0198:  ADDWF  4E,W
0199:  BTFSS  0C.4
019A:  GOTO   199
019B:  MOVWF  19
019C:  MOVF   4F,W
019D:  BTFSS  03.2
019E:  GOTO   1A6
019F:  MOVF   53,F
01A0:  BTFSC  03.2
01A1:  GOTO   1E2
01A2:  MOVLW  2E
01A3:  BTFSS  0C.4
01A4:  GOTO   1A3
01A5:  MOVWF  19
01A6:  DECF   4F,F
01A7:  DECF   51,F
01A8:  BTFSC  03.2
01A9:  GOTO   1E2
01AA:  MOVF   46,W
01AB:  BTFSC  03.2
01AC:  GOTO   1B2
01AD:  MOVWF  50
01AE:  BCF    03.0
01AF:  RLF    4E,F
01B0:  DECFSZ 50,F
01B1:  GOTO   1AE
01B2:  MOVF   4E,W
01B3:  SUBWF  55,F
01B4:  MOVF   55,W
01B5:  MOVWF  4A
01B6:  MOVF   47,W
01B7:  MOVWF  4B
01B8:  MOVF   48,W
01B9:  MOVWF  4C
01BA:  MOVF   49,W
01BB:  MOVWF  4D
01BC:  BCF    03.0
01BD:  RLF    49,F
01BE:  RLF    48,F
01BF:  RLF    47,F
01C0:  RLF    55,F
01C1:  BCF    03.0
01C2:  RLF    49,F
01C3:  RLF    48,F
01C4:  RLF    47,F
01C5:  RLF    55,F
01C6:  MOVF   4D,W
01C7:  ADDWF  49,F
01C8:  BTFSS  03.0
01C9:  GOTO   1CF
01CA:  INCFSZ 48,F
01CB:  GOTO   1CF
01CC:  INCFSZ 47,F
01CD:  GOTO   1CF
01CE:  INCF   55,F
01CF:  MOVF   4C,W
01D0:  ADDWF  48,F
01D1:  BTFSS  03.0
01D2:  GOTO   1D6
01D3:  INCFSZ 47,F
01D4:  GOTO   1D6
01D5:  INCF   55,F
01D6:  MOVF   4B,W
01D7:  ADDWF  47,F
01D8:  BTFSC  03.0
01D9:  INCF   55,F
01DA:  MOVF   4A,W
01DB:  ADDWF  55,F
01DC:  BCF    03.0
01DD:  RLF    49,F
01DE:  RLF    48,F
01DF:  RLF    47,F
01E0:  RLF    55,F
01E1:  GOTO   18A
01E2:  NOP
01E3:  GOTO   204
01E4:  MOVF   4D,W
01E5:  ADDWF  49,F
01E6:  BTFSS  03.0
01E7:  GOTO   1ED
01E8:  INCFSZ 48,F
01E9:  GOTO   1ED
01EA:  INCFSZ 47,F
01EB:  GOTO   1ED
01EC:  INCF   55,F
01ED:  MOVF   4C,W
01EE:  ADDWF  48,F
01EF:  BTFSS  03.0
01F0:  GOTO   1F4
01F1:  INCFSZ 47,F
01F2:  GOTO   1F4
01F3:  INCF   55,F
01F4:  MOVF   4B,W
01F5:  ADDWF  47,F
01F6:  BTFSC  03.0
01F7:  INCF   55,F
01F8:  MOVF   4A,W
01F9:  ADDWF  55,F
01FA:  RETLW  00
01FB:  MOVF   55,W
01FC:  MOVWF  4A
01FD:  MOVF   47,W
01FE:  MOVWF  4B
01FF:  MOVF   48,W
0200:  MOVWF  4C
0201:  MOVF   49,W
0202:  MOVWF  4D
0203:  RETLW  00
0204:  NOP
0205:  BCF    0A.3
0206:  BCF    0A.4
0207:  GOTO   25B (RETURN)
.................... #include <16f877.h> 
....................  //////// Standard Header file for the PIC16F877 device ////////////////  
.................... //#device PIC16F877  
.................... #list  
....................  
.................... #include <math.h> 
....................  ////////////////////////////////////////////////////////////////////////////  
.................... ////        (C) Copyright 1996,2003 Custom Computer Services            ////  
.................... //// This source code may only be used by licensed users of the CCS C   ////  
.................... //// compiler.  This source code may only be distributed to other       ////  
.................... //// licensed users of the CCS C compiler.  No other use, reproduction  ////  
.................... //// or distribution is permitted without written permission.           ////  
.................... //// Derivative programs created using this software in object code     ////  
.................... //// form are not restricted in any way.                                ////  
.................... ////////////////////////////////////////////////////////////////////////////  
.................... ////                                                                    ////  
.................... //// History:                                                           ////  
.................... ////  * 9/20/2001 :  Improvments are made to sin/cos code.              ////  
.................... ////                 The code now is small, much faster,                ////  
.................... ////                 and more accurate.                                 ////  
.................... ////                                                                    ////  
.................... ////////////////////////////////////////////////////////////////////////////  
....................   
.................... #ifndef MATH_H  
.................... #define MATH_H  
....................   
....................   
.................... #undef  PI  
.................... #define PI     3.141592654  
....................   
....................   
.................... #define SQRT2  1.41421356  
....................   
.................... //float const ps[4] = {5.9304945, 21.125224, 8.9403076, 0.29730279};  
.................... //float const qs[4] = {1.0000000, 15.035723, 17.764134, 2.4934718};  
....................   
.................... ///////////////////////////// Round Functions //////////////////////////////  
....................   
.................... float CEIL_FLOOR(float x, int n)  
.................... {  
....................    float y, res;  
....................    long l;  
....................    int1 s;  
....................   
....................    s = 0;  
....................    y = x;  
....................   
....................    if (x < 0)  
....................    {  
....................       s = 1;  
....................       y = -y;  
....................    }  
....................   
....................    if (y <= 32768.0)  
....................   res = (float)(long)y;  
....................   
....................  else if (y < 10000000.0)  
....................    {  
....................   l = (long)(y/32768.0);  
....................       y = 32768.0*(y/32768.0 - (float)l);  
....................   res = 32768.0*(float)l;  
....................   res += (float)(long)y;  
....................  }  
....................   
....................  else  
....................   res = y;  
....................   
....................  y = y - (float)(long)y;  
....................   
....................  if (s)  
....................   res = -res;  
....................   
....................  if (y != 0)  
....................  {  
....................   if (s == 1 && n == 0)  
....................    res -= 1.0;  
....................   
....................   if (s == 0 && n == 1)  
....................    res += 1.0;  
....................  }  
....................  if (x == 0)  
....................     res = 0;  
....................   
....................  return (res);  
.................... }  
....................   
.................... ////////////////////////////////////////////////////////////////////////////  
.................... //	float floor(float x)  
.................... ////////////////////////////////////////////////////////////////////////////  
.................... // Description : rounds down the number x.  
.................... // Date : N/A  
.................... //  
.................... float floor(float x)  
.................... {  
....................    return CEIL_FLOOR(x, 0);  
.................... }  
....................   
.................... ////////////////////////////////////////////////////////////////////////////  
.................... //	float ceil(float x)  
.................... ////////////////////////////////////////////////////////////////////////////  
.................... // Description : rounds up the number x.  
.................... // Date : N/A  
.................... //  
.................... float ceil(float x)  
.................... {  
....................    return CEIL_FLOOR(x, 1);  
.................... }  
....................   
....................  ////////////////////////////////////////////////////////////////////////////  
.................... //	float fabs(float x)  
.................... ////////////////////////////////////////////////////////////////////////////  
.................... // Description : Computes the absolute value of floating point number x  
.................... // Returns : returns the absolute value of x  
.................... // Date : N/A  
.................... //  
.................... #define fabs abs  
....................   
.................... ////////////////////////////////////////////////////////////////////////////  
.................... //	float fmod(float x)  
.................... ////////////////////////////////////////////////////////////////////////////  
.................... // Description : Computes the floating point remainder of x/y  
.................... // Returns : returns the value of x= i*y, for some integer i such that, if y  
.................... // is non zero, the result has the same isgn of x na dmagnitude less than the  
.................... // magnitude of y. If y is zero then a domain error occurs.  
.................... // Date : N/A  
.................... //  
....................   
.................... float fmod(float x,float y)  
.................... {  
....................    float i;  
....................    if (y!=0.0)  
....................    {  
....................       i=(x/y < 0.0)?ceil(x/y): floor(x/y);  
....................       return(x-(i*y));  
....................    }  
....................    else  
....................    {  
....................    #ifdef _ERRNO  
....................    {  
....................       errno=EDOM;  
....................    }  
....................    #endif  
....................    }  
.................... }  
....................   
.................... //////////////////// Exponential and logarithmic functions ////////////////////  
....................   
.................... #define LN2 0.6931471806  
....................   
.................... float const pe[6] = {0.000207455774, 0.00127100575, 0.00965065093,  
....................                      0.0554965651,  0.240227138,  0.693147172};  
....................   
.................... ////////////////////////////////////////////////////////////////////////////  
.................... //	float exp(float x)  
.................... ////////////////////////////////////////////////////////////////////////////  
.................... // Description : returns the value (e^x)  
.................... // Date : N/A  
.................... //  
.................... float exp(float x)  
.................... {  
....................    float y, res, r;  
....................    signed int n;  
....................    int1 s;  
....................    #ifdef _ERRNO  
....................    if(x > 88.722838)  
....................    {  
....................       errno=ERANGE;  
....................       return(0);  
....................    }  
....................    #endif  
....................    n = (signed long)(x/LN2);  
....................    s = 0;  
....................    y = x;  
....................   
....................    if (x < 0)  
....................    {  
....................       s = 1;  
....................       n = -n;  
....................       y = -y;  

⌨️ 快捷键说明

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