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

📄 nhanpsp.lst

📁 Embedded camera control program.
💻 LST
📖 第 1 页 / 共 5 页
字号:
CCS PCM C Compiler, Version 3.211, 16465               27-Sep-05 11:22

               Filename: D:\phuoc\laptrinhpic\nhanpsp.LST

               ROM used: 300 words (4%)
                         Largest free fragment is 2048
               RAM used: 40 (11%) at main() level
                         45 (12%) worst case
               Stack:    3 worst case (2 in main + 1 for interrupts)

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   0CD
0003:  NOP
0004:  MOVWF  7F
0005:  SWAPF  03,W
0006:  CLRF   03
0007:  MOVWF  21
0008:  MOVF   0A,W
0009:  MOVWF  20
000A:  CLRF   0A
000B:  MOVF   04,W
000C:  MOVWF  22
000D:  MOVF   77,W
000E:  MOVWF  23
000F:  MOVF   78,W
0010:  MOVWF  24
0011:  MOVF   79,W
0012:  MOVWF  25
0013:  MOVF   7A,W
0014:  MOVWF  26
0015:  MOVF   7B,W
0016:  MOVWF  27
0017:  BCF    03.7
0018:  BCF    03.5
0019:  MOVLW  8C
001A:  MOVWF  04
001B:  BTFSS  00.7
001C:  GOTO   01F
001D:  BTFSC  0C.7
001E:  GOTO   032
001F:  MOVF   22,W
0020:  MOVWF  04
0021:  MOVF   23,W
0022:  MOVWF  77
0023:  MOVF   24,W
0024:  MOVWF  78
0025:  MOVF   25,W
0026:  MOVWF  79
0027:  MOVF   26,W
0028:  MOVWF  7A
0029:  MOVF   27,W
002A:  MOVWF  7B
002B:  MOVF   20,W
002C:  MOVWF  0A
002D:  SWAPF  21,W
002E:  MOVWF  03
002F:  SWAPF  7F,F
0030:  SWAPF  7F,W
0031:  RETFIE
0032:  BCF    0A.3
0033:  BCF    0A.4
0034:  GOTO   035
....................  #device  PIC16F877 *=16 ADC=10  
*
0070:  MOVF   44,W
0071:  CLRF   78
0072:  SUBWF  43,W
0073:  BTFSC  03.0
0074:  GOTO   078
0075:  MOVF   43,W
0076:  MOVWF  77
0077:  GOTO   084
0078:  CLRF   77
0079:  MOVLW  08
007A:  MOVWF  45
007B:  RLF    43,F
007C:  RLF    77,F
007D:  MOVF   44,W
007E:  SUBWF  77,W
007F:  BTFSC  03.0
0080:  MOVWF  77
0081:  RLF    78,F
0082:  DECFSZ 45,F
0083:  GOTO   07B
0084:  RETLW  00
0085:  BCF    42.6
0086:  MOVF   41,W
0087:  MOVWF  43
0088:  MOVLW  64
0089:  MOVWF  44
008A:  CALL   070
008B:  MOVF   78,W
008C:  BTFSS  03.2
008D:  GOTO   0AB
008E:  BTFSC  42.3
008F:  GOTO   0B7
0090:  BTFSC  42.6
0091:  GOTO   098
0092:  BTFSC  42.0
0093:  GOTO   098
0094:  BTFSC  42.2
0095:  GOTO   098
0096:  BTFSC  42.7
0097:  GOTO   0B7
0098:  BTFSS  42.0
0099:  GOTO   0A4
009A:  BTFSC  42.7
009B:  GOTO   0B7
009C:  BTFSC  42.6
009D:  GOTO   0A4
009E:  BTFSC  42.0
009F:  GOTO   0B7
00A0:  BTFSC  42.2
00A1:  GOTO   0A4
00A2:  BTFSC  42.7
00A3:  GOTO   0B7
00A4:  MOVLW  20
00A5:  BTFSS  42.4
00A6:  MOVLW  30
00A7:  BTFSS  0C.4
00A8:  GOTO   0A7
00A9:  MOVWF  19
00AA:  GOTO   0B7
00AB:  BTFSS  42.7
00AC:  GOTO   0B2
00AD:  MOVLW  2D
00AE:  BTFSS  0C.4
00AF:  GOTO   0AE
00B0:  MOVWF  19
00B1:  BCF    42.7
00B2:  MOVLW  30
00B3:  ADDWF  78,W
00B4:  BTFSS  0C.4
00B5:  GOTO   0B4
00B6:  MOVWF  19
00B7:  BTFSC  42.6
00B8:  GOTO   0C1
00B9:  MOVF   77,W
00BA:  MOVWF  43
00BB:  MOVLW  0A
00BC:  MOVWF  44
00BD:  CALL   070
00BE:  MOVF   78,W
00BF:  BSF    42.6
00C0:  GOTO   08B
00C1:  BTFSS  42.7
00C2:  GOTO   0C7
00C3:  MOVLW  2D
00C4:  BTFSS  0C.4
00C5:  GOTO   0C4
00C6:  MOVWF  19
00C7:  MOVLW  30
00C8:  ADDWF  77,W
00C9:  BTFSS  0C.4
00CA:  GOTO   0C9
00CB:  MOVWF  19
00CC:  RETLW  00
.................... #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  

⌨️ 快捷键说明

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