Rev Author Line No. Line
2953 jacho 1 CCS PCM C Compiler, Version 4.106, 47914 22-4-13 22:26
2  
3 Filename: C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\main.lst
4  
5 ROM used: 1307 words (16%)
6 Largest free fragment is 2048
7 RAM used: 6 (2%) at main() level
8 22 (6%) worst case
9 Stack: 2 locations
10  
11 *
12 0000: MOVLW 01
13 0001: MOVWF 0A
14 0002: GOTO 19B
15 0003: NOP
16 .................... #include "C:\Users\Honza\Documents\pic\I2C_bat_pam\Min_V_cl\main.h"
17 .................... #include <16F887.h>
18 .................... //////// Standard Header file for the PIC16F887 device ////////////////
19 .................... #device PIC16F887
20 .................... #list
21 ....................
22 .................... #device adc=8
23 ....................
24 .................... #FUSES NOWDT //No Watch Dog Timer
25 .................... #FUSES INTRC //Internal RC Osc
26 .................... #FUSES NOPUT //No Power Up Timer
27 .................... #FUSES MCLR //Master Clear pin enabled
28 .................... #FUSES NOPROTECT //Code not protected from reading
29 .................... #FUSES NOCPD //No EE protection
30 .................... #FUSES NOBROWNOUT //No brownout reset
31 .................... #FUSES IESO //Internal External Switch Over mode enabled
32 .................... #FUSES FCMEN //Fail-safe clock monitor enabled
33 .................... #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
34 .................... #FUSES NODEBUG //No Debug mode for ICD
35 .................... #FUSES NOWRT //Program memory not write protected
36 .................... #FUSES BORV40 //Brownout reset at 4.0V
37 ....................
38 .................... #use delay(clock=8000000)
39 *
40 00D0: MOVLW 2C
41 00D1: MOVWF 04
42 00D2: BCF 03.7
43 00D3: MOVF 00,W
44 00D4: BTFSC 03.2
45 00D5: GOTO 0E3
46 00D6: MOVLW 02
47 00D7: MOVWF 78
48 00D8: CLRF 77
49 00D9: DECFSZ 77,F
50 00DA: GOTO 0D9
51 00DB: DECFSZ 78,F
52 00DC: GOTO 0D8
53 00DD: MOVLW 97
54 00DE: MOVWF 77
55 00DF: DECFSZ 77,F
56 00E0: GOTO 0DF
57 00E1: DECFSZ 00,F
58 00E2: GOTO 0D6
59 00E3: RETURN
60 ....................
61 ....................
62 ....................
63 ....................
64 ....................
65 .................... #define EEPROM_SDA PIN_C4
66 .................... #define EEPROM_SCL PIN_C3
67 .................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL)
68 *
69 0086: MOVLW 08
70 0087: MOVWF 78
71 0088: NOP
72 0089: BCF 07.3
73 008A: BCF 20.3
74 008B: MOVF 20,W
75 008C: BSF 03.5
76 008D: MOVWF 07
77 008E: NOP
78 008F: BCF 03.5
79 0090: RLF 2C,F
80 0091: BCF 07.4
81 0092: BTFSS 03.0
82 0093: GOTO 09A
83 0094: BSF 20.4
84 0095: MOVF 20,W
85 0096: BSF 03.5
86 0097: MOVWF 07
87 0098: GOTO 09E
88 0099: BCF 03.5
89 009A: BCF 20.4
90 009B: MOVF 20,W
91 009C: BSF 03.5
92 009D: MOVWF 07
93 009E: NOP
94 009F: BCF 03.5
95 00A0: BSF 20.3
96 00A1: MOVF 20,W
97 00A2: BSF 03.5
98 00A3: MOVWF 07
99 00A4: BCF 03.5
100 00A5: BTFSS 07.3
101 00A6: GOTO 0A5
102 00A7: DECFSZ 78,F
103 00A8: GOTO 088
104 00A9: NOP
105 00AA: BCF 07.3
106 00AB: BCF 20.3
107 00AC: MOVF 20,W
108 00AD: BSF 03.5
109 00AE: MOVWF 07
110 00AF: NOP
111 00B0: BCF 03.5
112 00B1: BSF 20.4
113 00B2: MOVF 20,W
114 00B3: BSF 03.5
115 00B4: MOVWF 07
116 00B5: NOP
117 00B6: NOP
118 00B7: BCF 03.5
119 00B8: BSF 20.3
120 00B9: MOVF 20,W
121 00BA: BSF 03.5
122 00BB: MOVWF 07
123 00BC: BCF 03.5
124 00BD: BTFSS 07.3
125 00BE: GOTO 0BD
126 00BF: CLRF 78
127 00C0: NOP
128 00C1: BTFSC 07.4
129 00C2: BSF 78.0
130 00C3: BCF 07.3
131 00C4: BCF 20.3
132 00C5: MOVF 20,W
133 00C6: BSF 03.5
134 00C7: MOVWF 07
135 00C8: BCF 03.5
136 00C9: BCF 07.4
137 00CA: BCF 20.4
138 00CB: MOVF 20,W
139 00CC: BSF 03.5
140 00CD: MOVWF 07
141 00CE: BCF 03.5
142 00CF: RETURN
143 *
144 00E4: MOVLW 08
145 00E5: MOVWF 2D
146 00E6: MOVF 77,W
147 00E7: MOVWF 2E
148 00E8: BSF 20.4
149 00E9: MOVF 20,W
150 00EA: BSF 03.5
151 00EB: MOVWF 07
152 00EC: NOP
153 00ED: BCF 03.5
154 00EE: BSF 20.3
155 00EF: MOVF 20,W
156 00F0: BSF 03.5
157 00F1: MOVWF 07
158 00F2: BCF 03.5
159 00F3: BTFSS 07.3
160 00F4: GOTO 0F3
161 00F5: BTFSC 07.4
162 00F6: BSF 03.0
163 00F7: BTFSS 07.4
164 00F8: BCF 03.0
165 00F9: RLF 78,F
166 00FA: NOP
167 00FB: BCF 20.3
168 00FC: MOVF 20,W
169 00FD: BSF 03.5
170 00FE: MOVWF 07
171 00FF: BCF 03.5
172 0100: BCF 07.3
173 0101: DECFSZ 2D,F
174 0102: GOTO 0E8
175 0103: BSF 20.4
176 0104: MOVF 20,W
177 0105: BSF 03.5
178 0106: MOVWF 07
179 0107: NOP
180 0108: BCF 03.5
181 0109: BCF 07.4
182 010A: MOVF 2E,W
183 010B: BTFSC 03.2
184 010C: GOTO 112
185 010D: BCF 20.4
186 010E: MOVF 20,W
187 010F: BSF 03.5
188 0110: MOVWF 07
189 0111: BCF 03.5
190 0112: NOP
191 0113: BSF 20.3
192 0114: MOVF 20,W
193 0115: BSF 03.5
194 0116: MOVWF 07
195 0117: BCF 03.5
196 0118: BTFSS 07.3
197 0119: GOTO 118
198 011A: NOP
199 011B: BCF 07.3
200 011C: BCF 20.3
201 011D: MOVF 20,W
202 011E: BSF 03.5
203 011F: MOVWF 07
204 0120: NOP
205 0121: BCF 03.5
206 0122: BCF 07.4
207 0123: BCF 20.4
208 0124: MOVF 20,W
209 0125: BSF 03.5
210 0126: MOVWF 07
211 0127: BCF 03.5
212 0128: RETURN
213 .................... #use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD
214 *
215 001A: BCF 20.7
216 001B: MOVF 20,W
217 001C: BSF 03.5
218 001D: MOVWF 07
219 001E: BCF 03.5
220 001F: BCF 07.7
221 0020: MOVLW 08
222 0021: MOVWF 78
223 0022: GOTO 023
224 0023: NOP
225 0024: BSF 78.7
226 0025: GOTO 034
227 0026: BCF 78.7
228 0027: RRF 30,F
229 0028: BTFSC 03.0
230 0029: BSF 07.7
231 002A: BTFSS 03.0
232 002B: BCF 07.7
233 002C: BSF 78.6
234 002D: GOTO 034
235 002E: BCF 78.6
236 002F: DECFSZ 78,F
237 0030: GOTO 027
238 0031: GOTO 032
239 0032: NOP
240 0033: BSF 07.7
241 0034: MOVLW 3F
242 0035: MOVWF 04
243 0036: DECFSZ 04,F
244 0037: GOTO 036
245 0038: NOP
246 0039: BTFSC 78.7
247 003A: GOTO 026
248 003B: BTFSC 78.6
249 003C: GOTO 02E
250 003D: RETURN
251 ....................
252 ....................
253 .................... void main()
254 .................... {
255 *
256 019B: CLRF 04
257 019C: BCF 03.7
258 019D: MOVLW 1F
259 019E: ANDWF 03,F
260 019F: MOVLW 71
261 01A0: BSF 03.5
262 01A1: MOVWF 0F
263 01A2: MOVF 0F,W
264 01A3: BCF 03.5
265 01A4: BCF 20.7
266 01A5: MOVF 20,W
267 01A6: BSF 03.5
268 01A7: MOVWF 07
269 01A8: BCF 03.5
270 01A9: BSF 07.7
271 01AA: BSF 03.5
272 01AB: BSF 03.6
273 01AC: MOVF 09,W
274 01AD: ANDLW C0
275 01AE: MOVWF 09
276 01AF: BCF 03.6
277 01B0: BCF 1F.4
278 01B1: BCF 1F.5
279 01B2: MOVLW 00
280 01B3: BSF 03.6
281 01B4: MOVWF 08
282 01B5: BCF 03.5
283 01B6: CLRF 07
284 01B7: CLRF 08
285 01B8: CLRF 09
286 ....................
287 .................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
288 *
289 01BC: BSF 03.5
290 01BD: BSF 03.6
291 01BE: MOVF 09,W
292 01BF: ANDLW C0
293 01C0: MOVWF 09
294 01C1: BCF 03.6
295 01C2: BCF 1F.4
296 01C3: BCF 1F.5
297 01C4: MOVLW 00
298 01C5: BSF 03.6
299 01C6: MOVWF 08
300 .................... setup_adc(ADC_CLOCK_DIV_2);
301 01C7: BCF 03.5
302 01C8: BCF 03.6
303 01C9: BCF 1F.6
304 01CA: BCF 1F.7
305 01CB: BSF 03.5
306 01CC: BCF 1F.7
307 01CD: BCF 03.5
308 01CE: BSF 1F.0
309 .................... setup_spi(SPI_SS_DISABLED);
310 01CF: BCF 14.5
311 01D0: BCF 20.5
312 01D1: MOVF 20,W
313 01D2: BSF 03.5
314 01D3: MOVWF 07
315 01D4: BCF 03.5
316 01D5: BSF 20.4
317 01D6: MOVF 20,W
318 01D7: BSF 03.5
319 01D8: MOVWF 07
320 01D9: BCF 03.5
321 01DA: BCF 20.3
322 01DB: MOVF 20,W
323 01DC: BSF 03.5
324 01DD: MOVWF 07
325 01DE: MOVLW 01
326 01DF: BCF 03.5
327 01E0: MOVWF 14
328 01E1: MOVLW 00
329 01E2: BSF 03.5
330 01E3: MOVWF 14
331 .................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
332 01E4: MOVF 01,W
333 01E5: ANDLW C7
334 01E6: IORLW 08
335 01E7: MOVWF 01
336 .................... setup_timer_1(T1_DISABLED);
337 01E8: BCF 03.5
338 01E9: CLRF 10
339 .................... setup_timer_2(T2_DISABLED,0,1);
340 01EA: MOVLW 00
341 01EB: MOVWF 78
342 01EC: MOVWF 12
343 01ED: MOVLW 00
344 01EE: BSF 03.5
345 01EF: MOVWF 12
346 .................... setup_ccp1(CCP_OFF);
347 01F0: BCF 03.5
348 01F1: BSF 20.2
349 01F2: MOVF 20,W
350 01F3: BSF 03.5
351 01F4: MOVWF 07
352 01F5: BCF 03.5
353 01F6: CLRF 17
354 01F7: BSF 03.5
355 01F8: CLRF 1B
356 01F9: CLRF 1C
357 01FA: MOVLW 01
358 01FB: MOVWF 1D
359 .................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
360 01FC: BCF 03.5
361 01FD: BSF 03.6
362 01FE: CLRF 07
363 01FF: CLRF 08
364 0200: CLRF 09
365 ....................
366 .................... printf("Simple Thermomether \r\n",);
367 0201: MOVLW 04
368 0202: MOVWF 0D
369 0203: MOVLW 00
370 0204: MOVWF 0F
371 0205: BCF 03.6
372 0206: GOTO 03E
373 .................... unsigned int8 STAV1,STAV2;
374 ....................
375 .................... unsigned int16 SOUCET, SOUCET1;
376 .................... unsigned int8 LSB=0,ZK,k=0,VH,VL;
377 0207: CLRF 27
378 0208: CLRF 29
379 .................... //unsigned int8
380 ....................
381 .................... while(TRUE)
382 .................... {
383 ....................
384 ....................
385 ....................
386 ....................
387 .................... i2c_start(); //blockdatacontrol
388 0209: BSF 20.4
389 020A: MOVF 20,W
390 020B: BSF 03.5
391 020C: MOVWF 07
392 020D: NOP
393 020E: BCF 03.5
394 020F: BSF 20.3
395 0210: MOVF 20,W
396 0211: BSF 03.5
397 0212: MOVWF 07
398 0213: NOP
399 0214: BCF 03.5
400 0215: BCF 07.4
401 0216: BCF 20.4
402 0217: MOVF 20,W
403 0218: BSF 03.5
404 0219: MOVWF 07
405 021A: NOP
406 021B: BCF 03.5
407 021C: BCF 07.3
408 021D: BCF 20.3
409 021E: MOVF 20,W
410 021F: BSF 03.5
411 0220: MOVWF 07
412 .................... I2C_Write(0xAA);
413 0221: MOVLW AA
414 0222: BCF 03.5
415 0223: MOVWF 2C
416 0224: CALL 086
417 .................... I2C_write(0x61);
418 0225: MOVLW 61
419 0226: MOVWF 2C
420 0227: CALL 086
421 .................... i2c_start();
422 0228: BSF 20.4
423 0229: MOVF 20,W
424 022A: BSF 03.5
425 022B: MOVWF 07
426 022C: NOP
427 022D: BCF 03.5
428 022E: BSF 20.3
429 022F: MOVF 20,W
430 0230: BSF 03.5
431 0231: MOVWF 07
432 0232: NOP
433 0233: BCF 03.5
434 0234: BTFSS 07.3
435 0235: GOTO 234
436 0236: BCF 07.4
437 0237: BCF 20.4
438 0238: MOVF 20,W
439 0239: BSF 03.5
440 023A: MOVWF 07
441 023B: NOP
442 023C: BCF 03.5
443 023D: BCF 07.3
444 023E: BCF 20.3
445 023F: MOVF 20,W
446 0240: BSF 03.5
447 0241: MOVWF 07
448 .................... I2C_Write(0xAA);
449 0242: MOVLW AA
450 0243: BCF 03.5
451 0244: MOVWF 2C
452 0245: CALL 086
453 .................... i2c_write(0x00);
454 0246: CLRF 2C
455 0247: CALL 086
456 .................... i2c_stop();
457 0248: BCF 20.4
458 0249: MOVF 20,W
459 024A: BSF 03.5
460 024B: MOVWF 07
461 024C: NOP
462 024D: BCF 03.5
463 024E: BSF 20.3
464 024F: MOVF 20,W
465 0250: BSF 03.5
466 0251: MOVWF 07
467 0252: BCF 03.5
468 0253: BTFSS 07.3
469 0254: GOTO 253
470 0255: NOP
471 0256: GOTO 257
472 0257: NOP
473 0258: BSF 20.4
474 0259: MOVF 20,W
475 025A: BSF 03.5
476 025B: MOVWF 07
477 025C: NOP
478 .................... delay_ms (1);
479 025D: MOVLW 01
480 025E: BCF 03.5
481 025F: MOVWF 2C
482 0260: CALL 0D0
483 ....................
484 ....................
485 .................... i2c_start();//dataflashclass
486 0261: BSF 20.4
487 0262: MOVF 20,W
488 0263: BSF 03.5
489 0264: MOVWF 07
490 0265: NOP
491 0266: BCF 03.5
492 0267: BSF 20.3
493 0268: MOVF 20,W
494 0269: BSF 03.5
495 026A: MOVWF 07
496 026B: NOP
497 026C: BCF 03.5
498 026D: BCF 07.4
499 026E: BCF 20.4
500 026F: MOVF 20,W
501 0270: BSF 03.5
502 0271: MOVWF 07
503 0272: NOP
504 0273: BCF 03.5
505 0274: BCF 07.3
506 0275: BCF 20.3
507 0276: MOVF 20,W
508 0277: BSF 03.5
509 0278: MOVWF 07
510 .................... I2C_Write(0xAA);
511 0279: MOVLW AA
512 027A: BCF 03.5
513 027B: MOVWF 2C
514 027C: CALL 086
515 .................... I2C_write(0x3e);
516 027D: MOVLW 3E
517 027E: MOVWF 2C
518 027F: CALL 086
519 ....................
520 .................... i2c_start();
521 0280: BSF 20.4
522 0281: MOVF 20,W
523 0282: BSF 03.5
524 0283: MOVWF 07
525 0284: NOP
526 0285: BCF 03.5
527 0286: BSF 20.3
528 0287: MOVF 20,W
529 0288: BSF 03.5
530 0289: MOVWF 07
531 028A: NOP
532 028B: BCF 03.5
533 028C: BTFSS 07.3
534 028D: GOTO 28C
535 028E: BCF 07.4
536 028F: BCF 20.4
537 0290: MOVF 20,W
538 0291: BSF 03.5
539 0292: MOVWF 07
540 0293: NOP
541 0294: BCF 03.5
542 0295: BCF 07.3
543 0296: BCF 20.3
544 0297: MOVF 20,W
545 0298: BSF 03.5
546 0299: MOVWF 07
547 .................... I2C_Write(0xAA);
548 029A: MOVLW AA
549 029B: BCF 03.5
550 029C: MOVWF 2C
551 029D: CALL 086
552 .................... i2c_write(0x50);
553 029E: MOVLW 50
554 029F: MOVWF 2C
555 02A0: CALL 086
556 .................... i2c_stop();
557 02A1: BCF 20.4
558 02A2: MOVF 20,W
559 02A3: BSF 03.5
560 02A4: MOVWF 07
561 02A5: NOP
562 02A6: BCF 03.5
563 02A7: BSF 20.3
564 02A8: MOVF 20,W
565 02A9: BSF 03.5
566 02AA: MOVWF 07
567 02AB: BCF 03.5
568 02AC: BTFSS 07.3
569 02AD: GOTO 2AC
570 02AE: NOP
571 02AF: GOTO 2B0
572 02B0: NOP
573 02B1: BSF 20.4
574 02B2: MOVF 20,W
575 02B3: BSF 03.5
576 02B4: MOVWF 07
577 02B5: NOP
578 .................... delay_ms (1);
579 02B6: MOVLW 01
580 02B7: BCF 03.5
581 02B8: MOVWF 2C
582 02B9: CALL 0D0
583 ....................
584 ....................
585 .................... i2c_start();//dataflashblock
586 02BA: BSF 20.4
587 02BB: MOVF 20,W
588 02BC: BSF 03.5
589 02BD: MOVWF 07
590 02BE: NOP
591 02BF: BCF 03.5
592 02C0: BSF 20.3
593 02C1: MOVF 20,W
594 02C2: BSF 03.5
595 02C3: MOVWF 07
596 02C4: NOP
597 02C5: BCF 03.5
598 02C6: BCF 07.4
599 02C7: BCF 20.4
600 02C8: MOVF 20,W
601 02C9: BSF 03.5
602 02CA: MOVWF 07
603 02CB: NOP
604 02CC: BCF 03.5
605 02CD: BCF 07.3
606 02CE: BCF 20.3
607 02CF: MOVF 20,W
608 02D0: BSF 03.5
609 02D1: MOVWF 07
610 .................... I2C_Write(0xAA);
611 02D2: MOVLW AA
612 02D3: BCF 03.5
613 02D4: MOVWF 2C
614 02D5: CALL 086
615 .................... I2C_write(0x3f);
616 02D6: MOVLW 3F
617 02D7: MOVWF 2C
618 02D8: CALL 086
619 ....................
620 .................... i2c_start();
621 02D9: BSF 20.4
622 02DA: MOVF 20,W
623 02DB: BSF 03.5
624 02DC: MOVWF 07
625 02DD: NOP
626 02DE: BCF 03.5
627 02DF: BSF 20.3
628 02E0: MOVF 20,W
629 02E1: BSF 03.5
630 02E2: MOVWF 07
631 02E3: NOP
632 02E4: BCF 03.5
633 02E5: BTFSS 07.3
634 02E6: GOTO 2E5
635 02E7: BCF 07.4
636 02E8: BCF 20.4
637 02E9: MOVF 20,W
638 02EA: BSF 03.5
639 02EB: MOVWF 07
640 02EC: NOP
641 02ED: BCF 03.5
642 02EE: BCF 07.3
643 02EF: BCF 20.3
644 02F0: MOVF 20,W
645 02F1: BSF 03.5
646 02F2: MOVWF 07
647 .................... I2C_Write(0xAA);
648 02F3: MOVLW AA
649 02F4: BCF 03.5
650 02F5: MOVWF 2C
651 02F6: CALL 086
652 .................... I2C_write(0x02);
653 02F7: MOVLW 02
654 02F8: MOVWF 2C
655 02F9: CALL 086
656 .................... i2c_stop();
657 02FA: BCF 20.4
658 02FB: MOVF 20,W
659 02FC: BSF 03.5
660 02FD: MOVWF 07
661 02FE: NOP
662 02FF: BCF 03.5
663 0300: BSF 20.3
664 0301: MOVF 20,W
665 0302: BSF 03.5
666 0303: MOVWF 07
667 0304: BCF 03.5
668 0305: BTFSS 07.3
669 0306: GOTO 305
670 0307: NOP
671 0308: GOTO 309
672 0309: NOP
673 030A: BSF 20.4
674 030B: MOVF 20,W
675 030C: BSF 03.5
676 030D: MOVWF 07
677 030E: NOP
678 ....................
679 .................... delay_ms (1);
680 030F: MOVLW 01
681 0310: BCF 03.5
682 0311: MOVWF 2C
683 0312: CALL 0D0
684 ....................
685 ....................
686 ....................
687 ....................
688 .................... i2c_start();//blockdata horni bit
689 0313: BSF 20.4
690 0314: MOVF 20,W
691 0315: BSF 03.5
692 0316: MOVWF 07
693 0317: NOP
694 0318: BCF 03.5
695 0319: BSF 20.3
696 031A: MOVF 20,W
697 031B: BSF 03.5
698 031C: MOVWF 07
699 031D: NOP
700 031E: BCF 03.5
701 031F: BCF 07.4
702 0320: BCF 20.4
703 0321: MOVF 20,W
704 0322: BSF 03.5
705 0323: MOVWF 07
706 0324: NOP
707 0325: BCF 03.5
708 0326: BCF 07.3
709 0327: BCF 20.3
710 0328: MOVF 20,W
711 0329: BSF 03.5
712 032A: MOVWF 07
713 .................... I2C_Write(0xAA);
714 032B: MOVLW AA
715 032C: BCF 03.5
716 032D: MOVWF 2C
717 032E: CALL 086
718 .................... I2C_write(0x43);
719 032F: MOVLW 43
720 0330: MOVWF 2C
721 0331: CALL 086
722 ....................
723 .................... i2c_start();
724 0332: BSF 20.4
725 0333: MOVF 20,W
726 0334: BSF 03.5
727 0335: MOVWF 07
728 0336: NOP
729 0337: BCF 03.5
730 0338: BSF 20.3
731 0339: MOVF 20,W
732 033A: BSF 03.5
733 033B: MOVWF 07
734 033C: NOP
735 033D: BCF 03.5
736 033E: BTFSS 07.3
737 033F: GOTO 33E
738 0340: BCF 07.4
739 0341: BCF 20.4
740 0342: MOVF 20,W
741 0343: BSF 03.5
742 0344: MOVWF 07
743 0345: NOP
744 0346: BCF 03.5
745 0347: BCF 07.3
746 0348: BCF 20.3
747 0349: MOVF 20,W
748 034A: BSF 03.5
749 034B: MOVWF 07
750 .................... I2C_Write(0xAB);
751 034C: MOVLW AB
752 034D: BCF 03.5
753 034E: MOVWF 2C
754 034F: CALL 086
755 .................... VH=I2C_read(0);
756 0350: CLRF 77
757 0351: CALL 0E4
758 0352: MOVF 78,W
759 0353: MOVWF 2A
760 ....................
761 .................... i2c_stop();
762 0354: BCF 20.4
763 0355: MOVF 20,W
764 0356: BSF 03.5
765 0357: MOVWF 07
766 0358: NOP
767 0359: BCF 03.5
768 035A: BSF 20.3
769 035B: MOVF 20,W
770 035C: BSF 03.5
771 035D: MOVWF 07
772 035E: BCF 03.5
773 035F: BTFSS 07.3
774 0360: GOTO 35F
775 0361: NOP
776 0362: GOTO 363
777 0363: NOP
778 0364: BSF 20.4
779 0365: MOVF 20,W
780 0366: BSF 03.5
781 0367: MOVWF 07
782 0368: NOP
783 ....................
784 .................... i2c_start();//blockdata
785 0369: BCF 03.5
786 036A: BSF 20.4
787 036B: MOVF 20,W
788 036C: BSF 03.5
789 036D: MOVWF 07
790 036E: NOP
791 036F: BCF 03.5
792 0370: BSF 20.3
793 0371: MOVF 20,W
794 0372: BSF 03.5
795 0373: MOVWF 07
796 0374: NOP
797 0375: BCF 03.5
798 0376: BCF 07.4
799 0377: BCF 20.4
800 0378: MOVF 20,W
801 0379: BSF 03.5
802 037A: MOVWF 07
803 037B: NOP
804 037C: BCF 03.5
805 037D: BCF 07.3
806 037E: BCF 20.3
807 037F: MOVF 20,W
808 0380: BSF 03.5
809 0381: MOVWF 07
810 .................... I2C_Write(0xAA);
811 0382: MOVLW AA
812 0383: BCF 03.5
813 0384: MOVWF 2C
814 0385: CALL 086
815 .................... I2C_write(0x44);
816 0386: MOVLW 44
817 0387: MOVWF 2C
818 0388: CALL 086
819 ....................
820 .................... i2c_start();
821 0389: BSF 20.4
822 038A: MOVF 20,W
823 038B: BSF 03.5
824 038C: MOVWF 07
825 038D: NOP
826 038E: BCF 03.5
827 038F: BSF 20.3
828 0390: MOVF 20,W
829 0391: BSF 03.5
830 0392: MOVWF 07
831 0393: NOP
832 0394: BCF 03.5
833 0395: BTFSS 07.3
834 0396: GOTO 395
835 0397: BCF 07.4
836 0398: BCF 20.4
837 0399: MOVF 20,W
838 039A: BSF 03.5
839 039B: MOVWF 07
840 039C: NOP
841 039D: BCF 03.5
842 039E: BCF 07.3
843 039F: BCF 20.3
844 03A0: MOVF 20,W
845 03A1: BSF 03.5
846 03A2: MOVWF 07
847 .................... I2C_Write(0xAB);
848 03A3: MOVLW AB
849 03A4: BCF 03.5
850 03A5: MOVWF 2C
851 03A6: CALL 086
852 ....................
853 .................... VL=I2C_read(0);
854 03A7: CLRF 77
855 03A8: CALL 0E4
856 03A9: MOVF 78,W
857 03AA: MOVWF 2B
858 .................... i2c_stop();
859 03AB: BCF 20.4
860 03AC: MOVF 20,W
861 03AD: BSF 03.5
862 03AE: MOVWF 07
863 03AF: NOP
864 03B0: BCF 03.5
865 03B1: BSF 20.3
866 03B2: MOVF 20,W
867 03B3: BSF 03.5
868 03B4: MOVWF 07
869 03B5: BCF 03.5
870 03B6: BTFSS 07.3
871 03B7: GOTO 3B6
872 03B8: NOP
873 03B9: GOTO 3BA
874 03BA: NOP
875 03BB: BSF 20.4
876 03BC: MOVF 20,W
877 03BD: BSF 03.5
878 03BE: MOVWF 07
879 03BF: NOP
880 ....................
881 ....................
882 .................... delay_ms (1);
883 03C0: MOVLW 01
884 03C1: BCF 03.5
885 03C2: MOVWF 2C
886 03C3: CALL 0D0
887 ....................
888 .................... printf("VL %lX \r\n", VL);
889 03C4: MOVLW 56
890 03C5: MOVWF 30
891 03C6: CALL 01A
892 03C7: MOVLW 4C
893 03C8: MOVWF 30
894 03C9: CALL 01A
895 03CA: MOVLW 20
896 03CB: MOVWF 30
897 03CC: CALL 01A
898 03CD: MOVF 2B,W
899 03CE: MOVWF 2C
900 03CF: MOVLW 37
901 03D0: MOVWF 2D
902 03D1: CALL 129
903 03D2: MOVLW 20
904 03D3: MOVWF 30
905 03D4: CALL 01A
906 03D5: MOVLW 0D
907 03D6: MOVWF 30
908 03D7: CALL 01A
909 03D8: MOVLW 0A
910 03D9: MOVWF 30
911 03DA: CALL 01A
912 .................... printf("LH %lX \r\n", VH);
913 03DB: MOVLW 4C
914 03DC: MOVWF 30
915 03DD: CALL 01A
916 03DE: MOVLW 48
917 03DF: MOVWF 30
918 03E0: CALL 01A
919 03E1: MOVLW 20
920 03E2: MOVWF 30
921 03E3: CALL 01A
922 03E4: MOVF 2A,W
923 03E5: MOVWF 2C
924 03E6: MOVLW 37
925 03E7: MOVWF 2D
926 03E8: CALL 129
927 03E9: MOVLW 20
928 03EA: MOVWF 30
929 03EB: CALL 01A
930 03EC: MOVLW 0D
931 03ED: MOVWF 30
932 03EE: CALL 01A
933 03EF: MOVLW 0A
934 03F0: MOVWF 30
935 03F1: CALL 01A
936 ....................
937 ....................
938 ....................
939 ....................
940 ....................
941 ....................
942 .................... if(VH==0x0A)
943 03F2: MOVF 2A,W
944 03F3: SUBLW 0A
945 03F4: BTFSS 03.2
946 03F5: GOTO 412
947 .................... {
948 .................... LSB=LSB-1;
949 03F6: MOVLW 01
950 03F7: SUBWF 27,F
951 .................... printf("Vysledne LSB %lX \r\n", LSB);
952 03F8: MOVLW 10
953 03F9: BSF 03.6
954 03FA: MOVWF 0D
955 03FB: MOVLW 00
956 03FC: MOVWF 0F
957 03FD: BCF 03.0
958 03FE: MOVLW 0D
959 03FF: BCF 03.6
960 0400: MOVWF 2C
961 0401: GOTO 14A
962 0402: MOVF 27,W
963 0403: MOVWF 2C
964 0404: MOVLW 37
965 0405: MOVWF 2D
966 0406: CALL 129
967 0407: MOVLW 20
968 0408: MOVWF 30
969 0409: CALL 01A
970 040A: MOVLW 0D
971 040B: MOVWF 30
972 040C: CALL 01A
973 040D: MOVLW 0A
974 040E: MOVWF 30
975 040F: CALL 01A
976 .................... while(TRUE)
977 .................... {
978 .................... }
979 0410: GOTO 410
980 .................... }
981 ....................
982 .................... else
983 0411: GOTO 4BE
984 .................... {
985 ....................
986 ....................
987 .................... i2c_start();//blockdata
988 0412: BSF 20.4
989 0413: MOVF 20,W
990 0414: BSF 03.5
991 0415: MOVWF 07
992 0416: NOP
993 0417: BCF 03.5
994 0418: BSF 20.3
995 0419: MOVF 20,W
996 041A: BSF 03.5
997 041B: MOVWF 07
998 041C: NOP
999 041D: BCF 03.5
1000 041E: BCF 07.4
1001 041F: BCF 20.4
1002 0420: MOVF 20,W
1003 0421: BSF 03.5
1004 0422: MOVWF 07
1005 0423: NOP
1006 0424: BCF 03.5
1007 0425: BCF 07.3
1008 0426: BCF 20.3
1009 0427: MOVF 20,W
1010 0428: BSF 03.5
1011 0429: MOVWF 07
1012 .................... I2C_Write(0xAA);
1013 042A: MOVLW AA
1014 042B: BCF 03.5
1015 042C: MOVWF 2C
1016 042D: CALL 086
1017 .................... I2C_write(0x43);
1018 042E: MOVLW 43
1019 042F: MOVWF 2C
1020 0430: CALL 086
1021 ....................
1022 .................... i2c_start();
1023 0431: BSF 20.4
1024 0432: MOVF 20,W
1025 0433: BSF 03.5
1026 0434: MOVWF 07
1027 0435: NOP
1028 0436: BCF 03.5
1029 0437: BSF 20.3
1030 0438: MOVF 20,W
1031 0439: BSF 03.5
1032 043A: MOVWF 07
1033 043B: NOP
1034 043C: BCF 03.5
1035 043D: BTFSS 07.3
1036 043E: GOTO 43D
1037 043F: BCF 07.4
1038 0440: BCF 20.4
1039 0441: MOVF 20,W
1040 0442: BSF 03.5
1041 0443: MOVWF 07
1042 0444: NOP
1043 0445: BCF 03.5
1044 0446: BCF 07.3
1045 0447: BCF 20.3
1046 0448: MOVF 20,W
1047 0449: BSF 03.5
1048 044A: MOVWF 07
1049 .................... I2C_Write(0xAA);
1050 044B: MOVLW AA
1051 044C: BCF 03.5
1052 044D: MOVWF 2C
1053 044E: CALL 086
1054 .................... I2C_write(0x0A);
1055 044F: MOVLW 0A
1056 0450: MOVWF 2C
1057 0451: CALL 086
1058 .................... i2c_stop();
1059 0452: BCF 20.4
1060 0453: MOVF 20,W
1061 0454: BSF 03.5
1062 0455: MOVWF 07
1063 0456: NOP
1064 0457: BCF 03.5
1065 0458: BSF 20.3
1066 0459: MOVF 20,W
1067 045A: BSF 03.5
1068 045B: MOVWF 07
1069 045C: BCF 03.5
1070 045D: BTFSS 07.3
1071 045E: GOTO 45D
1072 045F: NOP
1073 0460: GOTO 461
1074 0461: NOP
1075 0462: BSF 20.4
1076 0463: MOVF 20,W
1077 0464: BSF 03.5
1078 0465: MOVWF 07
1079 0466: NOP
1080 ....................
1081 .................... i2c_start();//blockdata
1082 0467: BCF 03.5
1083 0468: BSF 20.4
1084 0469: MOVF 20,W
1085 046A: BSF 03.5
1086 046B: MOVWF 07
1087 046C: NOP
1088 046D: BCF 03.5
1089 046E: BSF 20.3
1090 046F: MOVF 20,W
1091 0470: BSF 03.5
1092 0471: MOVWF 07
1093 0472: NOP
1094 0473: BCF 03.5
1095 0474: BCF 07.4
1096 0475: BCF 20.4
1097 0476: MOVF 20,W
1098 0477: BSF 03.5
1099 0478: MOVWF 07
1100 0479: NOP
1101 047A: BCF 03.5
1102 047B: BCF 07.3
1103 047C: BCF 20.3
1104 047D: MOVF 20,W
1105 047E: BSF 03.5
1106 047F: MOVWF 07
1107 .................... I2C_Write(0xAA);
1108 0480: MOVLW AA
1109 0481: BCF 03.5
1110 0482: MOVWF 2C
1111 0483: CALL 086
1112 .................... I2C_write(0x44);
1113 0484: MOVLW 44
1114 0485: MOVWF 2C
1115 0486: CALL 086
1116 ....................
1117 .................... i2c_start();
1118 0487: BSF 20.4
1119 0488: MOVF 20,W
1120 0489: BSF 03.5
1121 048A: MOVWF 07
1122 048B: NOP
1123 048C: BCF 03.5
1124 048D: BSF 20.3
1125 048E: MOVF 20,W
1126 048F: BSF 03.5
1127 0490: MOVWF 07
1128 0491: NOP
1129 0492: BCF 03.5
1130 0493: BTFSS 07.3
1131 0494: GOTO 493
1132 0495: BCF 07.4
1133 0496: BCF 20.4
1134 0497: MOVF 20,W
1135 0498: BSF 03.5
1136 0499: MOVWF 07
1137 049A: NOP
1138 049B: BCF 03.5
1139 049C: BCF 07.3
1140 049D: BCF 20.3
1141 049E: MOVF 20,W
1142 049F: BSF 03.5
1143 04A0: MOVWF 07
1144 .................... I2C_Write(0xAA);
1145 04A1: MOVLW AA
1146 04A2: BCF 03.5
1147 04A3: MOVWF 2C
1148 04A4: CALL 086
1149 .................... I2C_write(0x5A);
1150 04A5: MOVLW 5A
1151 04A6: MOVWF 2C
1152 04A7: CALL 086
1153 .................... i2c_stop();
1154 04A8: BCF 20.4
1155 04A9: MOVF 20,W
1156 04AA: BSF 03.5
1157 04AB: MOVWF 07
1158 04AC: NOP
1159 04AD: BCF 03.5
1160 04AE: BSF 20.3
1161 04AF: MOVF 20,W
1162 04B0: BSF 03.5
1163 04B1: MOVWF 07
1164 04B2: BCF 03.5
1165 04B3: BTFSS 07.3
1166 04B4: GOTO 4B3
1167 04B5: NOP
1168 04B6: GOTO 4B7
1169 04B7: NOP
1170 04B8: BSF 20.4
1171 04B9: MOVF 20,W
1172 04BA: BSF 03.5
1173 04BB: MOVWF 07
1174 04BC: NOP
1175 04BD: BCF 03.5
1176 ....................
1177 ....................
1178 ....................
1179 ....................
1180 .................... }
1181 ....................
1182 .................... i2c_start();//blockdata
1183 04BE: BSF 20.4
1184 04BF: MOVF 20,W
1185 04C0: BSF 03.5
1186 04C1: MOVWF 07
1187 04C2: NOP
1188 04C3: BCF 03.5
1189 04C4: BSF 20.3
1190 04C5: MOVF 20,W
1191 04C6: BSF 03.5
1192 04C7: MOVWF 07
1193 04C8: NOP
1194 04C9: BCF 03.5
1195 04CA: BCF 07.4
1196 04CB: BCF 20.4
1197 04CC: MOVF 20,W
1198 04CD: BSF 03.5
1199 04CE: MOVWF 07
1200 04CF: NOP
1201 04D0: BCF 03.5
1202 04D1: BCF 07.3
1203 04D2: BCF 20.3
1204 04D3: MOVF 20,W
1205 04D4: BSF 03.5
1206 04D5: MOVWF 07
1207 .................... I2C_Write(0xAA);
1208 04D6: MOVLW AA
1209 04D7: BCF 03.5
1210 04D8: MOVWF 2C
1211 04D9: CALL 086
1212 .................... I2C_write(0x60);
1213 04DA: MOVLW 60
1214 04DB: MOVWF 2C
1215 04DC: CALL 086
1216 ....................
1217 .................... i2c_start();
1218 04DD: BSF 20.4
1219 04DE: MOVF 20,W
1220 04DF: BSF 03.5
1221 04E0: MOVWF 07
1222 04E1: NOP
1223 04E2: BCF 03.5
1224 04E3: BSF 20.3
1225 04E4: MOVF 20,W
1226 04E5: BSF 03.5
1227 04E6: MOVWF 07
1228 04E7: NOP
1229 04E8: BCF 03.5
1230 04E9: BTFSS 07.3
1231 04EA: GOTO 4E9
1232 04EB: BCF 07.4
1233 04EC: BCF 20.4
1234 04ED: MOVF 20,W
1235 04EE: BSF 03.5
1236 04EF: MOVWF 07
1237 04F0: NOP
1238 04F1: BCF 03.5
1239 04F2: BCF 07.3
1240 04F3: BCF 20.3
1241 04F4: MOVF 20,W
1242 04F5: BSF 03.5
1243 04F6: MOVWF 07
1244 .................... I2C_Write(0xAA);
1245 04F7: MOVLW AA
1246 04F8: BCF 03.5
1247 04F9: MOVWF 2C
1248 04FA: CALL 086
1249 .................... I2C_write(LSB);
1250 04FB: MOVF 27,W
1251 04FC: MOVWF 2C
1252 04FD: CALL 086
1253 .................... i2c_stop();
1254 04FE: BCF 20.4
1255 04FF: MOVF 20,W
1256 0500: BSF 03.5
1257 0501: MOVWF 07
1258 0502: NOP
1259 0503: BCF 03.5
1260 0504: BSF 20.3
1261 0505: MOVF 20,W
1262 0506: BSF 03.5
1263 0507: MOVWF 07
1264 0508: BCF 03.5
1265 0509: BTFSS 07.3
1266 050A: GOTO 509
1267 050B: NOP
1268 050C: GOTO 50D
1269 050D: NOP
1270 050E: BSF 20.4
1271 050F: MOVF 20,W
1272 0510: BSF 03.5
1273 0511: MOVWF 07
1274 0512: NOP
1275 ....................
1276 .................... LSB=LSB+1;
1277 0513: MOVLW 01
1278 0514: BCF 03.5
1279 0515: ADDWF 27,F
1280 ....................
1281 .................... delay_ms (100);
1282 0516: MOVLW 64
1283 0517: MOVWF 2C
1284 0518: CALL 0D0
1285 ....................
1286 .................... }
1287 0519: GOTO 209
1288 ....................
1289 .................... }
1290 ....................
1291 051A: SLEEP
1292  
1293 Configuration Fuses:
1294 Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
1295 Word 2: 3FFF NOWRT BORV40