Rev Author Line No. Line
1045 jacho 1 CCS PCM C Compiler, Version 4.106, 47914 11-4-13 19:05
2  
3 Filename: C:\Users\Honza\Documents\pic\I2C_bat_pam\Cteni\main.lst
4  
5 ROM used: 975 words (12%)
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 171
15 0003: NOP
16 .................... #include "C:\Users\Honza\Documents\pic\I2C_bat_pam\Cteni\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 00B8: MOVLW 2C
41 00B9: MOVWF 04
42 00BA: BCF 03.7
43 00BB: MOVF 00,W
44 00BC: BTFSC 03.2
45 00BD: GOTO 0CB
46 00BE: MOVLW 02
47 00BF: MOVWF 78
48 00C0: CLRF 77
49 00C1: DECFSZ 77,F
50 00C2: GOTO 0C1
51 00C3: DECFSZ 78,F
52 00C4: GOTO 0C0
53 00C5: MOVLW 97
54 00C6: MOVWF 77
55 00C7: DECFSZ 77,F
56 00C8: GOTO 0C7
57 00C9: DECFSZ 00,F
58 00CA: GOTO 0BE
59 00CB: RETURN
60 ....................
61 ....................
62 ....................
63 ....................
64 .................... #define EEPROM_SDA PIN_B0
65 .................... #define EEPROM_SCL PIN_B1
66 .................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL)
67 *
68 0084: MOVLW 08
69 0085: MOVWF 78
70 0086: NOP
71 0087: BCF 06.1
72 0088: BSF 03.5
73 0089: BCF 06.1
74 008A: NOP
75 008B: BCF 03.5
76 008C: RLF 2C,F
77 008D: BCF 06.0
78 008E: BTFSS 03.0
79 008F: GOTO 093
80 0090: BSF 03.5
81 0091: BSF 06.0
82 0092: BCF 03.5
83 0093: BTFSC 03.0
84 0094: GOTO 098
85 0095: BSF 03.5
86 0096: BCF 06.0
87 0097: BCF 03.5
88 0098: BSF 03.5
89 0099: BSF 06.1
90 009A: BCF 03.5
91 009B: BTFSS 06.1
92 009C: GOTO 09B
93 009D: DECFSZ 78,F
94 009E: GOTO 086
95 009F: NOP
96 00A0: BCF 06.1
97 00A1: BSF 03.5
98 00A2: BCF 06.1
99 00A3: NOP
100 00A4: BSF 06.0
101 00A5: NOP
102 00A6: NOP
103 00A7: BSF 06.1
104 00A8: BCF 03.5
105 00A9: BTFSS 06.1
106 00AA: GOTO 0A9
107 00AB: CLRF 78
108 00AC: NOP
109 00AD: BTFSC 06.0
110 00AE: BSF 78.0
111 00AF: BCF 06.1
112 00B0: BSF 03.5
113 00B1: BCF 06.1
114 00B2: BCF 03.5
115 00B3: BCF 06.0
116 00B4: BSF 03.5
117 00B5: BCF 06.0
118 00B6: BCF 03.5
119 00B7: RETURN
120 *
121 00CC: MOVLW 08
122 00CD: MOVWF 2D
123 00CE: MOVF 77,W
124 00CF: MOVWF 2E
125 00D0: BSF 03.5
126 00D1: BSF 06.0
127 00D2: NOP
128 00D3: BSF 06.1
129 00D4: BCF 03.5
130 00D5: BTFSS 06.1
131 00D6: GOTO 0D5
132 00D7: BTFSC 06.0
133 00D8: BSF 03.0
134 00D9: BTFSS 06.0
135 00DA: BCF 03.0
136 00DB: RLF 78,F
137 00DC: NOP
138 00DD: BSF 03.5
139 00DE: BCF 06.1
140 00DF: BCF 03.5
141 00E0: BCF 06.1
142 00E1: DECFSZ 2D,F
143 00E2: GOTO 0D0
144 00E3: BSF 03.5
145 00E4: BSF 06.0
146 00E5: NOP
147 00E6: BCF 03.5
148 00E7: BCF 06.0
149 00E8: MOVF 2E,W
150 00E9: BTFSC 03.2
151 00EA: GOTO 0EE
152 00EB: BSF 03.5
153 00EC: BCF 06.0
154 00ED: BCF 03.5
155 00EE: NOP
156 00EF: BSF 03.5
157 00F0: BSF 06.1
158 00F1: BCF 03.5
159 00F2: BTFSS 06.1
160 00F3: GOTO 0F2
161 00F4: NOP
162 00F5: BCF 06.1
163 00F6: BSF 03.5
164 00F7: BCF 06.1
165 00F8: NOP
166 00F9: BCF 03.5
167 00FA: BCF 06.0
168 00FB: BSF 03.5
169 00FC: BCF 06.0
170 00FD: BCF 03.5
171 00FE: RETURN
172 .................... #use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B2,bits=8) //rcv TXD xmit RXD
173 *
174 001A: BSF 03.5
175 001B: BCF 06.3
176 001C: BCF 03.5
177 001D: BCF 06.3
178 001E: MOVLW 08
179 001F: MOVWF 78
180 0020: GOTO 021
181 0021: NOP
182 0022: BSF 78.7
183 0023: GOTO 032
184 0024: BCF 78.7
185 0025: RRF 30,F
186 0026: BTFSC 03.0
187 0027: BSF 06.3
188 0028: BTFSS 03.0
189 0029: BCF 06.3
190 002A: BSF 78.6
191 002B: GOTO 032
192 002C: BCF 78.6
193 002D: DECFSZ 78,F
194 002E: GOTO 025
195 002F: GOTO 030
196 0030: NOP
197 0031: BSF 06.3
198 0032: MOVLW 3F
199 0033: MOVWF 04
200 0034: DECFSZ 04,F
201 0035: GOTO 034
202 0036: NOP
203 0037: BTFSC 78.7
204 0038: GOTO 024
205 0039: BTFSC 78.6
206 003A: GOTO 02C
207 003B: RETURN
208 ....................
209 ....................
210 .................... void main()
211 .................... {
212 *
213 0171: CLRF 04
214 0172: BCF 03.7
215 0173: MOVLW 1F
216 0174: ANDWF 03,F
217 0175: MOVLW 71
218 0176: BSF 03.5
219 0177: MOVWF 0F
220 0178: MOVF 0F,W
221 0179: BCF 06.3
222 017A: BCF 03.5
223 017B: BSF 06.3
224 017C: BSF 03.5
225 017D: BSF 03.6
226 017E: MOVF 09,W
227 017F: ANDLW C0
228 0180: MOVWF 09
229 0181: BCF 03.6
230 0182: BCF 1F.4
231 0183: BCF 1F.5
232 0184: MOVLW 00
233 0185: BSF 03.6
234 0186: MOVWF 08
235 0187: BCF 03.5
236 0188: CLRF 07
237 0189: CLRF 08
238 018A: CLRF 09
239 ....................
240 .................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
241 *
242 018E: BSF 03.5
243 018F: BSF 03.6
244 0190: MOVF 09,W
245 0191: ANDLW C0
246 0192: MOVWF 09
247 0193: BCF 03.6
248 0194: BCF 1F.4
249 0195: BCF 1F.5
250 0196: MOVLW 00
251 0197: BSF 03.6
252 0198: MOVWF 08
253 .................... setup_adc(ADC_CLOCK_DIV_2);
254 0199: BCF 03.5
255 019A: BCF 03.6
256 019B: BCF 1F.6
257 019C: BCF 1F.7
258 019D: BSF 03.5
259 019E: BCF 1F.7
260 019F: BCF 03.5
261 01A0: BSF 1F.0
262 .................... setup_spi(SPI_SS_DISABLED);
263 01A1: BCF 14.5
264 01A2: BCF 20.5
265 01A3: MOVF 20,W
266 01A4: BSF 03.5
267 01A5: MOVWF 07
268 01A6: BCF 03.5
269 01A7: BSF 20.4
270 01A8: MOVF 20,W
271 01A9: BSF 03.5
272 01AA: MOVWF 07
273 01AB: BCF 03.5
274 01AC: BCF 20.3
275 01AD: MOVF 20,W
276 01AE: BSF 03.5
277 01AF: MOVWF 07
278 01B0: MOVLW 01
279 01B1: BCF 03.5
280 01B2: MOVWF 14
281 01B3: MOVLW 00
282 01B4: BSF 03.5
283 01B5: MOVWF 14
284 .................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
285 01B6: MOVF 01,W
286 01B7: ANDLW C7
287 01B8: IORLW 08
288 01B9: MOVWF 01
289 .................... setup_timer_1(T1_DISABLED);
290 01BA: BCF 03.5
291 01BB: CLRF 10
292 .................... setup_timer_2(T2_DISABLED,0,1);
293 01BC: MOVLW 00
294 01BD: MOVWF 78
295 01BE: MOVWF 12
296 01BF: MOVLW 00
297 01C0: BSF 03.5
298 01C1: MOVWF 12
299 .................... setup_ccp1(CCP_OFF);
300 01C2: BCF 03.5
301 01C3: BSF 20.2
302 01C4: MOVF 20,W
303 01C5: BSF 03.5
304 01C6: MOVWF 07
305 01C7: BCF 03.5
306 01C8: CLRF 17
307 01C9: BSF 03.5
308 01CA: CLRF 1B
309 01CB: CLRF 1C
310 01CC: MOVLW 01
311 01CD: MOVWF 1D
312 .................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
313 01CE: BCF 03.5
314 01CF: BSF 03.6
315 01D0: CLRF 07
316 01D1: CLRF 08
317 01D2: CLRF 09
318 ....................
319 .................... printf("Simple Thermomether \r\n",);
320 01D3: MOVLW 04
321 01D4: MOVWF 0D
322 01D5: MOVLW 00
323 01D6: MOVWF 0F
324 01D7: BCF 03.6
325 01D8: GOTO 03C
326 .................... unsigned int8 STAV1,STAV2;
327 ....................
328 .................... unsigned int16 SOUCET, SOUCET1;
329 .................... unsigned int8 LSB=0,ZK,k=0,VH,VL;
330 01D9: CLRF 27
331 01DA: CLRF 29
332 .................... //unsigned int8
333 ....................
334 .................... while(TRUE)
335 .................... {
336 ....................
337 ....................
338 ....................
339 ....................
340 .................... i2c_start(); //blockdatacontrol
341 01DB: BSF 03.5
342 01DC: BSF 06.0
343 01DD: NOP
344 01DE: BSF 06.1
345 01DF: NOP
346 01E0: BCF 03.5
347 01E1: BCF 06.0
348 01E2: BSF 03.5
349 01E3: BCF 06.0
350 01E4: NOP
351 01E5: BCF 03.5
352 01E6: BCF 06.1
353 01E7: BSF 03.5
354 01E8: BCF 06.1
355 .................... I2C_Write(0xAA);
356 01E9: MOVLW AA
357 01EA: BCF 03.5
358 01EB: MOVWF 2C
359 01EC: CALL 084
360 .................... I2C_write(0x61);
361 01ED: MOVLW 61
362 01EE: MOVWF 2C
363 01EF: CALL 084
364 .................... i2c_start();
365 01F0: BSF 03.5
366 01F1: BSF 06.0
367 01F2: NOP
368 01F3: BSF 06.1
369 01F4: NOP
370 01F5: BCF 03.5
371 01F6: BTFSS 06.1
372 01F7: GOTO 1F6
373 01F8: BCF 06.0
374 01F9: BSF 03.5
375 01FA: BCF 06.0
376 01FB: NOP
377 01FC: BCF 03.5
378 01FD: BCF 06.1
379 01FE: BSF 03.5
380 01FF: BCF 06.1
381 .................... I2C_Write(0xAA);
382 0200: MOVLW AA
383 0201: BCF 03.5
384 0202: MOVWF 2C
385 0203: CALL 084
386 .................... i2c_write(0x00);
387 0204: CLRF 2C
388 0205: CALL 084
389 .................... i2c_stop();
390 0206: BSF 03.5
391 0207: BCF 06.0
392 0208: NOP
393 0209: BSF 06.1
394 020A: BCF 03.5
395 020B: BTFSS 06.1
396 020C: GOTO 20B
397 020D: NOP
398 020E: GOTO 20F
399 020F: NOP
400 0210: BSF 03.5
401 0211: BSF 06.0
402 0212: NOP
403 .................... delay_ms (1);
404 0213: MOVLW 01
405 0214: BCF 03.5
406 0215: MOVWF 2C
407 0216: CALL 0B8
408 ....................
409 ....................
410 .................... i2c_start();//dataflashclass
411 0217: BSF 03.5
412 0218: BSF 06.0
413 0219: NOP
414 021A: BSF 06.1
415 021B: NOP
416 021C: BCF 03.5
417 021D: BCF 06.0
418 021E: BSF 03.5
419 021F: BCF 06.0
420 0220: NOP
421 0221: BCF 03.5
422 0222: BCF 06.1
423 0223: BSF 03.5
424 0224: BCF 06.1
425 .................... I2C_Write(0xAA);
426 0225: MOVLW AA
427 0226: BCF 03.5
428 0227: MOVWF 2C
429 0228: CALL 084
430 .................... I2C_write(0x3e);
431 0229: MOVLW 3E
432 022A: MOVWF 2C
433 022B: CALL 084
434 ....................
435 .................... i2c_start();
436 022C: BSF 03.5
437 022D: BSF 06.0
438 022E: NOP
439 022F: BSF 06.1
440 0230: NOP
441 0231: BCF 03.5
442 0232: BTFSS 06.1
443 0233: GOTO 232
444 0234: BCF 06.0
445 0235: BSF 03.5
446 0236: BCF 06.0
447 0237: NOP
448 0238: BCF 03.5
449 0239: BCF 06.1
450 023A: BSF 03.5
451 023B: BCF 06.1
452 .................... I2C_Write(0xAA);
453 023C: MOVLW AA
454 023D: BCF 03.5
455 023E: MOVWF 2C
456 023F: CALL 084
457 .................... i2c_write(0x50);
458 0240: MOVLW 50
459 0241: MOVWF 2C
460 0242: CALL 084
461 .................... i2c_stop();
462 0243: BSF 03.5
463 0244: BCF 06.0
464 0245: NOP
465 0246: BSF 06.1
466 0247: BCF 03.5
467 0248: BTFSS 06.1
468 0249: GOTO 248
469 024A: NOP
470 024B: GOTO 24C
471 024C: NOP
472 024D: BSF 03.5
473 024E: BSF 06.0
474 024F: NOP
475 .................... delay_ms (1);
476 0250: MOVLW 01
477 0251: BCF 03.5
478 0252: MOVWF 2C
479 0253: CALL 0B8
480 ....................
481 ....................
482 .................... i2c_start();//dataflashblock
483 0254: BSF 03.5
484 0255: BSF 06.0
485 0256: NOP
486 0257: BSF 06.1
487 0258: NOP
488 0259: BCF 03.5
489 025A: BCF 06.0
490 025B: BSF 03.5
491 025C: BCF 06.0
492 025D: NOP
493 025E: BCF 03.5
494 025F: BCF 06.1
495 0260: BSF 03.5
496 0261: BCF 06.1
497 .................... I2C_Write(0xAA);
498 0262: MOVLW AA
499 0263: BCF 03.5
500 0264: MOVWF 2C
501 0265: CALL 084
502 .................... I2C_write(0x3f);
503 0266: MOVLW 3F
504 0267: MOVWF 2C
505 0268: CALL 084
506 ....................
507 .................... i2c_start();
508 0269: BSF 03.5
509 026A: BSF 06.0
510 026B: NOP
511 026C: BSF 06.1
512 026D: NOP
513 026E: BCF 03.5
514 026F: BTFSS 06.1
515 0270: GOTO 26F
516 0271: BCF 06.0
517 0272: BSF 03.5
518 0273: BCF 06.0
519 0274: NOP
520 0275: BCF 03.5
521 0276: BCF 06.1
522 0277: BSF 03.5
523 0278: BCF 06.1
524 .................... I2C_Write(0xAA);
525 0279: MOVLW AA
526 027A: BCF 03.5
527 027B: MOVWF 2C
528 027C: CALL 084
529 .................... I2C_write(0x02);
530 027D: MOVLW 02
531 027E: MOVWF 2C
532 027F: CALL 084
533 .................... i2c_stop();
534 0280: BSF 03.5
535 0281: BCF 06.0
536 0282: NOP
537 0283: BSF 06.1
538 0284: BCF 03.5
539 0285: BTFSS 06.1
540 0286: GOTO 285
541 0287: NOP
542 0288: GOTO 289
543 0289: NOP
544 028A: BSF 03.5
545 028B: BSF 06.0
546 028C: NOP
547 ....................
548 .................... delay_ms (1);
549 028D: MOVLW 01
550 028E: BCF 03.5
551 028F: MOVWF 2C
552 0290: CALL 0B8
553 ....................
554 ....................
555 ....................
556 ....................
557 .................... i2c_start();//blockdata
558 0291: BSF 03.5
559 0292: BSF 06.0
560 0293: NOP
561 0294: BSF 06.1
562 0295: NOP
563 0296: BCF 03.5
564 0297: BCF 06.0
565 0298: BSF 03.5
566 0299: BCF 06.0
567 029A: NOP
568 029B: BCF 03.5
569 029C: BCF 06.1
570 029D: BSF 03.5
571 029E: BCF 06.1
572 .................... I2C_Write(0xAA);
573 029F: MOVLW AA
574 02A0: BCF 03.5
575 02A1: MOVWF 2C
576 02A2: CALL 084
577 .................... I2C_write(0x45);
578 02A3: MOVLW 45
579 02A4: MOVWF 2C
580 02A5: CALL 084
581 ....................
582 .................... i2c_start();
583 02A6: BSF 03.5
584 02A7: BSF 06.0
585 02A8: NOP
586 02A9: BSF 06.1
587 02AA: NOP
588 02AB: BCF 03.5
589 02AC: BTFSS 06.1
590 02AD: GOTO 2AC
591 02AE: BCF 06.0
592 02AF: BSF 03.5
593 02B0: BCF 06.0
594 02B1: NOP
595 02B2: BCF 03.5
596 02B3: BCF 06.1
597 02B4: BSF 03.5
598 02B5: BCF 06.1
599 .................... I2C_Write(0xAB);
600 02B6: MOVLW AB
601 02B7: BCF 03.5
602 02B8: MOVWF 2C
603 02B9: CALL 084
604 .................... VH=I2C_read(0);
605 02BA: CLRF 77
606 02BB: CALL 0CC
607 02BC: MOVF 78,W
608 02BD: MOVWF 2A
609 ....................
610 .................... i2c_stop();
611 02BE: BSF 03.5
612 02BF: BCF 06.0
613 02C0: NOP
614 02C1: BSF 06.1
615 02C2: BCF 03.5
616 02C3: BTFSS 06.1
617 02C4: GOTO 2C3
618 02C5: NOP
619 02C6: GOTO 2C7
620 02C7: NOP
621 02C8: BSF 03.5
622 02C9: BSF 06.0
623 02CA: NOP
624 ....................
625 .................... i2c_start();//blockdata
626 02CB: BSF 06.0
627 02CC: NOP
628 02CD: BSF 06.1
629 02CE: NOP
630 02CF: BCF 03.5
631 02D0: BCF 06.0
632 02D1: BSF 03.5
633 02D2: BCF 06.0
634 02D3: NOP
635 02D4: BCF 03.5
636 02D5: BCF 06.1
637 02D6: BSF 03.5
638 02D7: BCF 06.1
639 .................... I2C_Write(0xAA);
640 02D8: MOVLW AA
641 02D9: BCF 03.5
642 02DA: MOVWF 2C
643 02DB: CALL 084
644 .................... I2C_write(0x46);
645 02DC: MOVLW 46
646 02DD: MOVWF 2C
647 02DE: CALL 084
648 ....................
649 .................... i2c_start();
650 02DF: BSF 03.5
651 02E0: BSF 06.0
652 02E1: NOP
653 02E2: BSF 06.1
654 02E3: NOP
655 02E4: BCF 03.5
656 02E5: BTFSS 06.1
657 02E6: GOTO 2E5
658 02E7: BCF 06.0
659 02E8: BSF 03.5
660 02E9: BCF 06.0
661 02EA: NOP
662 02EB: BCF 03.5
663 02EC: BCF 06.1
664 02ED: BSF 03.5
665 02EE: BCF 06.1
666 .................... I2C_Write(0xAB);
667 02EF: MOVLW AB
668 02F0: BCF 03.5
669 02F1: MOVWF 2C
670 02F2: CALL 084
671 ....................
672 .................... VL=I2C_read(0);
673 02F3: CLRF 77
674 02F4: CALL 0CC
675 02F5: MOVF 78,W
676 02F6: MOVWF 2B
677 .................... i2c_stop();
678 02F7: BSF 03.5
679 02F8: BCF 06.0
680 02F9: NOP
681 02FA: BSF 06.1
682 02FB: BCF 03.5
683 02FC: BTFSS 06.1
684 02FD: GOTO 2FC
685 02FE: NOP
686 02FF: GOTO 300
687 0300: NOP
688 0301: BSF 03.5
689 0302: BSF 06.0
690 0303: NOP
691 ....................
692 ....................
693 .................... delay_ms (1);
694 0304: MOVLW 01
695 0305: BCF 03.5
696 0306: MOVWF 2C
697 0307: CALL 0B8
698 ....................
699 .................... printf("VL %lX \r\n", VL);
700 0308: MOVLW 56
701 0309: MOVWF 30
702 030A: CALL 01A
703 030B: MOVLW 4C
704 030C: MOVWF 30
705 030D: CALL 01A
706 030E: MOVLW 20
707 030F: MOVWF 30
708 0310: CALL 01A
709 0311: MOVF 2B,W
710 0312: MOVWF 2C
711 0313: MOVLW 37
712 0314: MOVWF 2D
713 0315: CALL 0FF
714 0316: MOVLW 20
715 0317: MOVWF 30
716 0318: CALL 01A
717 0319: MOVLW 0D
718 031A: MOVWF 30
719 031B: CALL 01A
720 031C: MOVLW 0A
721 031D: MOVWF 30
722 031E: CALL 01A
723 .................... printf("LH %lX \r\n", VH);
724 031F: MOVLW 4C
725 0320: MOVWF 30
726 0321: CALL 01A
727 0322: MOVLW 48
728 0323: MOVWF 30
729 0324: CALL 01A
730 0325: MOVLW 20
731 0326: MOVWF 30
732 0327: CALL 01A
733 0328: MOVF 2A,W
734 0329: MOVWF 2C
735 032A: MOVLW 37
736 032B: MOVWF 2D
737 032C: CALL 0FF
738 032D: MOVLW 20
739 032E: MOVWF 30
740 032F: CALL 01A
741 0330: MOVLW 0D
742 0331: MOVWF 30
743 0332: CALL 01A
744 0333: MOVLW 0A
745 0334: MOVWF 30
746 0335: CALL 01A
747 ....................
748 ....................
749 ....................
750 ....................
751 ....................
752 ....................
753 .................... if(VH==0x00)
754 0336: MOVF 2A,F
755 0337: BTFSS 03.2
756 0338: GOTO 355
757 .................... {
758 .................... LSB=LSB-1;
759 0339: MOVLW 01
760 033A: SUBWF 27,F
761 .................... printf("Vysledne LSB %lX \r\n", LSB);
762 033B: MOVLW 10
763 033C: BSF 03.6
764 033D: MOVWF 0D
765 033E: MOVLW 00
766 033F: MOVWF 0F
767 0340: BCF 03.0
768 0341: MOVLW 0D
769 0342: BCF 03.6
770 0343: MOVWF 2C
771 0344: GOTO 120
772 0345: MOVF 27,W
773 0346: MOVWF 2C
774 0347: MOVLW 37
775 0348: MOVWF 2D
776 0349: CALL 0FF
777 034A: MOVLW 20
778 034B: MOVWF 30
779 034C: CALL 01A
780 034D: MOVLW 0D
781 034E: MOVWF 30
782 034F: CALL 01A
783 0350: MOVLW 0A
784 0351: MOVWF 30
785 0352: CALL 01A
786 .................... while(TRUE)
787 .................... {
788 .................... }
789 0353: GOTO 353
790 .................... }
791 ....................
792 .................... else
793 0354: GOTO 38E
794 .................... {
795 ....................
796 ....................
797 .................... i2c_start();//blockdata
798 0355: BSF 03.5
799 0356: BSF 06.0
800 0357: NOP
801 0358: BSF 06.1
802 0359: NOP
803 035A: BCF 03.5
804 035B: BCF 06.0
805 035C: BSF 03.5
806 035D: BCF 06.0
807 035E: NOP
808 035F: BCF 03.5
809 0360: BCF 06.1
810 0361: BSF 03.5
811 0362: BCF 06.1
812 .................... I2C_Write(0xAA);
813 0363: MOVLW AA
814 0364: BCF 03.5
815 0365: MOVWF 2C
816 0366: CALL 084
817 .................... I2C_write(0x45);
818 0367: MOVLW 45
819 0368: MOVWF 2C
820 0369: CALL 084
821 ....................
822 .................... i2c_start();
823 036A: BSF 03.5
824 036B: BSF 06.0
825 036C: NOP
826 036D: BSF 06.1
827 036E: NOP
828 036F: BCF 03.5
829 0370: BTFSS 06.1
830 0371: GOTO 370
831 0372: BCF 06.0
832 0373: BSF 03.5
833 0374: BCF 06.0
834 0375: NOP
835 0376: BCF 03.5
836 0377: BCF 06.1
837 0378: BSF 03.5
838 0379: BCF 06.1
839 .................... I2C_Write(0xAA);
840 037A: MOVLW AA
841 037B: BCF 03.5
842 037C: MOVWF 2C
843 037D: CALL 084
844 .................... I2C_write(0x00);
845 037E: CLRF 2C
846 037F: CALL 084
847 .................... i2c_stop();
848 0380: BSF 03.5
849 0381: BCF 06.0
850 0382: NOP
851 0383: BSF 06.1
852 0384: BCF 03.5
853 0385: BTFSS 06.1
854 0386: GOTO 385
855 0387: NOP
856 0388: GOTO 389
857 0389: NOP
858 038A: BSF 03.5
859 038B: BSF 06.0
860 038C: NOP
861 038D: BCF 03.5
862 ....................
863 ....................
864 ....................
865 ....................
866 ....................
867 ....................
868 .................... }
869 ....................
870 .................... i2c_start();//blockdata
871 038E: BSF 03.5
872 038F: BSF 06.0
873 0390: NOP
874 0391: BSF 06.1
875 0392: NOP
876 0393: BCF 03.5
877 0394: BCF 06.0
878 0395: BSF 03.5
879 0396: BCF 06.0
880 0397: NOP
881 0398: BCF 03.5
882 0399: BCF 06.1
883 039A: BSF 03.5
884 039B: BCF 06.1
885 .................... I2C_Write(0xAA);
886 039C: MOVLW AA
887 039D: BCF 03.5
888 039E: MOVWF 2C
889 039F: CALL 084
890 .................... I2C_write(0x60);
891 03A0: MOVLW 60
892 03A1: MOVWF 2C
893 03A2: CALL 084
894 ....................
895 .................... i2c_start();
896 03A3: BSF 03.5
897 03A4: BSF 06.0
898 03A5: NOP
899 03A6: BSF 06.1
900 03A7: NOP
901 03A8: BCF 03.5
902 03A9: BTFSS 06.1
903 03AA: GOTO 3A9
904 03AB: BCF 06.0
905 03AC: BSF 03.5
906 03AD: BCF 06.0
907 03AE: NOP
908 03AF: BCF 03.5
909 03B0: BCF 06.1
910 03B1: BSF 03.5
911 03B2: BCF 06.1
912 .................... I2C_Write(0xAA);
913 03B3: MOVLW AA
914 03B4: BCF 03.5
915 03B5: MOVWF 2C
916 03B6: CALL 084
917 .................... I2C_write(LSB);
918 03B7: MOVF 27,W
919 03B8: MOVWF 2C
920 03B9: CALL 084
921 .................... i2c_stop();
922 03BA: BSF 03.5
923 03BB: BCF 06.0
924 03BC: NOP
925 03BD: BSF 06.1
926 03BE: BCF 03.5
927 03BF: BTFSS 06.1
928 03C0: GOTO 3BF
929 03C1: NOP
930 03C2: GOTO 3C3
931 03C3: NOP
932 03C4: BSF 03.5
933 03C5: BSF 06.0
934 03C6: NOP
935 ....................
936 .................... LSB=LSB+1;
937 03C7: MOVLW 01
938 03C8: BCF 03.5
939 03C9: ADDWF 27,F
940 ....................
941 .................... delay_ms (100);
942 03CA: MOVLW 64
943 03CB: MOVWF 2C
944 03CC: CALL 0B8
945 ....................
946 .................... }
947 03CD: GOTO 1DB
948 ....................
949 .................... }
950 ....................
951 03CE: SLEEP
952  
953 Configuration Fuses:
954 Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
955 Word 2: 3FFF NOWRT BORV40