CCS PCM C Compiler, Version 3.245, 27853               11-V-08 11:01

               Filename: D:\MLAB_E\projekty\rotacni_display\SW\infra\infra.lst

               ROM used: 595 words (7%)
                         Largest free fragment is 2048
               RAM used: 36 (21%) at main() level
                         38 (22%) worst case
               Stack:    2 worst case (1 in main + 1 for interrupts)

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   149
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:  MOVLW  8C
001A:  MOVWF  04
001B:  BTFSS  00.5
001C:  GOTO   01F
001D:  BTFSC  0C.5
001E:  GOTO   032
001F:  MOVF   22,W
0020:  MOVWF  04
0021:  MOVF   23,W
0022:  MOVWF  77
0023:  MOVF   24,W
0024:  MOVWF  78
0025:  MOVF   25,W
0026:  MOVWF  79
0027:  MOVF   26,W
0028:  MOVWF  7A
0029:  MOVF   27,W
002A:  MOVWF  7B
002B:  MOVF   20,W
002C:  MOVWF  0A
002D:  SWAPF  21,W
002E:  MOVWF  03
002F:  SWAPF  7F,F
0030:  SWAPF  7F,W
0031:  RETFIE
0032:  BCF    0A.3
0033:  BCF    0A.4
0034:  GOTO   0F6
.................... #include ".\infra.h" 
.................... #include <16F877A.h> 
.................... //////// Standard Header file for the PIC16F877A device //////////////// 
.................... #device PIC16F877A 
.................... #list 
....................  
.................... #device adc=8 
....................  
.................... #FUSES WDT                      //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) 
*
010D:  MOVLW  39
010E:  MOVWF  04
010F:  MOVF   00,W
0110:  BTFSC  03.2
0111:  GOTO   123
0112:  MOVLW  01
0113:  MOVWF  78
0114:  MOVLW  BF
0115:  MOVWF  77
0116:  CLRWDT
0117:  DECFSZ 77,F
0118:  GOTO   116
0119:  DECFSZ 78,F
011A:  GOTO   114
011B:  MOVLW  4A
011C:  MOVWF  77
011D:  DECFSZ 77,F
011E:  GOTO   11D
011F:  NOP
0120:  CLRWDT
0121:  DECFSZ 00,F
0122:  GOTO   112
0123:  RETLW  00
.................... #use rs232(baud=600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8) 
....................  
....................  
....................  
.................... #define MAX_SLOVO 10   // Maximalni pocet znaku ve slovu 
....................  
.................... int8 napis[MAX_SLOVO+1]; 
.................... int8 otacky; 
....................  
.................... const int8 logo[2*MAX_SLOVO] ={'[','[',92,'[','E',']','A','[',92,'[','[','^','_','_',']',96,'^','_','_','a'}; // [blesk] E4A [blesk] , 2004-2008 
....................  
.................... #int_RDA 
.................... void  RDA_isr(void) 
.................... { 
....................    int n; 
....................    output_B(0x55); 
*
00F6:  BSF    03.5
00F7:  CLRF   06
00F8:  MOVLW  55
00F9:  BCF    03.5
00FA:  MOVWF  06
....................    for(n=0;n<MAX_SLOVO;n++) 
00FB:  CLRF   3F
00FC:  MOVF   3F,W
00FD:  SUBLW  09
00FE:  BTFSS  03.0
00FF:  GOTO   109
....................    { 
....................      napis[n]=getc(); 
0100:  MOVLW  28
0101:  ADDWF  3F,W
0102:  MOVWF  04
0103:  BTFSS  0C.5
0104:  GOTO   103
0105:  MOVF   1A,W
0106:  MOVWF  00
....................    } 
0107:  INCF   3F,F
0108:  GOTO   0FC
.................... } 
....................  
0109:  BCF    0C.5
010A:  BCF    0A.3
010B:  BCF    0A.4
010C:  GOTO   01F
.................... void main() 
.................... { 
*
0149:  CLRF   04
014A:  MOVLW  1F
014B:  ANDWF  03,F
014C:  MOVLW  67
014D:  BSF    03.5
014E:  MOVWF  19
014F:  MOVLW  22
0150:  MOVWF  18
0151:  MOVLW  90
0152:  BCF    03.5
0153:  MOVWF  18
0154:  BSF    03.5
0155:  BSF    1F.0
0156:  BSF    1F.1
0157:  BSF    1F.2
0158:  BCF    1F.3
0159:  MOVLW  07
015A:  MOVWF  1C
....................  
....................    int slovo,pismeno,sloupec,j; 
....................  
....................  
....................    const int8 pis[33*5]={0b00000001,0b11110110,0b11110110,0b11110110,0b00000001, //A 
....................                         0b00000000,0b01110110,0b01110110,0b01110110,0b10001001,  //B 
....................                         0b10000001,0b01111110,0b01111110,0b01111110,0b10111101,  //C 
....................                         0b00000000,0b01111110,0b01111110,0b01111110,0b10000001,  //D 
....................                         0b00000000,0b01110110,0b01110110,0b01111110,0b01111110,  //E 
....................                         0b00000000,0b11110110,0b11110110,0b11111110,0b11111110,  //F 
....................                         0b10000001,0b01111110,0b01110110,0b01110110,0b10000101,  //G 
....................                         0b00000000,0b11110111,0b11110111,0b11110111,0b00000000,  //H 
....................                         0b01111110,0b01111110,0b00000000,0b01111110,0b01111110,  //I 
....................                         0b10111110,0b01111110,0b01111110,0b01111110,0b10000000,  //J 
....................                         0b00000000,0b11110111,0b11110111,0b11101011,0b00011100,  //K 
....................                         0b00000000,0b01111111,0b01111111,0b01111111,0b01111111,  //L 
....................                         0b00000000,0b11111110,0b11110000,0b11111110,0b00000000,  //M 
....................                         0b00000000,0b11101111,0b11011111,0b10111111,0b00000000,  //N 
....................                         0b10000001,0b01111110,0b01111110,0b01111110,0b10000001,  //O 
....................                         0b00000000,0b11110110,0b11110110,0b11110110,0b11111001,  //P 
....................                         0b10000001,0b01111110,0b01111110,0b01111110,0b00000001,  //Q 
....................                         0b00000000,0b11110110,0b11110110,0b11110110,0b00001001,  //R 
....................                         0b10111001,0b01110110,0b01110110,0b01110110,0b10001101,  //S 
....................                         0b11111110,0b11111110,0b00000000,0b11111110,0b11111110,  //T 
....................                         0b10000000,0b01111111,0b01111111,0b01111111,0b10000000,  //U 
....................                         0b11000000,0b10111111,0b01111111,0b10111111,0b11000000,  //V 
....................                         0b10000000,0b01111111,0b10000000,0b01111111,0b10000000,  //W 
....................                         0b00011100,0b11101011,0b11110111,0b11101011,0b00011100,  //X 
....................                         0b11111000,0b11110111,0b00000111,0b11110111,0b11111000,  //Y 
....................                         0b00011110,0b01101110,0b01110110,0b01111010,0b01111100,  //Z 
....................                         0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,  //mezera 
....................                         0b00010111,0b00110011,0b01010101,0b11100110,0b11110111,  //blesk 
....................                         0b11110000,0b11110111,0b11110111,0b00000001,0b11110111,  //4 
....................                         0b00111101,0b01011110,0b01101110,0b01110110,0b01111001,  //2 
....................                         0b00000000,0b01111110,0b01111110,0b01111110,0b00000000,  //0 
....................                         0b11110111,0b11110111,0b11110111,0b11110111,0b11110111,  //pomlka 
....................                         0b10001001,0b01110110,0b01110110,0b01110110,0b10001001,  //8 
....................                         }; 
....................  
....................    setup_adc_ports(AN0); 
*
015E:  BSF    03.5
015F:  BCF    1F.0
0160:  BSF    1F.1
0161:  BSF    1F.2
0162:  BSF    1F.3
....................    setup_adc(ADC_CLOCK_INTERNAL); 
0163:  BCF    1F.6
0164:  BCF    03.5
0165:  BSF    1F.6
0166:  BSF    1F.7
0167:  BSF    03.5
0168:  BCF    1F.7
0169:  BCF    03.5
016A:  BSF    1F.0
....................    setup_psp(PSP_DISABLED); 
016B:  BSF    03.5
016C:  BCF    09.4
....................    setup_spi(SPI_SS_DISABLED); 
*
015B:  MOVLW  FF
015C:  BCF    03.5
015D:  MOVWF  34
*
016D:  BCF    03.5
016E:  BCF    14.5
016F:  BCF    34.5
0170:  MOVF   34,W
0171:  BSF    03.5
0172:  MOVWF  07
0173:  BCF    03.5
0174:  BSF    34.4
0175:  MOVF   34,W
0176:  BSF    03.5
0177:  MOVWF  07
0178:  BCF    03.5
0179:  BCF    34.3
017A:  MOVF   34,W
017B:  BSF    03.5
017C:  MOVWF  07
017D:  MOVLW  01
017E:  BCF    03.5
017F:  MOVWF  14
0180:  MOVLW  00
0181:  BSF    03.5
0182:  MOVWF  14
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); 
0183:  MOVF   01,W
0184:  ANDLW  C7
0185:  IORLW  08
0186:  MOVWF  01
....................    setup_wdt(WDT_2304MS); 
0187:  MOVLW  0F
0188:  MOVWF  77
0189:  MOVLW  07
018A:  BCF    03.5
018B:  CLRF   01
018C:  MOVLW  81
018D:  MOVWF  04
018E:  MOVF   00,W
018F:  ANDLW  F0
0190:  IORLW  07
0191:  MOVWF  00
0192:  CLRWDT
0193:  MOVF   00,W
0194:  ANDLW  F7
0195:  BTFSC  77.3
0196:  ANDLW  F0
0197:  IORWF  77,W
0198:  MOVWF  00
....................    setup_timer_1(T1_DISABLED); 
0199:  CLRF   10
....................    setup_timer_2(T2_DISABLED,0,1); 
019A:  MOVLW  00
019B:  MOVWF  78
019C:  MOVWF  12
019D:  MOVLW  00
019E:  BSF    03.5
019F:  MOVWF  12
....................    setup_comparator(NC_NC_NC_NC); 
01A0:  MOVLW  07
01A1:  MOVWF  1C
01A2:  MOVF   05,W
01A3:  CLRWDT
01A4:  MOVLW  02
01A5:  MOVWF  77
01A6:  DECFSZ 77,F
01A7:  GOTO   1A6
01A8:  NOP
01A9:  NOP
01AA:  MOVF   1C,W
01AB:  BCF    03.5
01AC:  BCF    0D.6
....................    setup_vref(FALSE); 
01AD:  BSF    03.5
01AE:  CLRF   1D
....................  
....................    enable_interrupts(INT_RDA); 
01AF:  BSF    0C.5
....................    enable_interrupts(GLOBAL); 
01B0:  MOVLW  C0
01B1:  BCF    03.5
01B2:  IORWF  0B,F
....................  
....................    set_adc_channel(0);     // Prevodnik pro Hall 
01B3:  MOVLW  00
01B4:  MOVWF  78
01B5:  MOVF   1F,W
01B6:  ANDLW  C7
01B7:  IORWF  78,W
01B8:  MOVWF  1F
....................    output_B(0xFF);         // Zhasneme 
01B9:  BSF    03.5
01BA:  CLRF   06
01BB:  MOVLW  FF
01BC:  BCF    03.5
01BD:  MOVWF  06
....................  
....................    otacky=0; 
01BE:  CLRF   33
....................    napis[0]=0; 
01BF:  CLRF   28
....................  
....................    while(TRUE) 
....................    { 
....................       while(napis[0]!=0) 
....................       { 
01C0:  MOVF   28,F
01C1:  BTFSC  03.2
01C2:  GOTO   1FE
....................          while(read_adc()<9);       // Cekani na magnet 
01C3:  BSF    1F.2
01C4:  BTFSC  1F.2
01C5:  GOTO   1C4
01C6:  MOVF   1E,W
01C7:  SUBLW  08
01C8:  BTFSC  03.0
01C9:  GOTO   1C3
....................          delay_ms(10); 
01CA:  MOVLW  0A
01CB:  MOVWF  39
01CC:  CALL   10D
....................  
....................          for(pismeno=0;pismeno<MAX_SLOVO;pismeno++) 
01CD:  CLRF   36
01CE:  MOVF   36,W
01CF:  SUBLW  09
01D0:  BTFSS  03.0
01D1:  GOTO   1FD
....................          { 
....................             for(sloupec=0;sloupec<5;sloupec++) 
01D2:  CLRF   37
01D3:  MOVF   37,W
01D4:  SUBLW  04
01D5:  BTFSS  03.0
01D6:  GOTO   1F1
....................             { 
....................                output_B(pis[(napis[pismeno]-0x41)*5+sloupec]); 
01D7:  MOVLW  28
01D8:  ADDWF  36,W
01D9:  MOVWF  04
01DA:  MOVLW  41
01DB:  SUBWF  00,W
01DC:  MOVWF  3B
01DD:  MOVWF  3D
01DE:  MOVLW  05
01DF:  MOVWF  3E
01E0:  CALL   124
01E1:  MOVF   37,W
01E2:  ADDWF  78,W
01E3:  CALL   04D
01E4:  MOVWF  39
01E5:  BSF    03.5
01E6:  CLRF   06
01E7:  BCF    03.5
01E8:  MOVF   39,W
01E9:  MOVWF  06
....................                delay_us(500); 
01EA:  CLRWDT
01EB:  MOVLW  A6
01EC:  MOVWF  77
01ED:  DECFSZ 77,F
01EE:  GOTO   1ED
....................             } 
01EF:  INCF   37,F
01F0:  GOTO   1D3
....................             output_B(0xFF); 
01F1:  BSF    03.5
01F2:  CLRF   06
01F3:  MOVLW  FF
01F4:  BCF    03.5
01F5:  MOVWF  06
....................             delay_us(500); 
01F6:  CLRWDT
01F7:  MOVLW  A6
01F8:  MOVWF  77
01F9:  DECFSZ 77,F
01FA:  GOTO   1F9
....................          } 
01FB:  INCF   36,F
01FC:  GOTO   1CE
....................       } 
01FD:  GOTO   1C0
....................  
....................       for(slovo=0;slovo<2;slovo++) 
01FE:  CLRF   35
01FF:  MOVF   35,W
0200:  SUBLW  01
0201:  BTFSS  03.0
0202:  GOTO   251
....................       for(j=0;j<=20;j++)   // Jedno slovo se zobrazi stokrat 
0203:  CLRF   38
0204:  MOVF   38,W
0205:  SUBLW  14
0206:  BTFSS  03.0
0207:  GOTO   24F
....................       { 
....................          while(read_adc()<9);       // Cekani na magnet 
0208:  BSF    1F.2
0209:  BTFSC  1F.2
020A:  GOTO   209
020B:  MOVF   1E,W
020C:  SUBLW  08
020D:  BTFSC  03.0
020E:  GOTO   208
....................          delay_ms(10); 
020F:  MOVLW  0A
0210:  MOVWF  39
0211:  CALL   10D
....................  
....................          for(pismeno=0;pismeno<MAX_SLOVO;pismeno++) 
0212:  CLRF   36
0213:  MOVF   36,W
0214:  SUBLW  09
0215:  BTFSS  03.0
0216:  GOTO   246
....................          { 
....................             for(sloupec=0;sloupec<5;sloupec++) 
0217:  CLRF   37
0218:  MOVF   37,W
0219:  SUBLW  04
021A:  BTFSS  03.0
021B:  GOTO   23A
....................             { 
....................                output_B(pis[(logo[slovo*MAX_SLOVO+pismeno]-0x41)*5+sloupec]); 
021C:  MOVF   35,W
021D:  MOVWF  3D
021E:  MOVLW  0A
021F:  MOVWF  3E
0220:  CALL   124
0221:  MOVF   36,W
0222:  ADDWF  78,W
0223:  CALL   035
0224:  ADDLW  BF
0225:  MOVWF  3C
0226:  MOVWF  3D
0227:  MOVLW  05
0228:  MOVWF  3E
0229:  CALL   124
022A:  MOVF   37,W
022B:  ADDWF  78,W
022C:  CALL   04D
022D:  MOVWF  39
022E:  BSF    03.5
022F:  CLRF   06
0230:  BCF    03.5
0231:  MOVF   39,W
0232:  MOVWF  06
....................                delay_us(500); 
0233:  CLRWDT
0234:  MOVLW  A6
0235:  MOVWF  77
0236:  DECFSZ 77,F
0237:  GOTO   236
....................             } 
0238:  INCF   37,F
0239:  GOTO   218
....................             output_B(0xFF); 
023A:  BSF    03.5
023B:  CLRF   06
023C:  MOVLW  FF
023D:  BCF    03.5
023E:  MOVWF  06
....................             delay_us(500); 
023F:  CLRWDT
0240:  MOVLW  A6
0241:  MOVWF  77
0242:  DECFSZ 77,F
0243:  GOTO   242
....................          } 
0244:  INCF   36,F
0245:  GOTO   213
....................          if (otacky++>120) reset_cpu(); 
0246:  MOVF   33,W
0247:  INCF   33,F
0248:  SUBLW  78
0249:  BTFSC  03.0
024A:  GOTO   24D
024B:  CLRF   0A
024C:  GOTO   000
....................       } 
024D:  INCF   38,F
024E:  GOTO   204
024F:  INCF   35,F
0250:  GOTO   1FF
....................    } 
0251:  GOTO   1C0
.................... } 
0252:  SLEEP

Configuration Fuses:
   Word  1: 3F3D   XT WDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD NOWRT