CCS PCM C Compiler, Version 4.059d, 15399 13-I-06 22:52
Filename: C:\RS\Ladicka\main.lst
ROM used: 415 words (20%)
Largest free fragment is 1633
RAM used: 14 (4%) at main() level
39 (11%) worst case
Stack: 2 locations
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 0F8
0003: NOP
.................... #include "C:\RS\Ladicka\main.h"
.................... #include <16F877A.h>
.................... //////// Standard Header file for the PIC16F877A device ////////////////
.................... #device PIC16F877A
.................... #list
....................
.................... #device adc=8
....................
.................... #FUSES NOWDT //No Watch Dog Timer
.................... #FUSES XT //Crystal osc <= 4mhz
.................... #FUSES NOPUT //No Power Up Timer
.................... #FUSES NOPROTECT //Code not protected from reading
.................... #FUSES NODEBUG //No Debug mode for ICD
.................... #FUSES NOBROWNOUT //No brownout reset
.................... #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
.................... #FUSES NOCPD //No EE protection
.................... #FUSES NOWRT //Program memory not write protected
....................
.................... #use delay(clock=4000000,RESTART_WDT)
*
002D: MOVLW 24
002E: MOVWF 04
002F: BCF 03.7
0030: MOVF 00,W
0031: BTFSC 03.2
0032: GOTO 044
0033: MOVLW 01
0034: MOVWF 78
0035: MOVLW BF
0036: MOVWF 77
0037: CLRWDT
0038: DECFSZ 77,F
0039: GOTO 037
003A: DECFSZ 78,F
003B: GOTO 035
003C: MOVLW 4A
003D: MOVWF 77
003E: DECFSZ 77,F
003F: GOTO 03E
0040: NOP
0041: CLRWDT
0042: DECFSZ 00,F
0043: GOTO 033
0044: GOTO 159 (RETURN)
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
....................
....................
.................... #define krok 1
.................... #define vstup C1OUT
....................
.................... void main()
.................... {
*
00F8: CLRF 04
00F9: BCF 03.7
00FA: MOVLW 1F
00FB: ANDWF 03,F
00FC: MOVLW 19
00FD: BSF 03.5
00FE: MOVWF 19
00FF: MOVLW A6
0100: MOVWF 18
0101: MOVLW 90
0102: BCF 03.5
0103: MOVWF 18
0104: BSF 03.5
0105: BSF 1F.0
0106: BSF 1F.1
0107: BSF 1F.2
0108: BCF 1F.3
0109: MOVLW 07
010A: MOVWF 1C
.................... int16 n;
.................... short ENABLE;
.................... short off;
....................
.................... setup_adc_ports(NO_ANALOGS);
*
010E: BSF 03.5
010F: BSF 1F.0
0110: BSF 1F.1
0111: BSF 1F.2
0112: BCF 1F.3
.................... setup_adc(ADC_OFF);
0113: BCF 03.5
0114: BCF 1F.0
.................... setup_psp(PSP_DISABLED);
0115: BSF 03.5
0116: BCF 09.4
.................... setup_spi(SPI_SS_DISABLED);
*
010B: MOVLW FF
010C: BCF 03.5
010D: MOVWF 20
*
0117: BCF 03.5
0118: BCF 14.5
0119: BCF 20.5
011A: MOVF 20,W
011B: BSF 03.5
011C: MOVWF 07
011D: BCF 03.5
011E: BSF 20.4
011F: MOVF 20,W
0120: BSF 03.5
0121: MOVWF 07
0122: BCF 03.5
0123: BCF 20.3
0124: MOVF 20,W
0125: BSF 03.5
0126: MOVWF 07
0127: MOVLW 01
0128: BCF 03.5
0129: MOVWF 14
012A: MOVLW 00
012B: BSF 03.5
012C: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
012D: MOVF 01,W
012E: ANDLW C7
012F: IORLW 08
0130: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
0131: BCF 03.5
0132: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
0133: MOVLW 00
0134: MOVWF 78
0135: MOVWF 12
0136: MOVLW 00
0137: BSF 03.5
0138: MOVWF 12
.................... setup_comparator(A0_VR_A1_VR);
0139: MOVLW 06
013A: MOVWF 1C
013B: MOVF 05,W
013C: IORLW 03
013D: MOVWF 05
013E: CLRWDT
013F: MOVLW 02
0140: MOVWF 77
0141: DECFSZ 77,F
0142: GOTO 141
0143: GOTO 144
0144: MOVF 1C,W
0145: BCF 03.5
0146: BCF 0D.6
.................... setup_vref(VREF_LOW|0);
0147: MOVLW A0
0148: BSF 03.5
0149: MOVWF 1D
....................
.................... while(TRUE)
.................... {
.................... off=0;
014A: BCF 03.5
014B: BCF 23.1
.................... ENABLE=1;
014C: BSF 23.0
.................... while(vstup);
014D: BSF 03.5
014E: BTFSC 1C.6
014F: GOTO 14E
.................... for(n=1;ENABLE;n++)
0150: BCF 03.5
0151: CLRF 22
0152: MOVLW 01
0153: MOVWF 21
0154: BTFSS 23.0
0155: GOTO 16E
.................... {
.................... delay_ms(krok);
0156: MOVLW 01
0157: MOVWF 24
0158: GOTO 02D
.................... if(vstup)off=1;
0159: BSF 03.5
015A: BTFSS 1C.6
015B: GOTO 15F
015C: BCF 03.5
015D: BSF 23.1
015E: BSF 03.5
.................... if((!vstup)&(off))ENABLE=0;
015F: MOVLW 00
0160: BTFSS 1C.6
0161: MOVLW 01
0162: BCF 03.5
0163: MOVWF 24
0164: MOVLW 00
0165: BTFSC 23.1
0166: MOVLW 01
0167: ANDWF 24,W
0168: BTFSS 03.2
0169: BCF 23.0
.................... }
016A: INCF 21,F
016B: BTFSC 03.2
016C: INCF 22,F
016D: GOTO 154
.................... printf("Doba mezi stisknutim byla %5.3w s.\n\r",n-1);
016E: MOVLW 01
016F: SUBWF 21,W
0170: MOVWF 24
0171: MOVF 22,W
0172: MOVWF 25
0173: MOVLW 00
0174: BTFSS 03.0
0175: MOVLW 01
0176: SUBWF 25,F
0177: CLRF 26
0178: MOVF 26,W
0179: CALL 004
017A: INCF 26,F
017B: MOVWF 77
017C: MOVF 77,W
017D: BTFSS 0C.4
017E: GOTO 17D
017F: MOVWF 19
0180: MOVLW 1A
0181: SUBWF 26,W
0182: BTFSS 03.2
0183: GOTO 178
0184: MOVLW 05
0185: MOVWF 04
0186: CLRF 2A
0187: CLRF 29
0188: MOVF 25,W
0189: MOVWF 28
018A: MOVF 24,W
018B: MOVWF 27
018C: MOVLW 03
018D: MOVWF 2B
018E: GOTO 087
018F: MOVLW 1F
0190: MOVWF 27
0191: MOVF 27,W
0192: CALL 004
0193: INCF 27,F
0194: MOVWF 77
0195: MOVF 77,W
0196: BTFSS 0C.4
0197: GOTO 196
0198: MOVWF 19
0199: MOVLW 24
019A: SUBWF 27,W
019B: BTFSS 03.2
019C: GOTO 191
.................... }
019D: GOTO 14B
....................
.................... }
019E: SLEEP
Configuration Fuses:
Word 1: 3F39 XT NOWDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD NOWRT