CCS PCM C Compiler, Version 4.106, 47914 29-IX-12 21:44
Filename: D:\MLAB_E\projekty\GM_counter\SW\converter\mainpw2.lst
ROM used: 110 words (1%)
Largest free fragment is 2048
RAM used: 7 (2%) at main() level
7 (2%) worst case
Stack: 0 locations
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 004
0003: NOP
.................... #include "mainpw2.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 WRT_50% //Lower half of Program Memory is Write Protected
....................
.................... #use delay(clock=4000000)
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
....................
....................
....................
....................
.................... void main()
.................... {
*
0004: CLRF 04
0005: BCF 03.7
0006: MOVLW 1F
0007: ANDWF 03,F
0008: MOVLW 19
0009: BSF 03.5
000A: MOVWF 19
000B: MOVLW A6
000C: MOVWF 18
000D: MOVLW 90
000E: BCF 03.5
000F: MOVWF 18
0010: BSF 03.5
0011: BSF 1F.0
0012: BSF 1F.1
0013: BSF 1F.2
0014: BCF 1F.3
0015: MOVLW 07
0016: MOVWF 1C
.................... int8 delay;
.................... setup_adc_ports(AN0);
*
001A: BSF 03.5
001B: BCF 1F.0
001C: BSF 1F.1
001D: BSF 1F.2
001E: BSF 1F.3
.................... setup_adc(ADC_CLOCK_DIV_2);
001F: BCF 1F.6
0020: BCF 03.5
0021: BCF 1F.6
0022: BCF 1F.7
0023: BSF 03.5
0024: BCF 1F.7
0025: BCF 03.5
0026: BSF 1F.0
.................... setup_psp(PSP_DISABLED);
0027: BSF 03.5
0028: BCF 09.4
.................... setup_spi(SPI_SS_DISABLED);
0029: BCF 03.5
002A: BCF 14.5
002B: BCF 20.5
002C: MOVF 20,W
002D: BSF 03.5
002E: MOVWF 07
002F: BCF 03.5
0030: BSF 20.4
0031: MOVF 20,W
0032: BSF 03.5
0033: MOVWF 07
0034: BCF 03.5
0035: BCF 20.3
0036: MOVF 20,W
0037: BSF 03.5
0038: MOVWF 07
0039: MOVLW 01
003A: BCF 03.5
003B: MOVWF 14
003C: MOVLW 00
003D: BSF 03.5
003E: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
003F: MOVF 01,W
0040: ANDLW C7
0041: IORLW 08
0042: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
0043: BCF 03.5
0044: CLRF 10
.................... setup_timer_2(T2_DIV_BY_1,255,1);
0045: MOVLW 00
0046: MOVWF 78
0047: IORLW 04
0048: MOVWF 12
0049: MOVLW FF
004A: BSF 03.5
004B: MOVWF 12
.................... setup_ccp1(CCP_PWM);
004C: BCF 03.5
004D: BCF 20.2
004E: MOVF 20,W
004F: BSF 03.5
0050: MOVWF 07
0051: BCF 03.5
0052: BCF 07.2
0053: MOVLW 0C
0054: MOVWF 17
.................... set_pwm1_duty(0);
0055: CLRF 15
.................... setup_comparator(NC_NC_NC_NC);
0056: MOVLW 07
0057: BSF 03.5
0058: MOVWF 1C
0059: MOVF 05,W
005A: MOVWF 05
005B: MOVLW 03
005C: MOVWF 77
005D: DECFSZ 77,F
005E: GOTO 05D
005F: MOVF 1C,W
0060: BCF 03.5
0061: BCF 0D.6
.................... setup_vref(FALSE);
0062: BSF 03.5
0063: CLRF 1D
....................
.................... while(TRUE)
.................... {
.................... delay=read_adc();
0064: BCF 03.5
0065: BSF 1F.2
0066: BTFSC 1F.2
0067: GOTO 066
0068: MOVF 1E,W
0069: MOVWF 21
.................... set_pwm1_duty((delay));
006A: MOVF 21,W
006B: MOVWF 15
.................... }
006C: GOTO 065
.................... }
006D: SLEEP
Configuration Fuses:
Word 1: 3939 XT NOWDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD WRT_50%