CCS PCM C Compiler, Version 4.059d, 15399 13-I-06 22:36
Filename: main.lst
ROM used: 262 words (13%)
Largest free fragment is 1786
RAM used: 10 (3%) at main() level
18 (5%) worst case
Stack: 1 locations
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 082
0003: NOP
.................... #include "C:\RS\Ladicka2\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)
*
0011: MOVLW 23
0012: MOVWF 04
0013: BCF 03.7
0014: MOVF 00,W
0015: BTFSC 03.2
0016: GOTO 028
0017: MOVLW 01
0018: MOVWF 78
0019: MOVLW BF
001A: MOVWF 77
001B: CLRWDT
001C: DECFSZ 77,F
001D: GOTO 01B
001E: DECFSZ 78,F
001F: GOTO 019
0020: MOVLW 4A
0021: MOVWF 77
0022: DECFSZ 77,F
0023: GOTO 022
0024: NOP
0025: CLRWDT
0026: DECFSZ 00,F
0027: GOTO 017
0028: RETLW 00
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
....................
....................
.................... #define vstup C1OUT
.................... #define krok 1
....................
.................... void main()
.................... {
*
0082: CLRF 04
0083: BCF 03.7
0084: MOVLW 1F
0085: ANDWF 03,F
0086: MOVLW 19
0087: BSF 03.5
0088: MOVWF 19
0089: MOVLW A6
008A: MOVWF 18
008B: MOVLW 90
008C: BCF 03.5
008D: MOVWF 18
008E: BSF 03.5
008F: BSF 1F.0
0090: BSF 1F.1
0091: BSF 1F.2
0092: BCF 1F.3
0093: MOVLW 07
0094: MOVWF 1C
.................... int16 n;
....................
.................... setup_adc_ports(NO_ANALOGS);
*
0098: BSF 03.5
0099: BSF 1F.0
009A: BSF 1F.1
009B: BSF 1F.2
009C: BCF 1F.3
.................... setup_adc(ADC_OFF);
009D: BCF 03.5
009E: BCF 1F.0
.................... setup_psp(PSP_DISABLED);
009F: BSF 03.5
00A0: BCF 09.4
.................... setup_spi(SPI_SS_DISABLED);
*
0095: MOVLW FF
0096: BCF 03.5
0097: MOVWF 20
*
00A1: BCF 03.5
00A2: BCF 14.5
00A3: BCF 20.5
00A4: MOVF 20,W
00A5: BSF 03.5
00A6: MOVWF 07
00A7: BCF 03.5
00A8: BSF 20.4
00A9: MOVF 20,W
00AA: BSF 03.5
00AB: MOVWF 07
00AC: BCF 03.5
00AD: BCF 20.3
00AE: MOVF 20,W
00AF: BSF 03.5
00B0: MOVWF 07
00B1: MOVLW 01
00B2: BCF 03.5
00B3: MOVWF 14
00B4: MOVLW 00
00B5: BSF 03.5
00B6: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
00B7: MOVF 01,W
00B8: ANDLW C7
00B9: IORLW 08
00BA: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
00BB: BCF 03.5
00BC: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
00BD: MOVLW 00
00BE: MOVWF 78
00BF: MOVWF 12
00C0: MOVLW 00
00C1: BSF 03.5
00C2: MOVWF 12
.................... setup_comparator(A0_VR_A1_VR);
00C3: MOVLW 06
00C4: MOVWF 1C
00C5: MOVF 05,W
00C6: IORLW 03
00C7: MOVWF 05
00C8: CLRWDT
00C9: MOVLW 02
00CA: MOVWF 77
00CB: DECFSZ 77,F
00CC: GOTO 0CB
00CD: GOTO 0CE
00CE: MOVF 1C,W
00CF: BCF 03.5
00D0: BCF 0D.6
.................... setup_vref(VREF_HIGH|0);
00D1: MOVLW 80
00D2: BSF 03.5
00D3: MOVWF 1D
....................
.................... while(TRUE)
.................... {
.................... n=0;
00D4: BCF 03.5
00D5: CLRF 22
00D6: CLRF 21
.................... while(vstup)
.................... {
00D7: BSF 03.5
00D8: BTFSS 1C.6
00D9: GOTO 0E3
.................... n++;
00DA: BCF 03.5
00DB: INCF 21,F
00DC: BTFSC 03.2
00DD: INCF 22,F
.................... delay_ms(krok);
00DE: MOVLW 01
00DF: MOVWF 23
00E0: CALL 011
.................... }
00E1: GOTO 0D7
00E2: BSF 03.5
.................... while(!vstup)
.................... {
00E3: BTFSC 1C.6
00E4: GOTO 0EE
.................... n++;
00E5: BCF 03.5
00E6: INCF 21,F
00E7: BTFSC 03.2
00E8: INCF 22,F
.................... delay_ms(krok);
00E9: MOVLW 01
00EA: MOVWF 23
00EB: CALL 011
.................... }
00EC: BSF 03.5
00ED: GOTO 0E3
.................... printf("%Lu ms\n\r",n);
00EE: MOVLW 10
00EF: MOVWF 04
00F0: BCF 03.5
00F1: MOVF 22,W
00F2: MOVWF 24
00F3: MOVF 21,W
00F4: MOVWF 23
00F5: GOTO 029
00F6: MOVLW 03
00F7: MOVWF 23
00F8: MOVF 23,W
00F9: CALL 004
00FA: INCF 23,F
00FB: MOVWF 77
00FC: MOVF 77,W
00FD: BTFSS 0C.4
00FE: GOTO 0FD
00FF: MOVWF 19
0100: MOVLW 08
0101: SUBWF 23,W
0102: BTFSS 03.2
0103: GOTO 0F8
.................... }
0104: GOTO 0D5
.................... }
0105: SLEEP
Configuration Fuses:
Word 1: 3F39 XT NOWDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD NOWRT