Subversion Repositories svnkaklik

Rev

Blame | Last modification | View Log | Download

CCS PCM C Compiler, Version 3.221, 27853               27-XI-05 00:06

               Filename: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.LST

               ROM used: 301 words (7%)
                         Largest free fragment is 2048
               RAM used: 7 (4%) at main() level
                         8 (5%) worst case
               Stack:    1 locations

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   02C
0003:  NOP
....................  #include "D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h" 
....................  #include <16F88.h> 
....................  //////// Standard Header file for the PIC16F88 device ////////////////  
.................... #device PIC16F88  
.................... #list  
....................  
.................... #device adc=8  
.................... #fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, LVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO  
.................... #use delay(clock=4000000)  
0004:  MOVLW  22
0005:  MOVWF  04
0006:  MOVF   00,W
0007:  BTFSC  03.2
0008:  GOTO   018
0009:  MOVLW  01
000A:  MOVWF  78
000B:  CLRF   77
000C:  DECFSZ 77,F
000D:  GOTO   00C
000E:  DECFSZ 78,F
000F:  GOTO   00B
0010:  MOVLW  4A
0011:  MOVWF  77
0012:  DECFSZ 77,F
0013:  GOTO   012
0014:  NOP
0015:  NOP
0016:  DECFSZ 00,F
0017:  GOTO   009
0018:  RETLW  00
0019:  MOVLW  12
001A:  SUBWF  23,F
001B:  BTFSS  03.0
001C:  GOTO   02B
001D:  MOVLW  23
001E:  MOVWF  04
001F:  MOVLW  FC
0020:  ANDWF  00,F
0021:  BCF    03.0
0022:  RRF    00,F
0023:  RRF    00,F
0024:  MOVF   00,W
0025:  BTFSC  03.2
0026:  GOTO   02B
0027:  GOTO   029
0028:  NOP
0029:  DECFSZ 00,F
002A:  GOTO   028
002B:  RETLW  00
....................   
....................  
....................   
.................... #DEFINE servo1 PIN_B1  
.................... #DEFINE servo2 PIN_A3  
.................... #DEFINE servo3 PIN_A2  
.................... #DEFINE servo4 PIN_A0  
.................... #DEFINE SW     PIN_B2  
....................   
.................... void main()  
.................... {  
002C:  CLRF   04
002D:  MOVLW  1F
002E:  ANDWF  03,F
002F:  BSF    03.5
0030:  BCF    1F.4
0031:  BCF    1F.5
0032:  MOVF   1B,W
0033:  ANDLW  80
0034:  MOVWF  1B
0035:  MOVLW  07
0036:  MOVWF  1C
0037:  MOVF   1C,W
0038:  BCF    03.5
0039:  BCF    0D.6
003A:  MOVLW  60
003B:  BSF    03.5
003C:  MOVWF  0F
.................... int i;  
....................   
....................    setup_adc_ports(NO_ANALOGS|VSS_VDD);  
003D:  BCF    1F.4
003E:  BCF    1F.5
003F:  MOVF   1B,W
0040:  ANDLW  80
0041:  MOVWF  1B
....................    setup_adc(ADC_OFF);  
0042:  BCF    03.5
0043:  BCF    1F.0
....................    setup_spi(FALSE);  
0044:  BCF    14.5
0045:  BSF    03.5
0046:  BCF    06.2
0047:  BSF    06.1
0048:  BCF    06.4
0049:  MOVLW  00
004A:  BCF    03.5
004B:  MOVWF  14
004C:  BSF    03.5
004D:  MOVWF  14
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);  
004E:  MOVF   01,W
004F:  ANDLW  C7
0050:  IORLW  08
0051:  MOVWF  01
....................    setup_timer_1(T1_DISABLED);  
0052:  BCF    03.5
0053:  CLRF   10
....................    setup_timer_2(T2_DISABLED,0,1);  
0054:  MOVLW  00
0055:  MOVWF  78
0056:  MOVWF  12
0057:  MOVLW  00
0058:  BSF    03.5
0059:  MOVWF  12
....................    setup_comparator(NC_NC_NC_NC);  
005A:  MOVLW  07
005B:  MOVWF  1C
005C:  MOVF   05,W
005D:  MOVLW  03
005E:  MOVWF  77
005F:  DECFSZ 77,F
0060:  GOTO   05F
0061:  MOVF   1C,W
0062:  BCF    03.5
0063:  BCF    0D.6
....................    setup_vref(FALSE);  
0064:  BSF    03.5
0065:  CLRF   1D
....................   
....................   
....................   
....................    while(true)  
....................    {     
....................       While(input(SW))   
....................       {  
0066:  BSF    06.2
0067:  BCF    03.5
0068:  BTFSS  06.2
0069:  GOTO   0B8
....................          output_high(servo1);  
006A:  BSF    03.5
006B:  BCF    06.1
006C:  BCF    03.5
006D:  BSF    06.1
....................          Delay_us(1500);  
006E:  MOVLW  01
006F:  MOVWF  22
0070:  CALL   004
0071:  MOVLW  02
0072:  MOVWF  22
0073:  MOVLW  F7
0074:  MOVWF  23
0075:  CALL   019
0076:  DECFSZ 22,F
0077:  GOTO   073
....................          output_low(servo1);  
0078:  BSF    03.5
0079:  BCF    06.1
007A:  BCF    03.5
007B:  BCF    06.1
....................            
....................          output_high(servo2);  
007C:  BSF    03.5
007D:  BCF    05.3
007E:  BCF    03.5
007F:  BSF    05.3
....................          Delay_us(1500);  
0080:  MOVLW  01
0081:  MOVWF  22
0082:  CALL   004
0083:  MOVLW  02
0084:  MOVWF  22
0085:  MOVLW  F7
0086:  MOVWF  23
0087:  CALL   019
0088:  DECFSZ 22,F
0089:  GOTO   085
....................          output_low(servo2);  
008A:  BSF    03.5
008B:  BCF    05.3
008C:  BCF    03.5
008D:  BCF    05.3
....................            
....................          output_high(servo3);  
008E:  BSF    03.5
008F:  BCF    05.2
0090:  BCF    03.5
0091:  BSF    05.2
....................          Delay_us(1500);  
0092:  MOVLW  01
0093:  MOVWF  22
0094:  CALL   004
0095:  MOVLW  02
0096:  MOVWF  22
0097:  MOVLW  F7
0098:  MOVWF  23
0099:  CALL   019
009A:  DECFSZ 22,F
009B:  GOTO   097
....................          output_low(servo3);   
009C:  BSF    03.5
009D:  BCF    05.2
009E:  BCF    03.5
009F:  BCF    05.2
....................            
....................          output_high(servo4);  
00A0:  BSF    03.5
00A1:  BCF    05.0
00A2:  BCF    03.5
00A3:  BSF    05.0
....................          Delay_us(1500);  
00A4:  MOVLW  01
00A5:  MOVWF  22
00A6:  CALL   004
00A7:  MOVLW  02
00A8:  MOVWF  22
00A9:  MOVLW  F7
00AA:  MOVWF  23
00AB:  CALL   019
00AC:  DECFSZ 22,F
00AD:  GOTO   0A9
....................          output_low(servo4);  
00AE:  BSF    03.5
00AF:  BCF    05.0
00B0:  BCF    03.5
00B1:  BCF    05.0
....................            
....................          Delay_ms(10);  
00B2:  MOVLW  0A
00B3:  MOVWF  22
00B4:  CALL   004
....................       }  
00B5:  BSF    03.5
00B6:  GOTO   066
00B7:  BCF    03.5
....................         
....................       While(!input(SW))  
....................       {  
00B8:  BSF    03.5
00B9:  BSF    06.2
00BA:  BCF    03.5
00BB:  BTFSC  06.2
00BC:  GOTO   12A
....................          for(i=0; i<100; ++i)  
00BD:  CLRF   21
00BE:  MOVF   21,W
00BF:  SUBLW  63
00C0:  BTFSS  03.0
00C1:  GOTO   0F3
....................          {  
....................             output_high(servo1);  
00C2:  BSF    03.5
00C3:  BCF    06.1
00C4:  BCF    03.5
00C5:  BSF    06.1
....................             Delay_us(1000);  
00C6:  MOVLW  01
00C7:  MOVWF  22
00C8:  CALL   004
....................             output_low(servo1);  
00C9:  BSF    03.5
00CA:  BCF    06.1
00CB:  BCF    03.5
00CC:  BCF    06.1
....................               
....................             output_high(servo2);  
00CD:  BSF    03.5
00CE:  BCF    05.3
00CF:  BCF    03.5
00D0:  BSF    05.3
....................             Delay_us(1000);  
00D1:  MOVLW  01
00D2:  MOVWF  22
00D3:  CALL   004
....................             output_low(servo2);  
00D4:  BSF    03.5
00D5:  BCF    05.3
00D6:  BCF    03.5
00D7:  BCF    05.3
....................               
....................             output_high(servo3);  
00D8:  BSF    03.5
00D9:  BCF    05.2
00DA:  BCF    03.5
00DB:  BSF    05.2
....................             Delay_us(1000);  
00DC:  MOVLW  01
00DD:  MOVWF  22
00DE:  CALL   004
....................             output_low(servo3);   
00DF:  BSF    03.5
00E0:  BCF    05.2
00E1:  BCF    03.5
00E2:  BCF    05.2
....................               
....................             output_high(servo4);  
00E3:  BSF    03.5
00E4:  BCF    05.0
00E5:  BCF    03.5
00E6:  BSF    05.0
....................             Delay_us(1000);  
00E7:  MOVLW  01
00E8:  MOVWF  22
00E9:  CALL   004
....................             output_low(servo4);  
00EA:  BSF    03.5
00EB:  BCF    05.0
00EC:  BCF    03.5
00ED:  BCF    05.0
....................               
....................             Delay_ms(10);  
00EE:  MOVLW  0A
00EF:  MOVWF  22
00F0:  CALL   004
....................          }  
00F1:  INCF   21,F
00F2:  GOTO   0BE
....................            
....................          for(i=0; i<100; ++i)  
00F3:  CLRF   21
00F4:  MOVF   21,W
00F5:  SUBLW  63
00F6:  BTFSS  03.0
00F7:  GOTO   129
....................          {  
....................             output_high(servo1);  
00F8:  BSF    03.5
00F9:  BCF    06.1
00FA:  BCF    03.5
00FB:  BSF    06.1
....................             Delay_us(2000);  
00FC:  MOVLW  02
00FD:  MOVWF  22
00FE:  CALL   004
....................             output_low(servo1);  
00FF:  BSF    03.5
0100:  BCF    06.1
0101:  BCF    03.5
0102:  BCF    06.1
....................               
....................             output_high(servo2);  
0103:  BSF    03.5
0104:  BCF    05.3
0105:  BCF    03.5
0106:  BSF    05.3
....................             Delay_us(2000);  
0107:  MOVLW  02
0108:  MOVWF  22
0109:  CALL   004
....................             output_low(servo2);  
010A:  BSF    03.5
010B:  BCF    05.3
010C:  BCF    03.5
010D:  BCF    05.3
....................               
....................             output_high(servo3);  
010E:  BSF    03.5
010F:  BCF    05.2
0110:  BCF    03.5
0111:  BSF    05.2
....................             Delay_us(2000);  
0112:  MOVLW  02
0113:  MOVWF  22
0114:  CALL   004
....................             output_low(servo3);   
0115:  BSF    03.5
0116:  BCF    05.2
0117:  BCF    03.5
0118:  BCF    05.2
....................               
....................             output_high(servo4);  
0119:  BSF    03.5
011A:  BCF    05.0
011B:  BCF    03.5
011C:  BSF    05.0
....................             Delay_us(2000);  
011D:  MOVLW  02
011E:  MOVWF  22
011F:  CALL   004
....................             output_low(servo4);  
0120:  BSF    03.5
0121:  BCF    05.0
0122:  BCF    03.5
0123:  BCF    05.0
....................               
....................             Delay_ms(10);  
0124:  MOVLW  0A
0125:  MOVWF  22
0126:  CALL   004
....................          }             
0127:  INCF   21,F
0128:  GOTO   0F4
....................       }  
0129:  GOTO   0B8
....................    }        
012A:  BSF    03.5
012B:  GOTO   066
....................   
.................... }  
....................  
012C:  SLEEP

Configuration Fuses:
   Word  1: 3FF8   NOWDT NOPUT MCLR BROWNOUT LVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO
   Word  2: 3FFF   FCMEN IESO