Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
2 kaklik 1
CCS PCM C Compiler, Version 3.245, 27853               01-IV-06 23:13
2
 
3
               Filename: D:\KAKLIK\programy\PIC_C\roboti\istrobot\3Orbis\main.lst
4
 
5
               ROM used: 582 words (14%)
6
                         Largest free fragment is 2048
7
               RAM used: 35 (20%) at main() level
8
                         38 (22%) worst case
9
               Stack:    3 worst case (1 in main + 2 for interrupts)
10
 
11
*
12
0000:  MOVLW  00
13
0001:  MOVWF  0A
14
0002:  GOTO   18F
15
0003:  NOP
16
.................... #include ".\main.h" 
17
.................... #include <16F88.h> 
18
.................... //////// Standard Header file for the PIC16F88 device //////////////// 
19
.................... #device PIC16F88 
20
.................... #list 
21
....................  
22
.................... #device adc=8 
23
....................  
24
.................... #FUSES NOWDT                 	//No Watch Dog Timer 
25
.................... #FUSES INTRC_IO               
26
.................... #FUSES NOPUT                 	//No Power Up Timer 
27
.................... #FUSES MCLR                  	//Master Clear pin enabled 
28
.................... #FUSES BROWNOUT              	//Reset when brownout detected 
29
.................... #FUSES LVP                   	//Low Voltage Programming on B3(PIC16) or B5(PIC18) 
30
.................... #FUSES NOCPD                 	//No EE protection 
31
.................... #FUSES NOWRT                 	//Program memory not write protected 
32
.................... #FUSES NODEBUG               	//No Debug mode for ICD 
33
.................... #FUSES NOPROTECT             	//Code not protected from reading 
34
.................... #FUSES FCMEN                 	//Fail-safe clock monitor enabled 
35
.................... #FUSES IESO                  	//Internal External Switch Over mode enabled 
36
....................  
37
.................... #use delay(clock=8000000,RESTART_WDT) 
38
000E:  MOVLW  3F
39
000F:  MOVWF  04
40
0010:  MOVF   00,W
41
0011:  BTFSC  03.2
42
0012:  GOTO   025
43
0013:  MOVLW  02
44
0014:  MOVWF  78
45
0015:  MOVLW  BF
46
0016:  MOVWF  77
47
0017:  CLRWDT
48
0018:  DECFSZ 77,F
49
0019:  GOTO   017
50
001A:  DECFSZ 78,F
51
001B:  GOTO   015
52
001C:  MOVLW  96
53
001D:  MOVWF  77
54
001E:  DECFSZ 77,F
55
001F:  GOTO   01E
56
0020:  NOP
57
0021:  NOP
58
0022:  CLRWDT
59
0023:  DECFSZ 00,F
60
0024:  GOTO   013
61
0025:  BCF    0A.3
62
0026:  GOTO   040 (RETURN)
63
0027:  MOVLW  08
64
0028:  SUBWF  3F,F
65
0029:  BTFSS  03.0
66
002A:  GOTO   036
67
002B:  MOVLW  3F
68
002C:  MOVWF  04
69
002D:  BCF    03.0
70
002E:  RRF    00,F
71
002F:  MOVF   00,W
72
0030:  BTFSC  03.2
73
0031:  GOTO   036
74
0032:  GOTO   034
75
0033:  CLRWDT
76
0034:  DECFSZ 00,F
77
0035:  GOTO   033
78
0036:  BCF    0A.3
79
0037:  GOTO   043 (RETURN)
80
....................  
81
....................  
82
....................  
83
.................... #use rtos (timer=2, minor_cycle=2ms) 
84
....................  
85
.................... unsigned int8 sensors;        // pomocna promenna pro cteni cidel na caru 
86
.................... unsigned int8 line;           // na ktere strane byla detekovana cara 
87
.................... unsigned int8 dira;           // pocita dobu po kterou je ztracena cara 
88
.................... unsigned int8 uhel;           // urcuje aktualni uhel zataceni 
89
....................  
90
.................... signed int16  Lmotor;                 // promene, ktere urcuji velikost vykonu na levem 
91
.................... signed int16  Rmotor;                 // a pravem motoru 
92
....................  
93
.................... #define  LMAX        190      // maximalni zatoceni doleva 
94
.................... #define  RMAX        60       // maximalni zatoceni doprava 
95
.................... #define  STRED       128      // sredni poloha zadniho kolecka 
96
....................  
97
.................... // servo 
98
.................... #define  SERVO PIN_A2 
99
....................  
100
.................... //motory 
101
.................... #define  FR         output_low(PIN_A7); output_high(PIN_A6)  // Vpred 
102
.................... #define  FL         output_low(PIN_A1); output_high(PIN_A0) 
103
.................... #define  BR         output_low(PIN_A6); output_high(PIN_A7)  // Vzad 
104
.................... #define  BL         output_low(PIN_A0); output_high(PIN_A1) 
105
.................... #define  STOPR      output_low(PIN_A6);output_low(PIN_A7) 
106
.................... #define  STOPL      output_low(PIN_A0);output_low(PIN_A1) 
107
....................  
108
.................... //HID 
109
.................... #define  LED1     PIN_B1      //oranzova 
110
.................... #define  LED2     PIN_B2      //zluta 
111
....................  
112
.................... #define  STROBE   PIN_B0 
113
.................... //#define  SW1      PIN_A2      // Motory On/off 
114
....................  
115
.................... // makro pro PWM 
116
.................... #define GO(motor, direction, power) if(get_timer0()<=power) \ 
117
.................... {direction##motor;} else {stop##motor;} 
118
....................  
119
....................  
120
.................... //////////////////////////////////////////////////////////////////////////////// 
121
.................... //////////////////////////////////////////////////////////////////////////////// 
122
.................... /* 
123
.................... void diagnostika() 
124
.................... { 
125
....................    if(input(SW1))STOPR;STOPL;While(TRUE); 
126
.................... //   if(LSENSOR==true) output_high(LED2); else output_low(LED2); 
127
.................... //   if(RSENSOR==true) output_high(LED1); else output_low(LED1); 
128
.................... } 
129
.................... */ 
130
.................... //////////////////////////////////////////////////////////////////////////////// 
131
.................... #task (rate=16ms,max=2ms) 
132
.................... void zatoc()   // ridi servo ktere otaci kolem 
133
.................... { 
134
.................... unsigned int8 n; 
135
....................    output_high(SERVO); 
136
0038:  BSF    03.5
137
0039:  BCF    05.2
138
003A:  BCF    03.5
139
003B:  BSF    05.2
140
....................    delay_us(1200); 
141
003C:  CLRWDT
142
003D:  MOVLW  01
143
003E:  MOVWF  3F
144
003F:  GOTO   00E
145
0040:  MOVLW  C7
146
0041:  MOVWF  3F
147
0042:  GOTO   027
148
....................    for(n=uhel; n>0; n--); 
149
0043:  MOVF   24,W
150
0044:  MOVWF  3E
151
0045:  MOVF   3E,F
152
0046:  BTFSC  03.2
153
0047:  GOTO   04A
154
0048:  DECF   3E,F
155
0049:  GOTO   045
156
....................    output_low(SERVO); 
157
004A:  BSF    03.5
158
004B:  BCF    05.2
159
004C:  BCF    03.5
160
004D:  BCF    05.2
161
.................... } 
162
004E:  MOVLW  38
163
004F:  MOVWF  2E
164
0050:  MOVLW  00
165
0051:  MOVWF  2F
166
0052:  BCF    0A.3
167
0053:  GOTO   236
168
0054:  RETLW  00
169
....................  
170
.................... //////////////////////////////////////////////////////////////////////////////// 
171
.................... #task (rate=2ms, max=500us) 
172
.................... void motory()        // umoznuje nezavisle rizeni vykonu na obou motorech 
173
.................... { 
174
....................  
175
....................    if(Rmotor>0)                  //pravy motor 
176
0055:  BTFSC  28.7
177
0056:  GOTO   07D
178
0057:  MOVF   28,F
179
0058:  BTFSS  03.2
180
0059:  GOTO   05E
181
005A:  MOVF   27,W
182
005B:  SUBLW  00
183
005C:  BTFSC  03.0
184
005D:  GOTO   07D
185
....................    { 
186
....................       GO(R, F, Rmotor); 
187
005E:  MOVF   01,W
188
005F:  BTFSS  00.7
189
0060:  GOTO   064
190
0061:  BTFSS  28.7
191
0062:  GOTO   06C
192
0063:  GOTO   066
193
0064:  BTFSC  28.7
194
0065:  GOTO   075
195
0066:  MOVF   28,F
196
0067:  BTFSS  03.2
197
0068:  GOTO   06C
198
0069:  SUBWF  27,W
199
006A:  BTFSS  03.0
200
006B:  GOTO   075
201
006C:  BSF    03.5
202
006D:  BCF    05.7
203
006E:  BCF    03.5
204
006F:  BCF    05.7
205
0070:  BSF    03.5
206
0071:  BCF    05.6
207
0072:  BCF    03.5
208
0073:  BSF    05.6
209
0074:  GOTO   07D
210
0075:  BSF    03.5
211
0076:  BCF    05.6
212
0077:  BCF    03.5
213
0078:  BCF    05.6
214
0079:  BSF    03.5
215
007A:  BCF    05.7
216
007B:  BCF    03.5
217
007C:  BCF    05.7
218
....................    } 
219
....................  
220
....................    if(Rmotor==0) STOPR; 
221
007D:  MOVF   27,F
222
007E:  BTFSS  03.2
223
007F:  GOTO   087
224
0080:  MOVF   28,F
225
0081:  BTFSS  03.2
226
0082:  GOTO   087
227
0083:  BSF    03.5
228
0084:  BCF    05.6
229
0085:  BCF    03.5
230
0086:  BCF    05.6
231
0087:  BSF    03.5
232
0088:  BCF    05.7
233
0089:  BCF    03.5
234
008A:  BCF    05.7
235
....................  
236
....................    if(Rmotor<0) 
237
008B:  BTFSS  28.7
238
008C:  GOTO   0BD
239
....................    { 
240
....................       GO(R, B, abs(Rmotor)); 
241
008D:  MOVF   01,W
242
008E:  MOVWF  40
243
008F:  MOVF   28,W
244
0090:  MOVWF  7A
245
0091:  MOVF   27,W
246
0092:  BTFSS  28.7
247
0093:  GOTO   09D
248
0094:  MOVF   27,W
249
0095:  SUBLW  00
250
0096:  MOVWF  77
251
0097:  CLRF   7A
252
0098:  MOVF   28,W
253
0099:  BTFSS  03.0
254
009A:  INCFSZ 28,W
255
009B:  SUBWF  7A,F
256
009C:  MOVF   77,W
257
009D:  MOVWF  78
258
009E:  BTFSS  40.7
259
009F:  GOTO   0A3
260
00A0:  BTFSS  7A.7
261
00A1:  GOTO   0AC
262
00A2:  GOTO   0A5
263
00A3:  BTFSC  7A.7
264
00A4:  GOTO   0B5
265
00A5:  MOVF   7A,F
266
00A6:  BTFSS  03.2
267
00A7:  GOTO   0AC
268
00A8:  MOVF   40,W
269
00A9:  SUBWF  78,W
270
00AA:  BTFSS  03.0
271
00AB:  GOTO   0B5
272
00AC:  BSF    03.5
273
00AD:  BCF    05.6
274
00AE:  BCF    03.5
275
00AF:  BCF    05.6
276
00B0:  BSF    03.5
277
00B1:  BCF    05.7
278
00B2:  BCF    03.5
279
00B3:  BSF    05.7
280
00B4:  GOTO   0BD
281
00B5:  BSF    03.5
282
00B6:  BCF    05.6
283
00B7:  BCF    03.5
284
00B8:  BCF    05.6
285
00B9:  BSF    03.5
286
00BA:  BCF    05.7
287
00BB:  BCF    03.5
288
00BC:  BCF    05.7
289
....................    } 
290
....................  
291
....................    if(Lmotor>0)                  // levy motor 
292
00BD:  BTFSC  26.7
293
00BE:  GOTO   0E5
294
00BF:  MOVF   26,F
295
00C0:  BTFSS  03.2
296
00C1:  GOTO   0C6
297
00C2:  MOVF   25,W
298
00C3:  SUBLW  00
299
00C4:  BTFSC  03.0
300
00C5:  GOTO   0E5
301
....................    { 
302
....................       GO(L, F, Lmotor); 
303
00C6:  MOVF   01,W
304
00C7:  BTFSS  00.7
305
00C8:  GOTO   0CC
306
00C9:  BTFSS  26.7
307
00CA:  GOTO   0D4
308
00CB:  GOTO   0CE
309
00CC:  BTFSC  26.7
310
00CD:  GOTO   0DD
311
00CE:  MOVF   26,F
312
00CF:  BTFSS  03.2
313
00D0:  GOTO   0D4
314
00D1:  SUBWF  25,W
315
00D2:  BTFSS  03.0
316
00D3:  GOTO   0DD
317
00D4:  BSF    03.5
318
00D5:  BCF    05.1
319
00D6:  BCF    03.5
320
00D7:  BCF    05.1
321
00D8:  BSF    03.5
322
00D9:  BCF    05.0
323
00DA:  BCF    03.5
324
00DB:  BSF    05.0
325
00DC:  GOTO   0E5
326
00DD:  BSF    03.5
327
00DE:  BCF    05.0
328
00DF:  BCF    03.5
329
00E0:  BCF    05.0
330
00E1:  BSF    03.5
331
00E2:  BCF    05.1
332
00E3:  BCF    03.5
333
00E4:  BCF    05.1
334
....................    } 
335
....................  
336
....................    if(Lmotor==0) STOPL; 
337
00E5:  MOVF   25,F
338
00E6:  BTFSS  03.2
339
00E7:  GOTO   0EF
340
00E8:  MOVF   26,F
341
00E9:  BTFSS  03.2
342
00EA:  GOTO   0EF
343
00EB:  BSF    03.5
344
00EC:  BCF    05.0
345
00ED:  BCF    03.5
346
00EE:  BCF    05.0
347
00EF:  BSF    03.5
348
00F0:  BCF    05.1
349
00F1:  BCF    03.5
350
00F2:  BCF    05.1
351
....................  
352
....................    if(Lmotor<0) 
353
00F3:  BTFSS  26.7
354
00F4:  GOTO   125
355
....................    { 
356
....................       GO(L, B, abs(Lmotor)); 
357
00F5:  MOVF   01,W
358
00F6:  MOVWF  40
359
00F7:  MOVF   26,W
360
00F8:  MOVWF  7A
361
00F9:  MOVF   25,W
362
00FA:  BTFSS  26.7
363
00FB:  GOTO   105
364
00FC:  MOVF   25,W
365
00FD:  SUBLW  00
366
00FE:  MOVWF  77
367
00FF:  CLRF   7A
368
0100:  MOVF   26,W
369
0101:  BTFSS  03.0
370
0102:  INCFSZ 26,W
371
0103:  SUBWF  7A,F
372
0104:  MOVF   77,W
373
0105:  MOVWF  78
374
0106:  BTFSS  40.7
375
0107:  GOTO   10B
376
0108:  BTFSS  7A.7
377
0109:  GOTO   114
378
010A:  GOTO   10D
379
010B:  BTFSC  7A.7
380
010C:  GOTO   11D
381
010D:  MOVF   7A,F
382
010E:  BTFSS  03.2
383
010F:  GOTO   114
384
0110:  MOVF   40,W
385
0111:  SUBWF  78,W
386
0112:  BTFSS  03.0
387
0113:  GOTO   11D
388
0114:  BSF    03.5
389
0115:  BCF    05.0
390
0116:  BCF    03.5
391
0117:  BCF    05.0
392
0118:  BSF    03.5
393
0119:  BCF    05.1
394
011A:  BCF    03.5
395
011B:  BSF    05.1
396
011C:  GOTO   125
397
011D:  BSF    03.5
398
011E:  BCF    05.0
399
011F:  BCF    03.5
400
0120:  BCF    05.0
401
0121:  BSF    03.5
402
0122:  BCF    05.1
403
0123:  BCF    03.5
404
0124:  BCF    05.1
405
....................    } 
406
.................... } 
407
0125:  MOVLW  55
408
0126:  MOVWF  35
409
0127:  MOVLW  00
410
0128:  MOVWF  36
411
0129:  BCF    0A.3
412
012A:  GOTO   236
413
012B:  RETLW  00
414
.................... //////////////////////////////////////////////////////////////////////////////// 
415
.................... #task (rate=4ms, max=500us, queue=0) 
416
.................... void rizeni() 
417
.................... { 
418
.................... rizeni: 
419
....................  
420
....................    sensors = spi_read(0);         // cteni senzoru na caru 
421
012C:  MOVF   13,W
422
012D:  CLRF   13
423
012E:  BSF    03.5
424
012F:  BTFSC  14.0
425
0130:  GOTO   133
426
0131:  BCF    03.5
427
0132:  GOTO   12E
428
0133:  BCF    03.5
429
0134:  MOVF   13,W
430
0135:  MOVWF  21
431
....................    output_high(STROBE); 
432
0136:  BSF    03.5
433
0137:  BCF    06.0
434
0138:  BCF    03.5
435
0139:  BSF    06.0
436
....................    output_low(STROBE); 
437
013A:  BSF    03.5
438
013B:  BCF    06.0
439
013C:  BCF    03.5
440
013D:  BCF    06.0
441
....................  
442
....................    if(bit_test(sensors,0)) //*......//     // z duvodu zkraceni doby reakce se cidla nevyhodnocuji poporade ale od krajnich k prostrednimu 
443
013E:  BTFSS  21.0
444
013F:  GOTO   148
445
....................    { 
446
....................       uhel=LMAX; 
447
0140:  MOVLW  BE
448
0141:  MOVWF  24
449
....................       Lmotor=0;Rmotor=127; 
450
0142:  CLRF   26
451
0143:  CLRF   25
452
0144:  CLRF   28
453
0145:  MOVLW  7F
454
0146:  MOVWF  27
455
....................       goto rizeni; 
456
0147:  GOTO   12C
457
....................    } 
458
....................    if(bit_test(sensors,6)) //......*// 
459
0148:  BTFSS  21.6
460
0149:  GOTO   152
461
....................    { 
462
....................       uhel=RMAX; 
463
014A:  MOVLW  3C
464
014B:  MOVWF  24
465
....................       Rmotor=0;Lmotor=127; 
466
014C:  CLRF   28
467
014D:  CLRF   27
468
014E:  CLRF   26
469
014F:  MOVLW  7F
470
0150:  MOVWF  25
471
....................       goto rizeni; 
472
0151:  GOTO   12C
473
....................    } 
474
....................    if(bit_test(sensors,1)) //.*.....// 
475
0152:  BTFSS  21.1
476
0153:  GOTO   15D
477
....................    { 
478
....................       uhel=STRED+30; 
479
0154:  MOVLW  9E
480
0155:  MOVWF  24
481
....................       Lmotor=70;Rmotor=127; 
482
0156:  CLRF   26
483
0157:  MOVLW  46
484
0158:  MOVWF  25
485
0159:  CLRF   28
486
015A:  MOVLW  7F
487
015B:  MOVWF  27
488
....................       goto rizeni; 
489
015C:  GOTO   12C
490
....................    } 
491
....................    if(bit_test(sensors,5)) //.....*.// 
492
015D:  BTFSS  21.5
493
015E:  GOTO   168
494
....................    { 
495
....................       uhel=STRED-30; 
496
015F:  MOVLW  62
497
0160:  MOVWF  24
498
....................       Rmotor=70;Lmotor=127; 
499
0161:  CLRF   28
500
0162:  MOVLW  46
501
0163:  MOVWF  27
502
0164:  CLRF   26
503
0165:  MOVLW  7F
504
0166:  MOVWF  25
505
....................       goto rizeni; 
506
0167:  GOTO   12C
507
....................    } 
508
....................    if(bit_test(sensors,2)) //..*....// 
509
0168:  BTFSS  21.2
510
0169:  GOTO   173
511
....................    { 
512
....................       uhel=STRED+20; 
513
016A:  MOVLW  94
514
016B:  MOVWF  24
515
....................       Lmotor=90;Rmotor=127; 
516
016C:  CLRF   26
517
016D:  MOVLW  5A
518
016E:  MOVWF  25
519
016F:  CLRF   28
520
0170:  MOVLW  7F
521
0171:  MOVWF  27
522
....................       goto rizeni; 
523
0172:  GOTO   12C
524
....................    } 
525
....................    if(bit_test(sensors,4)) //....*..// 
526
0173:  BTFSS  21.4
527
0174:  GOTO   17E
528
....................    { 
529
....................       uhel=STRED-20; 
530
0175:  MOVLW  6C
531
0176:  MOVWF  24
532
....................       Rmotor=90;Lmotor=127; 
533
0177:  CLRF   28
534
0178:  MOVLW  5A
535
0179:  MOVWF  27
536
017A:  CLRF   26
537
017B:  MOVLW  7F
538
017C:  MOVWF  25
539
....................       goto rizeni; 
540
017D:  GOTO   12C
541
....................    } 
542
....................    if(bit_test(sensors,3)) //...*...// 
543
017E:  BTFSS  21.3
544
017F:  GOTO   188
545
....................    { 
546
....................       uhel=STRED; 
547
0180:  MOVLW  80
548
0181:  MOVWF  24
549
....................       Lmotor=100;Rmotor=100; 
550
0182:  CLRF   26
551
0183:  MOVLW  64
552
0184:  MOVWF  25
553
0185:  CLRF   28
554
0186:  MOVWF  27
555
....................       goto rizeni; 
556
0187:  GOTO   12C
557
....................    } 
558
....................  
559
.................... /*STOPL;STOPR; 
560
....................       if(bit_test(sensors,7)) 
561
....................       { 
562
....................  
563
....................       }*/ 
564
.................... } 
565
0188:  MOVLW  2C
566
0189:  MOVWF  3C
567
018A:  MOVLW  01
568
018B:  MOVWF  3D
569
018C:  BCF    0A.3
570
018D:  GOTO   236
571
018E:  RETLW  00
572
.................... //////////////////////////////////////////////////////////////////////////////// 
573
.................... void main() 
574
.................... { 
575
018F:  CLRF   04
576
0190:  MOVLW  1F
577
0191:  ANDWF  03,F
578
0192:  MOVLW  70
579
0193:  BSF    03.5
580
0194:  MOVWF  0F
581
0195:  BCF    1F.4
582
0196:  BCF    1F.5
583
0197:  MOVF   1B,W
584
0198:  ANDLW  80
585
0199:  MOVWF  1B
586
019A:  MOVLW  07
587
019B:  MOVWF  1C
588
....................    setup_adc_ports(NO_ANALOGS); 
589
019C:  BCF    1F.4
590
019D:  BCF    1F.5
591
019E:  MOVF   1B,W
592
019F:  ANDLW  80
593
01A0:  MOVWF  1B
594
....................    setup_adc(ADC_CLOCK_INTERNAL); 
595
01A1:  BCF    1F.6
596
01A2:  BCF    03.5
597
01A3:  BSF    1F.6
598
01A4:  BSF    1F.7
599
01A5:  BSF    03.5
600
01A6:  BCF    1F.7
601
01A7:  BCF    03.5
602
01A8:  BSF    1F.0
603
....................    setup_spi(SPI_MASTER|SPI_H_TO_L|SPI_XMIT_L_TO_H|SPI_CLK_DIV_4); 
604
01A9:  BCF    14.5
605
01AA:  BSF    03.5
606
01AB:  BCF    06.2
607
01AC:  BSF    06.1
608
01AD:  BCF    06.4
609
01AE:  MOVLW  30
610
01AF:  BCF    03.5
611
01B0:  MOVWF  14
612
01B1:  MOVLW  00
613
01B2:  BSF    03.5
614
01B3:  MOVWF  14
615
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); 
616
01B4:  MOVF   01,W
617
01B5:  ANDLW  C7
618
01B6:  IORLW  08
619
01B7:  MOVWF  01
620
....................    setup_timer_1(T1_DISABLED); 
621
01B8:  BCF    03.5
622
01B9:  CLRF   10
623
....................    setup_oscillator(OSC_8MHZ|OSC_INTRC); 
624
01BA:  MOVLW  72
625
01BB:  BSF    03.5
626
01BC:  MOVWF  0F
627
.................... //  set_pwm1_duty(0);       // Spust PWM, ale zatim s trvalou 0 na vystupu 
628
.................... //   setup_ccp1(CCP_PWM); 
629
.................... //   setup_timer_2(T2_DIV_BY_16,200,1); // perioda 
630
.................... //   setup_timer_2(T2_DIV_BY_4,255,10);    // Casovac pro regulaci 
631
....................  
632
....................    STOPR; STOPL; 
633
01BD:  BCF    05.6
634
01BE:  BCF    03.5
635
01BF:  BCF    05.6
636
01C0:  BSF    03.5
637
01C1:  BCF    05.7
638
01C2:  BCF    03.5
639
01C3:  BCF    05.7
640
01C4:  BSF    03.5
641
01C5:  BCF    05.0
642
01C6:  BCF    03.5
643
01C7:  BCF    05.0
644
01C8:  BSF    03.5
645
01C9:  BCF    05.1
646
01CA:  BCF    03.5
647
01CB:  BCF    05.1
648
....................    uhel=STRED; 
649
01CC:  MOVLW  80
650
01CD:  MOVWF  24
651
.................... //      diagnostika(); 
652
.................... Lmotor=0; 
653
01CE:  CLRF   26
654
01CF:  CLRF   25
655
.................... Rmotor=0; 
656
01D0:  CLRF   28
657
01D1:  CLRF   27
658
....................    rtos_run(); 
659
01D2:  CLRF   29
660
01D3:  CLRF   2B
661
01D4:  MOVLW  08
662
01D5:  MOVWF  2A
663
01D6:  CLRF   2D
664
01D7:  MOVLW  01
665
01D8:  MOVWF  2C
666
01D9:  MOVLW  38
667
01DA:  MOVWF  2E
668
01DB:  MOVLW  00
669
01DC:  MOVWF  2F
670
01DD:  CLRF   30
671
01DE:  CLRF   32
672
01DF:  MOVLW  01
673
01E0:  MOVWF  31
674
01E1:  CLRF   34
675
01E2:  CLRF   33
676
01E3:  MOVLW  55
677
01E4:  MOVWF  35
678
01E5:  MOVLW  00
679
01E6:  MOVWF  36
680
01E7:  CLRF   37
681
01E8:  CLRF   39
682
01E9:  MOVLW  02
683
01EA:  MOVWF  38
684
01EB:  CLRF   3B
685
01EC:  CLRF   3A
686
01ED:  MOVLW  2C
687
01EE:  MOVWF  3C
688
01EF:  MOVLW  01
689
01F0:  MOVWF  3D
690
01F1:  CLRF   20
691
01F2:  MOVLW  00
692
01F3:  MOVWF  78
693
01F4:  IORLW  06
694
01F5:  MOVWF  12
695
01F6:  MOVLW  FA
696
01F7:  BSF    03.5
697
01F8:  MOVWF  12
698
01F9:  BCF    03.5
699
01FA:  BCF    0C.1
700
01FB:  MOVLW  00
701
01FC:  MOVWF  78
702
01FD:  IORLW  06
703
01FE:  MOVWF  12
704
01FF:  MOVLW  FA
705
0200:  BSF    03.5
706
0201:  MOVWF  12
707
0202:  BCF    03.5
708
0203:  BCF    0C.1
709
0204:  BCF    03.0
710
0205:  RLF    20,W
711
0206:  MOVWF  77
712
0207:  CALL   004
713
0208:  MOVWF  79
714
0209:  MOVLW  01
715
020A:  ADDWF  77,W
716
020B:  CALL   004
717
020C:  MOVWF  7A
718
020D:  MOVF   79,W
719
020E:  MOVWF  04
720
020F:  MOVF   00,W
721
0210:  MOVWF  79
722
0211:  INCF   04,F
723
0212:  MOVF   00,W
724
0213:  MOVWF  77
725
0214:  INCF   04,F
726
0215:  MOVF   00,W
727
0216:  MOVWF  78
728
0217:  INCF   04,F
729
0218:  INCF   00,F
730
0219:  MOVF   00,W
731
021A:  MOVWF  7A
732
021B:  BTFSS  03.2
733
021C:  GOTO   220
734
021D:  INCF   04,F
735
021E:  INCF   00,F
736
021F:  DECF   04,F
737
0220:  INCF   04,F
738
0221:  MOVF   00,W
739
0222:  SUBWF  78,W
740
0223:  BTFSS  03.2
741
0224:  GOTO   238
742
0225:  MOVF   77,W
743
0226:  SUBWF  7A,W
744
0227:  BTFSS  03.2
745
0228:  GOTO   238
746
0229:  DECF   04,F
747
022A:  CLRF   00
748
022B:  INCF   04,F
749
022C:  CLRF   00
750
022D:  INCF   04,F
751
022E:  BTFSC  79.7
752
022F:  GOTO   238
753
0230:  INCF   04,F
754
0231:  MOVF   00,W
755
0232:  MOVWF  0A
756
0233:  DECF   04,F
757
0234:  MOVF   00,W
758
0235:  MOVWF  02
759
0236:  BCF    03.5
760
0237:  BCF    03.6
761
0238:  INCF   20,F
762
0239:  MOVLW  03
763
023A:  SUBWF  20,W
764
023B:  BTFSS  03.2
765
023C:  GOTO   204
766
023D:  CLRF   20
767
023E:  BTFSS  0C.1
768
023F:  GOTO   242
769
0240:  BSF    03.5
770
0241:  GOTO   202
771
0242:  GOTO   23E
772
0243:  MOVLW  FF
773
0244:  MOVWF  20
774
....................  
775
.................... } 
776
0245:  SLEEP
777
 
778
Configuration Fuses:
779
   Word  1: 3FF8   NOWDT NOPUT MCLR BROWNOUT LVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO
780
   Word  2: 3FFF   FCMEN IESO