📄 samplingtime.lst
字号:
CCS PCM C Compiler, Version 3.211, 16465 27-Oct-05 10:38
Filename: D:\phuoc\laptrinhpic\samplingtime.LST
ROM used: 280 words (3%)
Largest free fragment is 2048
RAM used: 24 (7%) at main() level
33 (9%) worst case
Stack: 2 worst case (0 in main + 2 for interrupts)
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 0C1
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: BTFSS 0B.5
001A: GOTO 01D
001B: BTFSC 0B.2
001C: GOTO 030
001D: MOVF 22,W
001E: MOVWF 04
001F: MOVF 23,W
0020: MOVWF 77
0021: MOVF 24,W
0022: MOVWF 78
0023: MOVF 25,W
0024: MOVWF 79
0025: MOVF 26,W
0026: MOVWF 7A
0027: MOVF 27,W
0028: MOVWF 7B
0029: MOVF 20,W
002A: MOVWF 0A
002B: SWAPF 21,W
002C: MOVWF 03
002D: SWAPF 7F,F
002E: SWAPF 7F,W
002F: RETFIE
0030: BCF 0A.3
0031: BCF 0A.4
0032: GOTO 092
.................... #device PIC16F877 *=16 ADC=10
0033: CLRF 3B
0034: MOVF 04,W
0035: MOVWF 3A
0036: BCF 3B.0
0037: BTFSC 03.7
0038: BSF 3B.0
0039: SWAPF 34,W
003A: IORLW F0
003B: MOVWF 36
003C: ADDWF 36,F
003D: ADDLW E2
003E: MOVWF 37
003F: ADDLW 32
0040: MOVWF 39
0041: MOVF 34,W
0042: ANDLW 0F
0043: ADDWF 37,F
0044: ADDWF 37,F
0045: ADDWF 39,F
0046: ADDLW E9
0047: MOVWF 38
0048: ADDWF 38,F
0049: ADDWF 38,F
004A: SWAPF 33,W
004B: ANDLW 0F
004C: ADDWF 38,F
004D: ADDWF 39,F
004E: RLF 38,F
004F: RLF 39,F
0050: COMF 39,F
0051: RLF 39,F
0052: MOVF 33,W
0053: ANDLW 0F
0054: ADDWF 39,F
0055: RLF 36,F
0056: MOVLW 07
0057: MOVWF 35
0058: MOVLW 0A
0059: ADDWF 39,F
005A: DECF 38,F
005B: BTFSS 03.0
005C: GOTO 059
005D: ADDWF 38,F
005E: DECF 37,F
005F: BTFSS 03.0
0060: GOTO 05D
0061: ADDWF 37,F
0062: DECF 36,F
0063: BTFSS 03.0
0064: GOTO 061
0065: ADDWF 36,F
0066: DECF 35,F
0067: BTFSS 03.0
0068: GOTO 065
0069: MOVLW 35
006A: MOVWF 04
006B: BCF 03.7
006C: MOVLW 07
006D: ANDWF 3A,W
006E: ADDWF 04,F
006F: MOVLW 39
0070: SUBWF 04,W
0071: BTFSC 03.2
0072: GOTO 087
0073: MOVF 00,W
0074: MOVWF 77
0075: BTFSS 03.2
0076: GOTO 07D
0077: BTFSC 3A.4
0078: GOTO 085
0079: BTFSC 3A.3
007A: GOTO 07F
007B: MOVLW 20
007C: GOTO 080
007D: MOVLW 08
007E: MOVWF 3A
007F: MOVLW 30
0080: ADDWF 77,F
0081: MOVF 77,W
0082: BTFSS 0C.4
0083: GOTO 082
0084: MOVWF 19
0085: INCF 04,F
0086: GOTO 06F
0087: MOVF 00,W
0088: MOVWF 77
0089: MOVLW 30
008A: ADDWF 77,F
008B: MOVF 77,W
008C: BTFSS 0C.4
008D: GOTO 08C
008E: MOVWF 19
008F: BCF 0A.3
0090: BCF 0A.4
0091: GOTO 0AD (RETURN)
.................... #include <16f877.h>
.................... //////// Standard Header file for the PIC16F877 device ////////////////
.................... //#device PIC16F877
.................... #list
....................
.................... #include <stdlib.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. ////
.................... ///////////////////////////////////////////////////////////////////////////
....................
.................... #ifndef _STDLIB
.................... #define _STDLIB
....................
.................... //---------------------------------------------------------------------------
.................... // Definitions and types
.................... //---------------------------------------------------------------------------
....................
.................... #ifndef RAND_MAX
.................... #define RAND_MAX 32767 // The value of which is the maximum value
.................... // ... returned by the rand function
.................... #endif
....................
.................... typedef struct {
.................... signed int quot;
.................... signed int rem;
.................... } div_t;
....................
.................... typedef struct {
.................... signed long quot;
.................... signed long rem;
.................... } ldiv_t;
....................
.................... #include <stddef.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. ////
.................... ///////////////////////////////////////////////////////////////////////////
....................
.................... #ifndef _STDDEF
....................
.................... #define _STDDEF
....................
.................... #if sizeof(int *)==1
.................... #define ptrdiff_t int
.................... #else
.................... #define ptrdiff_t long
.................... #endif
....................
.................... #define size_t int
.................... #define wchar_t char
.................... #define NULL 0
....................
.................... #define offsetof(s,f) (offsetofbit(s,f)/8)
....................
.................... #endif
....................
....................
.................... //---------------------------------------------------------------------------
.................... // String conversion functions
.................... //---------------------------------------------------------------------------
....................
.................... /* Standard template: float atof(char * s)
.................... * converts the initial portion of the string s to a float.
.................... * returns the converted value if any, 0 otherwise
.................... */
.................... float atof(char * s);
....................
.................... /* Standard template: signed int atoi(char * s)
.................... * converts the initial portion of the string s to a signed int
.................... * returns the converted value if any, 0 otherwise
.................... */
.................... signed int atoi(char *s);
....................
.................... /* Syntax: signed int32 atoi32(char * s)
.................... converts the initial portion of the string s to a signed int32
.................... returns the converted value if any, 0 otherwise*/
.................... signed int32 atoi32(char *s);
....................
.................... /* Standard template: signed long atol(char * s)
.................... * converts the initial portion of the string s to a signed long
.................... * returns the converted value if any, 0 otherwise
.................... */
.................... signed long atol(char *s);
....................
.................... /* Standard template: float strtol(char * s,char *endptr)
.................... * converts the initial portion of the string s to a float
.................... * returns the converted value if any, 0 otherwise
.................... * the final string is returned in the endptr, if endptr is not null
.................... */
.................... float strtod(char *s,char *endptr);
....................
.................... /* Standard template: long strtoul(char * s,char *endptr,signed int base)
.................... * converts the initial portion of the string s, represented as an
.................... * integral value of radix base to a signed long.
.................... * Returns the converted value if any, 0 otherwise
.................... * the final string is returned in the endptr, if endptr is not null
.................... */
.................... signed long strtol(char *s,char *endptr,signed int base);
....................
.................... /* Standard template: long strtoul(char * s,char *endptr,signed int base)
.................... * converts the initial portion of the string s, represented as an
.................... * integral value of radix base to a unsigned long.
.................... * returns the converted value if any, 0 otherwise
.................... * the final string is returned in the endptr, if endptr is not null
.................... */
.................... long strtoul(char *s,char *endptr,signed int base);
....................
.................... //---------------------------------------------------------------------------
.................... // Pseudo-random sequence generation functions
.................... //---------------------------------------------------------------------------
....................
.................... /* The rand function computes a sequence of pseudo-random integers in
.................... * the range 0 to RAND_MAX
.................... *
.................... * Parameters:
.................... * (none)
.................... *
.................... * Returns:
.................... * The pseudo-random integer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -