CCS PCM C Compiler, Version 4.058s, 42064 12-IV-08 21:55
Filename: C:\RS\Prog\finalni\main.lst
ROM used: 386 words (5%)
Largest free fragment is 2048
RAM used: 10 (3%) at main() level
10 (3%) worst case
Stack: 1 locations
*
0000: MOVLW 00
0001: MOVWF 0A
0002: GOTO 069
0003: NOP
.................... #include "C:\RS\Prog\finalni\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)
0051: MOVLW 23
0052: MOVWF 04
0053: BCF 03.7
0054: MOVF 00,W
0055: BTFSC 03.2
0056: GOTO 068
0057: MOVLW 01
0058: MOVWF 78
0059: MOVLW BF
005A: MOVWF 77
005B: CLRWDT
005C: DECFSZ 77,F
005D: GOTO 05B
005E: DECFSZ 78,F
005F: GOTO 059
0060: MOVLW 4A
0061: MOVWF 77
0062: DECFSZ 77,F
0063: GOTO 062
0064: NOP
0065: CLRWDT
0066: DECFSZ 00,F
0067: GOTO 057
0068: RETLW 00
....................
....................
....................
....................
.................... void main()
.................... {
0069: CLRF 04
006A: BCF 03.7
006B: MOVLW 1F
006C: ANDWF 03,F
006D: BSF 03.5
006E: BSF 1F.0
006F: BSF 1F.1
0070: BSF 1F.2
0071: BCF 1F.3
0072: MOVLW 07
0073: MOVWF 1C
.................... int cas;
.................... int8 hall;
....................
.................... const int8 A[7]={0b00000001,0b11110110,0b11110110,0b11110110,0b00000001,0b11111111,0b11111111};
.................... const int8 B[7]={0b00000000,0b01110110,0b01110110,0b01110110,0b10001001,0b11111111,0b11111111};
.................... const int8 C[7]={0b10000001,0b01111110,0b01111110,0b01111110,0b10111101,0b11111111,0b11111111};
.................... const int8 D[7]={0b00000000,0b01111110,0b01111110,0b01111110,0b10000001,0b11111111,0b11111111};
.................... const int8 E[7]={0b00000000,0b01110110,0b01110110,0b01111110,0b01111110,0b11111111,0b11111111};
.................... const int8 F[7]={0b00000000,0b11110110,0b11110110,0b11111110,0b11111110,0b11111111,0b11111111};
.................... const int8 G[7]={0b10000001,0b01111110,0b01110110,0b01110110,0b10000101,0b11111111,0b11111111};
.................... const int8 H[7]={0b00000000,0b11110111,0b11110111,0b11110111,0b00000000,0b11111111,0b11111111};
.................... const int8 I[7]={0b01111110,0b01111110,0b00000000,0b01111110,0b01111110,0b11111111,0b11111111};
.................... const int8 J[7]={0b10111110,0b01111110,0b01111110,0b01111110,0b10000000,0b11111111,0b11111111};
.................... const int8 K[7]={0b00000000,0b11110111,0b11110111,0b11101011,0b00011100,0b11111111,0b11111111};
.................... const int8 L[7]={0b00000000,0b01111111,0b01111111,0b01111111,0b01111111,0b11111111,0b11111111};
.................... const int8 M[7]={0b00000000,0b11111110,0b11110000,0b11111110,0b00000000,0b11111111,0b11111111};
.................... const int8 N[7]={0b00000000,0b11101111,0b11011111,0b10111111,0b00000000,0b11111111,0b11111111};
.................... const int8 O[7]={0b10000001,0b01111110,0b01111110,0b01111110,0b10000001,0b11111111,0b11111111};
.................... const int8 P[7]={0b00000000,0b11110110,0b11110110,0b11110110,0b11111001,0b11111111,0b11111111};
.................... const int8 Q[7]={0b10000001,0b01111110,0b01111110,0b01111110,0b00000001,0b01111111,0b11111111};
.................... const int8 R[7]={0b00000000,0b11110110,0b11110110,0b11110110,0b00001001,0b11111111,0b11111111};
.................... const int8 S[7]={0b10111001,0b01110110,0b01110110,0b01110110,0b10001101,0b11111111,0b11111111};
.................... const int8 T[7]={0b11111110,0b11111110,0b00000000,0b11111110,0b11111110,0b11111111,0b11111111};
.................... const int8 U[7]={0b10000000,0b01111111,0b01111111,0b01111111,0b10000000,0b11111111,0b11111111};
.................... const int8 V[7]={0b11000000,0b10111111,0b01111111,0b10111111,0b11000000,0b11111111,0b11111111};
.................... const int8 W[7]={0b10000000,0b01111111,0b10000000,0b01111111,0b10000000,0b11111111,0b11111111};
.................... const int8 X[7]={0b00011100,0b11101011,0b11110111,0b11101011,0b00011100,0b11111111,0b11111111};
.................... const int8 Y[7]={0b11111000,0b11110111,0b00000111,0b11110111,0b11111000,0b11111111,0b11111111};
.................... const int8 Z[7]={0b00011110,0b01101110,0b01110110,0b01111010,0b01111100,0b11111111,0b11111111};
.................... const int8 null [7]={0b00000000,0b01111110,0b01111110,0b01111110,0b00000000,0b11111111,0b11111111};
.................... const int8 one [7]={0b01111011,0b01111101,0b00000000,0b01111111,0b01111111,0b11111111,0b11111111};
.................... const int8 two [7]={0b00111101,0b01011110,0b01101110,0b01110110,0b01111001,0b11111111,0b11111111};
.................... const int8 three[7]={0b10111101,0b01111110,0b01110110,0b01110110,0b10001001,0b11111111,0b11111111};
.................... const int8 four [7]={0b11110000,0b11110111,0b11110111,0b00000001,0b11110111,0b11111111,0b11111111};
.................... const int8 five [7]={0b10111000,0b01110110,0b01110110,0b01110110,0b10001110,0b11111111,0b11111111};
.................... const int8 six [7]={0b10000001,0b01110110,0b01110110,0b01110110,0b10001101,0b11111111,0b11111111};
.................... const int8 seven[7]={0b11111110,0b11111110,0b00001110,0b11110110,0b11111000,0b11111111,0b11111111};
.................... const int8 eight[7]={0b10001001,0b01110110,0b01110110,0b01110110,0b10001001,0b11111111,0b11111111};
.................... const int8 nine [7]={0b10111001,0b01110110,0b01110110,0b01110110,0b10000001,0b11111111,0b11111111};
....................
.................... const int8 mezera[7]={0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111};
....................
.................... setup_adc_ports(AN0);
*
0077: BSF 03.5
0078: BCF 1F.0
0079: BSF 1F.1
007A: BSF 1F.2
007B: BSF 1F.3
.................... setup_adc(ADC_CLOCK_DIV_8);
007C: BCF 1F.6
007D: BCF 03.5
007E: BSF 1F.6
007F: BCF 1F.7
0080: BSF 03.5
0081: BCF 1F.7
0082: BCF 03.5
0083: BSF 1F.0
.................... setup_psp(PSP_DISABLED);
0084: BSF 03.5
0085: BCF 09.4
.................... setup_spi(SPI_SS_DISABLED);
*
0074: MOVLW FF
0075: BCF 03.5
0076: MOVWF 20
*
0086: BCF 03.5
0087: BCF 14.5
0088: BCF 20.5
0089: MOVF 20,W
008A: BSF 03.5
008B: MOVWF 07
008C: BCF 03.5
008D: BSF 20.4
008E: MOVF 20,W
008F: BSF 03.5
0090: MOVWF 07
0091: BCF 03.5
0092: BCF 20.3
0093: MOVF 20,W
0094: BSF 03.5
0095: MOVWF 07
0096: MOVLW 01
0097: BCF 03.5
0098: MOVWF 14
0099: MOVLW 00
009A: BSF 03.5
009B: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
009C: MOVF 01,W
009D: ANDLW C7
009E: IORLW 08
009F: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
00A0: BCF 03.5
00A1: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
00A2: MOVLW 00
00A3: MOVWF 78
00A4: MOVWF 12
00A5: MOVLW 00
00A6: BSF 03.5
00A7: MOVWF 12
.................... setup_comparator(NC_NC_NC_NC);
00A8: MOVLW 07
00A9: MOVWF 1C
00AA: MOVF 05,W
00AB: CLRWDT
00AC: MOVLW 02
00AD: MOVWF 77
00AE: DECFSZ 77,F
00AF: GOTO 0AE
00B0: GOTO 0B1
00B1: MOVF 1C,W
00B2: BCF 03.5
00B3: BCF 0D.6
.................... setup_vref(FALSE);
00B4: BSF 03.5
00B5: CLRF 1D
....................
.................... set_adc_channel(0);
00B6: MOVLW 00
00B7: MOVWF 78
00B8: BCF 03.5
00B9: MOVF 1F,W
00BA: ANDLW C7
00BB: IORWF 78,W
00BC: MOVWF 1F
.................... delay_us(10);
00BD: CLRWDT
00BE: MOVLW 02
00BF: MOVWF 77
00C0: DECFSZ 77,F
00C1: GOTO 0C0
00C2: GOTO 0C3
....................
.................... while(TRUE)
.................... {
.................... hall=read_adc();
00C3: BSF 1F.2
00C4: BTFSC 1F.2
00C5: GOTO 0C4
00C6: MOVF 1E,W
00C7: MOVWF 22
.................... if(hall>10)
00C8: MOVF 22,W
00C9: SUBLW 0A
00CA: BTFSC 03.0
00CB: GOTO 180
.................... {
....................
.................... for(cas=0;cas<7;cas++)
00CC: CLRF 21
00CD: MOVF 21,W
00CE: SUBLW 06
00CF: BTFSS 03.0
00D0: GOTO 0DE
.................... {
.................... output_B(L[cas]);
00D1: MOVF 21,W
00D2: CALL 030
00D3: MOVWF 23
00D4: BSF 03.5
00D5: CLRF 06
00D6: BCF 03.5
00D7: MOVF 23,W
00D8: MOVWF 06
.................... delay_ms(1);
00D9: MOVLW 01
00DA: MOVWF 23
00DB: CALL 051
.................... }
00DC: INCF 21,F
00DD: GOTO 0CD
.................... for(cas=0;cas<7;cas++)
00DE: CLRF 21
00DF: MOVF 21,W
00E0: SUBLW 06
00E1: BTFSS 03.0
00E2: GOTO 0F0
.................... {
.................... output_B(E[cas]);
00E3: MOVF 21,W
00E4: CALL 01A
00E5: MOVWF 23
00E6: BSF 03.5
00E7: CLRF 06
00E8: BCF 03.5
00E9: MOVF 23,W
00EA: MOVWF 06
.................... delay_ms(1);
00EB: MOVLW 01
00EC: MOVWF 23
00ED: CALL 051
.................... }
00EE: INCF 21,F
00EF: GOTO 0DF
.................... for(cas=0;cas<7;cas++)
00F0: CLRF 21
00F1: MOVF 21,W
00F2: SUBLW 06
00F3: BTFSS 03.0
00F4: GOTO 102
.................... {
.................... output_B(D[cas]);
00F5: MOVF 21,W
00F6: CALL 00F
00F7: MOVWF 23
00F8: BSF 03.5
00F9: CLRF 06
00FA: BCF 03.5
00FB: MOVF 23,W
00FC: MOVWF 06
.................... delay_ms(1);
00FD: MOVLW 01
00FE: MOVWF 23
00FF: CALL 051
.................... }
0100: INCF 21,F
0101: GOTO 0F1
.................... for(cas=0;cas<7;cas++)
0102: CLRF 21
0103: MOVF 21,W
0104: SUBLW 06
0105: BTFSS 03.0
0106: GOTO 114
.................... {
.................... output_B(mezera[cas]);
0107: MOVF 21,W
0108: CALL 046
0109: MOVWF 23
010A: BSF 03.5
010B: CLRF 06
010C: BCF 03.5
010D: MOVF 23,W
010E: MOVWF 06
.................... delay_ms(1);
010F: MOVLW 01
0110: MOVWF 23
0111: CALL 051
.................... }
0112: INCF 21,F
0113: GOTO 103
.................... for(cas=0;cas<7;cas++)
0114: CLRF 21
0115: MOVF 21,W
0116: SUBLW 06
0117: BTFSS 03.0
0118: GOTO 126
.................... {
.................... output_B(E[cas]);
0119: MOVF 21,W
011A: CALL 01A
011B: MOVWF 23
011C: BSF 03.5
011D: CLRF 06
011E: BCF 03.5
011F: MOVF 23,W
0120: MOVWF 06
.................... delay_ms(1);
0121: MOVLW 01
0122: MOVWF 23
0123: CALL 051
.................... }
0124: INCF 21,F
0125: GOTO 115
.................... for(cas=0;cas<7;cas++)
0126: CLRF 21
0127: MOVF 21,W
0128: SUBLW 06
0129: BTFSS 03.0
012A: GOTO 138
.................... {
.................... output_B(F[cas]);
012B: MOVF 21,W
012C: CALL 025
012D: MOVWF 23
012E: BSF 03.5
012F: CLRF 06
0130: BCF 03.5
0131: MOVF 23,W
0132: MOVWF 06
.................... delay_ms(1);
0133: MOVLW 01
0134: MOVWF 23
0135: CALL 051
.................... }
0136: INCF 21,F
0137: GOTO 127
.................... for(cas=0;cas<7;cas++)
0138: CLRF 21
0139: MOVF 21,W
013A: SUBLW 06
013B: BTFSS 03.0
013C: GOTO 14A
.................... {
.................... output_B(F[cas]);
013D: MOVF 21,W
013E: CALL 025
013F: MOVWF 23
0140: BSF 03.5
0141: CLRF 06
0142: BCF 03.5
0143: MOVF 23,W
0144: MOVWF 06
.................... delay_ms(1);
0145: MOVLW 01
0146: MOVWF 23
0147: CALL 051
.................... }
0148: INCF 21,F
0149: GOTO 139
.................... for(cas=0;cas<7;cas++)
014A: CLRF 21
014B: MOVF 21,W
014C: SUBLW 06
014D: BTFSS 03.0
014E: GOTO 15C
.................... {
.................... output_B(E[cas]);
014F: MOVF 21,W
0150: CALL 01A
0151: MOVWF 23
0152: BSF 03.5
0153: CLRF 06
0154: BCF 03.5
0155: MOVF 23,W
0156: MOVWF 06
.................... delay_ms(1);
0157: MOVLW 01
0158: MOVWF 23
0159: CALL 051
.................... }
015A: INCF 21,F
015B: GOTO 14B
.................... for(cas=0;cas<7;cas++)
015C: CLRF 21
015D: MOVF 21,W
015E: SUBLW 06
015F: BTFSS 03.0
0160: GOTO 16E
.................... {
.................... output_B(C[cas]);
0161: MOVF 21,W
0162: CALL 004
0163: MOVWF 23
0164: BSF 03.5
0165: CLRF 06
0166: BCF 03.5
0167: MOVF 23,W
0168: MOVWF 06
.................... delay_ms(1);
0169: MOVLW 01
016A: MOVWF 23
016B: CALL 051
.................... }
016C: INCF 21,F
016D: GOTO 15D
.................... for(cas=0;cas<7;cas++)
016E: CLRF 21
016F: MOVF 21,W
0170: SUBLW 06
0171: BTFSS 03.0
0172: GOTO 180
.................... {
.................... output_B(T[cas]);
0173: MOVF 21,W
0174: CALL 03B
0175: MOVWF 23
0176: BSF 03.5
0177: CLRF 06
0178: BCF 03.5
0179: MOVF 23,W
017A: MOVWF 06
.................... delay_ms(1);
017B: MOVLW 01
017C: MOVWF 23
017D: CALL 051
.................... }
017E: INCF 21,F
017F: GOTO 16F
....................
.................... }
.................... }
0180: GOTO 0C3
.................... }
0181: SLEEP
Configuration Fuses:
Word 1: 3F39 XT NOWDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD NOWRT