Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
CCS PCM C Compiler, Version 3.221, 27853               27-XI-05 00:06
2
 
3
               Filename: D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.LST
4
 
5
               ROM used: 301 words (7%)
6
                         Largest free fragment is 2048
7
               RAM used: 7 (4%) at main() level
8
                         8 (5%) worst case
9
               Stack:    1 locations
10
 
11
*
12
0000:  MOVLW  00
13
0001:  MOVWF  0A
14
0002:  GOTO   02C
15
0003:  NOP
16
....................  #include "D:\KAKLIK\programy\PIC_C\mereni\serva\PIC16F88\tester.h" 
17
....................  #include <16F88.h> 
18
....................  //////// Standard Header file for the PIC16F88 device ////////////////  
19
.................... #device PIC16F88  
20
.................... #list  
21
....................  
22
.................... #device adc=8  
23
.................... #fuses NOWDT,INTRC_IO, NOPUT, MCLR, BROWNOUT, LVP, NOCPD, NOWRT, NODEBUG, NOPROTECT, FCMEN, IESO  
24
.................... #use delay(clock=4000000)  
25
0004:  MOVLW  22
26
0005:  MOVWF  04
27
0006:  MOVF   00,W
28
0007:  BTFSC  03.2
29
0008:  GOTO   018
30
0009:  MOVLW  01
31
000A:  MOVWF  78
32
000B:  CLRF   77
33
000C:  DECFSZ 77,F
34
000D:  GOTO   00C
35
000E:  DECFSZ 78,F
36
000F:  GOTO   00B
37
0010:  MOVLW  4A
38
0011:  MOVWF  77
39
0012:  DECFSZ 77,F
40
0013:  GOTO   012
41
0014:  NOP
42
0015:  NOP
43
0016:  DECFSZ 00,F
44
0017:  GOTO   009
45
0018:  RETLW  00
46
0019:  MOVLW  12
47
001A:  SUBWF  23,F
48
001B:  BTFSS  03.0
49
001C:  GOTO   02B
50
001D:  MOVLW  23
51
001E:  MOVWF  04
52
001F:  MOVLW  FC
53
0020:  ANDWF  00,F
54
0021:  BCF    03.0
55
0022:  RRF    00,F
56
0023:  RRF    00,F
57
0024:  MOVF   00,W
58
0025:  BTFSC  03.2
59
0026:  GOTO   02B
60
0027:  GOTO   029
61
0028:  NOP
62
0029:  DECFSZ 00,F
63
002A:  GOTO   028
64
002B:  RETLW  00
65
....................   
66
....................  
67
....................   
68
.................... #DEFINE servo1 PIN_B1  
69
.................... #DEFINE servo2 PIN_A3  
70
.................... #DEFINE servo3 PIN_A2  
71
.................... #DEFINE servo4 PIN_A0  
72
.................... #DEFINE SW     PIN_B2  
73
....................   
74
.................... void main()  
75
.................... {  
76
002C:  CLRF   04
77
002D:  MOVLW  1F
78
002E:  ANDWF  03,F
79
002F:  BSF    03.5
80
0030:  BCF    1F.4
81
0031:  BCF    1F.5
82
0032:  MOVF   1B,W
83
0033:  ANDLW  80
84
0034:  MOVWF  1B
85
0035:  MOVLW  07
86
0036:  MOVWF  1C
87
0037:  MOVF   1C,W
88
0038:  BCF    03.5
89
0039:  BCF    0D.6
90
003A:  MOVLW  60
91
003B:  BSF    03.5
92
003C:  MOVWF  0F
93
.................... int i;  
94
....................   
95
....................    setup_adc_ports(NO_ANALOGS|VSS_VDD);  
96
003D:  BCF    1F.4
97
003E:  BCF    1F.5
98
003F:  MOVF   1B,W
99
0040:  ANDLW  80
100
0041:  MOVWF  1B
101
....................    setup_adc(ADC_OFF);  
102
0042:  BCF    03.5
103
0043:  BCF    1F.0
104
....................    setup_spi(FALSE);  
105
0044:  BCF    14.5
106
0045:  BSF    03.5
107
0046:  BCF    06.2
108
0047:  BSF    06.1
109
0048:  BCF    06.4
110
0049:  MOVLW  00
111
004A:  BCF    03.5
112
004B:  MOVWF  14
113
004C:  BSF    03.5
114
004D:  MOVWF  14
115
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);  
116
004E:  MOVF   01,W
117
004F:  ANDLW  C7
118
0050:  IORLW  08
119
0051:  MOVWF  01
120
....................    setup_timer_1(T1_DISABLED);  
121
0052:  BCF    03.5
122
0053:  CLRF   10
123
....................    setup_timer_2(T2_DISABLED,0,1);  
124
0054:  MOVLW  00
125
0055:  MOVWF  78
126
0056:  MOVWF  12
127
0057:  MOVLW  00
128
0058:  BSF    03.5
129
0059:  MOVWF  12
130
....................    setup_comparator(NC_NC_NC_NC);  
131
005A:  MOVLW  07
132
005B:  MOVWF  1C
133
005C:  MOVF   05,W
134
005D:  MOVLW  03
135
005E:  MOVWF  77
136
005F:  DECFSZ 77,F
137
0060:  GOTO   05F
138
0061:  MOVF   1C,W
139
0062:  BCF    03.5
140
0063:  BCF    0D.6
141
....................    setup_vref(FALSE);  
142
0064:  BSF    03.5
143
0065:  CLRF   1D
144
....................   
145
....................   
146
....................   
147
....................    while(true)  
148
....................    {     
149
....................       While(input(SW))   
150
....................       {  
151
0066:  BSF    06.2
152
0067:  BCF    03.5
153
0068:  BTFSS  06.2
154
0069:  GOTO   0B8
155
....................          output_high(servo1);  
156
006A:  BSF    03.5
157
006B:  BCF    06.1
158
006C:  BCF    03.5
159
006D:  BSF    06.1
160
....................          Delay_us(1500);  
161
006E:  MOVLW  01
162
006F:  MOVWF  22
163
0070:  CALL   004
164
0071:  MOVLW  02
165
0072:  MOVWF  22
166
0073:  MOVLW  F7
167
0074:  MOVWF  23
168
0075:  CALL   019
169
0076:  DECFSZ 22,F
170
0077:  GOTO   073
171
....................          output_low(servo1);  
172
0078:  BSF    03.5
173
0079:  BCF    06.1
174
007A:  BCF    03.5
175
007B:  BCF    06.1
176
....................            
177
....................          output_high(servo2);  
178
007C:  BSF    03.5
179
007D:  BCF    05.3
180
007E:  BCF    03.5
181
007F:  BSF    05.3
182
....................          Delay_us(1500);  
183
0080:  MOVLW  01
184
0081:  MOVWF  22
185
0082:  CALL   004
186
0083:  MOVLW  02
187
0084:  MOVWF  22
188
0085:  MOVLW  F7
189
0086:  MOVWF  23
190
0087:  CALL   019
191
0088:  DECFSZ 22,F
192
0089:  GOTO   085
193
....................          output_low(servo2);  
194
008A:  BSF    03.5
195
008B:  BCF    05.3
196
008C:  BCF    03.5
197
008D:  BCF    05.3
198
....................            
199
....................          output_high(servo3);  
200
008E:  BSF    03.5
201
008F:  BCF    05.2
202
0090:  BCF    03.5
203
0091:  BSF    05.2
204
....................          Delay_us(1500);  
205
0092:  MOVLW  01
206
0093:  MOVWF  22
207
0094:  CALL   004
208
0095:  MOVLW  02
209
0096:  MOVWF  22
210
0097:  MOVLW  F7
211
0098:  MOVWF  23
212
0099:  CALL   019
213
009A:  DECFSZ 22,F
214
009B:  GOTO   097
215
....................          output_low(servo3);   
216
009C:  BSF    03.5
217
009D:  BCF    05.2
218
009E:  BCF    03.5
219
009F:  BCF    05.2
220
....................            
221
....................          output_high(servo4);  
222
00A0:  BSF    03.5
223
00A1:  BCF    05.0
224
00A2:  BCF    03.5
225
00A3:  BSF    05.0
226
....................          Delay_us(1500);  
227
00A4:  MOVLW  01
228
00A5:  MOVWF  22
229
00A6:  CALL   004
230
00A7:  MOVLW  02
231
00A8:  MOVWF  22
232
00A9:  MOVLW  F7
233
00AA:  MOVWF  23
234
00AB:  CALL   019
235
00AC:  DECFSZ 22,F
236
00AD:  GOTO   0A9
237
....................          output_low(servo4);  
238
00AE:  BSF    03.5
239
00AF:  BCF    05.0
240
00B0:  BCF    03.5
241
00B1:  BCF    05.0
242
....................            
243
....................          Delay_ms(10);  
244
00B2:  MOVLW  0A
245
00B3:  MOVWF  22
246
00B4:  CALL   004
247
....................       }  
248
00B5:  BSF    03.5
249
00B6:  GOTO   066
250
00B7:  BCF    03.5
251
....................         
252
....................       While(!input(SW))  
253
....................       {  
254
00B8:  BSF    03.5
255
00B9:  BSF    06.2
256
00BA:  BCF    03.5
257
00BB:  BTFSC  06.2
258
00BC:  GOTO   12A
259
....................          for(i=0; i<100; ++i)  
260
00BD:  CLRF   21
261
00BE:  MOVF   21,W
262
00BF:  SUBLW  63
263
00C0:  BTFSS  03.0
264
00C1:  GOTO   0F3
265
....................          {  
266
....................             output_high(servo1);  
267
00C2:  BSF    03.5
268
00C3:  BCF    06.1
269
00C4:  BCF    03.5
270
00C5:  BSF    06.1
271
....................             Delay_us(1000);  
272
00C6:  MOVLW  01
273
00C7:  MOVWF  22
274
00C8:  CALL   004
275
....................             output_low(servo1);  
276
00C9:  BSF    03.5
277
00CA:  BCF    06.1
278
00CB:  BCF    03.5
279
00CC:  BCF    06.1
280
....................               
281
....................             output_high(servo2);  
282
00CD:  BSF    03.5
283
00CE:  BCF    05.3
284
00CF:  BCF    03.5
285
00D0:  BSF    05.3
286
....................             Delay_us(1000);  
287
00D1:  MOVLW  01
288
00D2:  MOVWF  22
289
00D3:  CALL   004
290
....................             output_low(servo2);  
291
00D4:  BSF    03.5
292
00D5:  BCF    05.3
293
00D6:  BCF    03.5
294
00D7:  BCF    05.3
295
....................               
296
....................             output_high(servo3);  
297
00D8:  BSF    03.5
298
00D9:  BCF    05.2
299
00DA:  BCF    03.5
300
00DB:  BSF    05.2
301
....................             Delay_us(1000);  
302
00DC:  MOVLW  01
303
00DD:  MOVWF  22
304
00DE:  CALL   004
305
....................             output_low(servo3);   
306
00DF:  BSF    03.5
307
00E0:  BCF    05.2
308
00E1:  BCF    03.5
309
00E2:  BCF    05.2
310
....................               
311
....................             output_high(servo4);  
312
00E3:  BSF    03.5
313
00E4:  BCF    05.0
314
00E5:  BCF    03.5
315
00E6:  BSF    05.0
316
....................             Delay_us(1000);  
317
00E7:  MOVLW  01
318
00E8:  MOVWF  22
319
00E9:  CALL   004
320
....................             output_low(servo4);  
321
00EA:  BSF    03.5
322
00EB:  BCF    05.0
323
00EC:  BCF    03.5
324
00ED:  BCF    05.0
325
....................               
326
....................             Delay_ms(10);  
327
00EE:  MOVLW  0A
328
00EF:  MOVWF  22
329
00F0:  CALL   004
330
....................          }  
331
00F1:  INCF   21,F
332
00F2:  GOTO   0BE
333
....................            
334
....................          for(i=0; i<100; ++i)  
335
00F3:  CLRF   21
336
00F4:  MOVF   21,W
337
00F5:  SUBLW  63
338
00F6:  BTFSS  03.0
339
00F7:  GOTO   129
340
....................          {  
341
....................             output_high(servo1);  
342
00F8:  BSF    03.5
343
00F9:  BCF    06.1
344
00FA:  BCF    03.5
345
00FB:  BSF    06.1
346
....................             Delay_us(2000);  
347
00FC:  MOVLW  02
348
00FD:  MOVWF  22
349
00FE:  CALL   004
350
....................             output_low(servo1);  
351
00FF:  BSF    03.5
352
0100:  BCF    06.1
353
0101:  BCF    03.5
354
0102:  BCF    06.1
355
....................               
356
....................             output_high(servo2);  
357
0103:  BSF    03.5
358
0104:  BCF    05.3
359
0105:  BCF    03.5
360
0106:  BSF    05.3
361
....................             Delay_us(2000);  
362
0107:  MOVLW  02
363
0108:  MOVWF  22
364
0109:  CALL   004
365
....................             output_low(servo2);  
366
010A:  BSF    03.5
367
010B:  BCF    05.3
368
010C:  BCF    03.5
369
010D:  BCF    05.3
370
....................               
371
....................             output_high(servo3);  
372
010E:  BSF    03.5
373
010F:  BCF    05.2
374
0110:  BCF    03.5
375
0111:  BSF    05.2
376
....................             Delay_us(2000);  
377
0112:  MOVLW  02
378
0113:  MOVWF  22
379
0114:  CALL   004
380
....................             output_low(servo3);   
381
0115:  BSF    03.5
382
0116:  BCF    05.2
383
0117:  BCF    03.5
384
0118:  BCF    05.2
385
....................               
386
....................             output_high(servo4);  
387
0119:  BSF    03.5
388
011A:  BCF    05.0
389
011B:  BCF    03.5
390
011C:  BSF    05.0
391
....................             Delay_us(2000);  
392
011D:  MOVLW  02
393
011E:  MOVWF  22
394
011F:  CALL   004
395
....................             output_low(servo4);  
396
0120:  BSF    03.5
397
0121:  BCF    05.0
398
0122:  BCF    03.5
399
0123:  BCF    05.0
400
....................               
401
....................             Delay_ms(10);  
402
0124:  MOVLW  0A
403
0125:  MOVWF  22
404
0126:  CALL   004
405
....................          }             
406
0127:  INCF   21,F
407
0128:  GOTO   0F4
408
....................       }  
409
0129:  GOTO   0B8
410
....................    }        
411
012A:  BSF    03.5
412
012B:  GOTO   066
413
....................   
414
.................... }  
415
....................  
416
012C:  SLEEP
417
 
418
Configuration Fuses:
419
   Word  1: 3FF8   NOWDT NOPUT MCLR BROWNOUT LVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO
420
   Word  2: 3FFF   FCMEN IESO