Rev 3020 Rev 3021
Line 1... Line 1...
1 CCS PCM C Compiler, Version 4.106, 47914 22-5-13 12:34 1 CCS PCM C Compiler, Version 4.106, 47914 23-V-13 16:19
2   2  
3 Filename: D:\Honza\MLAB\Designs\Measuring_instruments\GM_counter\SW\counter\main.lst 3 Filename: Z:\home\kaklik\MLAB\Designs\Measuring_instruments\GM_counter\SW\counter\main.lst
4   4  
5 ROM used: 2825 words (34%) 5 ROM used: 3009 words (37%)
6 Largest free fragment is 2048 6 Largest free fragment is 2048
7 RAM used: 36 (10%) at main() level 7 RAM used: 37 (10%) at main() level
8 55 (15%) worst case 8 56 (15%) worst case
9 Stack: 6 worst case (5 in main + 1 for interrupts) 9 Stack: 6 worst case (5 in main + 1 for interrupts)
10   10  
11 * 11 *
12 0000: MOVLW 08 12 0000: MOVLW 08
13 0001: MOVWF 0A 13 0001: MOVWF 0A
Line 87... Line 87...
87 .................... #FUSES NOWRT //Program memory not write protected 87 .................... #FUSES NOWRT //Program memory not write protected
88 .................... #FUSES BORV40 //Brownout reset at 4.0V 88 .................... #FUSES BORV40 //Brownout reset at 4.0V
89 .................... 89 ....................
90 .................... #use delay(clock=8000000) 90 .................... #use delay(clock=8000000)
91 * 91 *
92 00A9: MOVLW 46 92 00A4: MOVLW 47
93 00AA: MOVWF 04 93 00A5: MOVWF 04
94 00AB: BCF 03.7 94 00A6: BCF 03.7
95 00AC: MOVF 00,W 95 00A7: MOVF 00,W
96 00AD: BTFSC 03.2 96 00A8: BTFSC 03.2
97 00AE: GOTO 0BC 97 00A9: GOTO 0B7
98 00AF: MOVLW 02 98 00AA: MOVLW 02
99 00B0: MOVWF 78 99 00AB: MOVWF 78
100 00B1: CLRF 77 100 00AC: CLRF 77
101 00B2: DECFSZ 77,F 101 00AD: DECFSZ 77,F
102 00B3: GOTO 0B2 102 00AE: GOTO 0AD
103 00B4: DECFSZ 78,F 103 00AF: DECFSZ 78,F
104 00B5: GOTO 0B1 104 00B0: GOTO 0AC
105 00B6: MOVLW 97 105 00B1: MOVLW 97
106 00B7: MOVWF 77 106 00B2: MOVWF 77
107 00B8: DECFSZ 77,F 107 00B3: DECFSZ 77,F
108 00B9: GOTO 0B8 108 00B4: GOTO 0B3
109 00BA: DECFSZ 00,F 109 00B5: DECFSZ 00,F
110 00BB: GOTO 0AF 110 00B6: GOTO 0AA
111 00BC: RETURN 111 00B7: RETURN
112 * 112 *
113 05FC: MOVLW 08 113 0643: MOVLW 08
114 05FD: SUBWF 40,F 114 0644: SUBWF 41,F
115 05FE: BTFSS 03.0 115 0645: BTFSS 03.0
116 05FF: GOTO 60C 116 0646: GOTO 653
117 0600: MOVLW 40 117 0647: MOVLW 41
118 0601: MOVWF 04 118 0648: MOVWF 04
119 0602: BCF 03.7 119 0649: BCF 03.7
120 0603: BCF 03.0 120 064A: BCF 03.0
121 0604: RRF 00,F 121 064B: RRF 00,F
122 0605: MOVF 00,W 122 064C: MOVF 00,W
123 0606: BTFSC 03.2 123 064D: BTFSC 03.2
124 0607: GOTO 60C 124 064E: GOTO 653
125 0608: GOTO 60A 125 064F: GOTO 651
126 0609: NOP 126 0650: NOP
127 060A: DECFSZ 00,F 127 0651: DECFSZ 00,F
128 060B: GOTO 609 128 0652: GOTO 650
129 060C: RETURN 129 0653: RETURN
130 .................... #use rs232(baud=9600,parity=N,xmit=PIN_B7,rcv=PIN_B6,bits=8) 130 .................... #use rs232(baud=9600,parity=N,xmit=PIN_B7,rcv=PIN_B6,bits=8)
131 * 131 *
132 0235: BSF 03.5 132 0230: BSF 03.5
133 0236: BCF 06.7 133 0231: BCF 06.7
134 0237: BCF 03.5 134 0232: BCF 03.5
135 0238: BCF 06.7 135 0233: BCF 06.7
136 0239: MOVLW 08 136 0234: MOVLW 08
137 023A: MOVWF 78 137 0235: MOVWF 78
138 023B: GOTO 23C 138 0236: GOTO 237
139 023C: NOP 139 0237: NOP
140 023D: BSF 78.7 140 0238: BSF 78.7
141 023E: GOTO 24D 141 0239: GOTO 248
142 023F: BCF 78.7 142 023A: BCF 78.7
143 0240: RRF 45,F 143 023B: RRF 46,F
144 0241: BTFSC 03.0 144 023C: BTFSC 03.0
145 0242: BSF 06.7 145 023D: BSF 06.7
146 0243: BTFSS 03.0 146 023E: BTFSS 03.0
147 0244: BCF 06.7 147 023F: BCF 06.7
148 0245: BSF 78.6 148 0240: BSF 78.6
149 0246: GOTO 24D 149 0241: GOTO 248
150 0247: BCF 78.6 150 0242: BCF 78.6
151 0248: DECFSZ 78,F 151 0243: DECFSZ 78,F
152 0249: GOTO 240 152 0244: GOTO 23B
153 024A: GOTO 24B 153 0245: GOTO 246
154 024B: NOP 154 0246: NOP
155 024C: BSF 06.7 155 0247: BSF 06.7
156 024D: MOVLW 3F 156 0248: MOVLW 3F
157 024E: MOVWF 04 157 0249: MOVWF 04
158 024F: DECFSZ 04,F 158 024A: DECFSZ 04,F
159 0250: GOTO 24F 159 024B: GOTO 24A
160 0251: NOP 160 024C: NOP
161 0252: BTFSC 78.7 161 024D: BTFSC 78.7
162 0253: GOTO 23F 162 024E: GOTO 23A
163 0254: BTFSC 78.6 163 024F: BTFSC 78.6
164 0255: GOTO 247 164 0250: GOTO 242
165 0256: RETURN 165 0251: RETURN
166 .................... 166 ....................
167 .................... 167 ....................
168 .................... 168 ....................
169 .................... #define LED1 PIN_C6 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5 169 .................... #define LED1 PIN_C6 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5
170 .................... #define LED2 PIN_C5 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5 170 .................... #define LED2 PIN_C5 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5
Line 382... Line 382...
382 .................... set_tris_lcd(LCD_INPUT_MAP); 382 .................... set_tris_lcd(LCD_INPUT_MAP);
383 .................... #else 383 .................... #else
384 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 384 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
385 .................... output_float(LCD_DATA4); 385 .................... output_float(LCD_DATA4);
386 * 386 *
387 0122: BSF 08.4 387 011D: BSF 08.4
388 .................... output_float(LCD_DATA5); 388 .................... output_float(LCD_DATA5);
389 0123: BSF 08.5 389 011E: BSF 08.5
390 .................... output_float(LCD_DATA6); 390 .................... output_float(LCD_DATA6);
391 0124: BSF 08.6 391 011F: BSF 08.6
392 .................... output_float(LCD_DATA7); 392 .................... output_float(LCD_DATA7);
393 0125: BSF 08.7 393 0120: BSF 08.7
394 .................... #else 394 .................... #else
395 .................... lcdtris.data = 0xF; 395 .................... lcdtris.data = 0xF;
396 .................... #endif 396 .................... #endif
397 .................... #endif 397 .................... #endif
398 .................... 398 ....................
399 .................... lcd_output_rw(1); 399 .................... lcd_output_rw(1);
-   400 0121: BCF 03.5
-   401 0122: BSF 09.2
-   402 0123: BSF 03.5
-   403 0124: BCF 09.2
-   404 .................... delay_cycles(1);
-   405 0125: NOP
-   406 .................... lcd_output_enable(1);
400 0126: BCF 03.5 407 0126: BCF 03.5
401 0127: BSF 09.2 408 0127: BSF 09.0
402 0128: BSF 03.5 409 0128: BSF 03.5
403 0129: BCF 09.2 410 0129: BCF 09.0
404 .................... delay_cycles(1); 411 .................... delay_cycles(1);
405 012A: NOP 412 012A: NOP
406 .................... lcd_output_enable(1); -  
407 012B: BCF 03.5 -  
408 012C: BSF 09.0 -  
409 012D: BSF 03.5 -  
410 012E: BCF 09.0 -  
411 .................... delay_cycles(1); -  
412 012F: NOP -  
413 .................... high = lcd_read_nibble(); 413 .................... high = lcd_read_nibble();
414 0130: BCF 03.5 414 012B: BCF 03.5
415 0131: CALL 0E9 415 012C: CALL 0E4
416 0132: MOVF 78,W 416 012D: MOVF 78,W
417 0133: MOVWF 4D 417 012E: MOVWF 4E
418 .................... 418 ....................
419 .................... lcd_output_enable(0); 419 .................... lcd_output_enable(0);
420 0134: BCF 09.0 420 012F: BCF 09.0
421 0135: BSF 03.5 421 0130: BSF 03.5
422 0136: BCF 09.0 422 0131: BCF 09.0
423 .................... delay_cycles(1); 423 .................... delay_cycles(1);
424 0137: NOP 424 0132: NOP
425 .................... lcd_output_enable(1); 425 .................... lcd_output_enable(1);
426 0138: BCF 03.5 426 0133: BCF 03.5
427 0139: BSF 09.0 427 0134: BSF 09.0
428 013A: BSF 03.5 428 0135: BSF 03.5
429 013B: BCF 09.0 429 0136: BCF 09.0
430 .................... delay_us(1); 430 .................... delay_us(1);
431 013C: GOTO 13D 431 0137: GOTO 138
432 .................... low = lcd_read_nibble(); 432 .................... low = lcd_read_nibble();
433 013D: BCF 03.5 433 0138: BCF 03.5
434 013E: CALL 0E9 434 0139: CALL 0E4
435 013F: MOVF 78,W 435 013A: MOVF 78,W
436 0140: MOVWF 4C 436 013B: MOVWF 4D
437 .................... 437 ....................
438 .................... lcd_output_enable(0); 438 .................... lcd_output_enable(0);
439 0141: BCF 09.0 439 013C: BCF 09.0
440 0142: BSF 03.5 440 013D: BSF 03.5
441 0143: BCF 09.0 441 013E: BCF 09.0
442 .................... 442 ....................
443 .................... #if defined(__PCB__) 443 .................... #if defined(__PCB__)
444 .................... set_tris_lcd(LCD_OUTPUT_MAP); 444 .................... set_tris_lcd(LCD_OUTPUT_MAP);
445 .................... #else 445 .................... #else
446 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 446 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
447 .................... output_drive(LCD_DATA4); 447 .................... output_drive(LCD_DATA4);
448 0144: BCF 08.4 448 013F: BCF 08.4
449 .................... output_drive(LCD_DATA5); 449 .................... output_drive(LCD_DATA5);
450 0145: BCF 08.5 450 0140: BCF 08.5
451 .................... output_drive(LCD_DATA6); 451 .................... output_drive(LCD_DATA6);
452 0146: BCF 08.6 452 0141: BCF 08.6
453 .................... output_drive(LCD_DATA7); 453 .................... output_drive(LCD_DATA7);
454 0147: BCF 08.7 454 0142: BCF 08.7
455 .................... #else 455 .................... #else
456 .................... lcdtris.data = 0x0; 456 .................... lcdtris.data = 0x0;
457 .................... #endif 457 .................... #endif
458 .................... #endif 458 .................... #endif
459 .................... 459 ....................
460 .................... return( (high<<4) | low); 460 .................... return( (high<<4) | low);
461 0148: BCF 03.5 461 0143: BCF 03.5
462 0149: SWAPF 4D,W 462 0144: SWAPF 4E,W
463 014A: MOVWF 77 463 0145: MOVWF 77
464 014B: MOVLW F0 464 0146: MOVLW F0
465 014C: ANDWF 77,F 465 0147: ANDWF 77,F
466 014D: MOVF 77,W 466 0148: MOVF 77,W
467 014E: IORWF 4C,W 467 0149: IORWF 4D,W
468 014F: MOVWF 78 468 014A: MOVWF 78
469 .................... } 469 .................... }
470 .................... 470 ....................
471 .................... BYTE lcd_read_nibble(void) 471 .................... BYTE lcd_read_nibble(void)
472 .................... { 472 .................... {
473 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 473 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
474 * 474 *
475 00E9: CLRF 4E 475 00E4: CLRF 4F
476 .................... BYTE n = 0x00; 476 .................... BYTE n = 0x00;
477 .................... 477 ....................
478 .................... /* Read the data port */ 478 .................... /* Read the data port */
479 .................... n |= input(LCD_DATA4); 479 .................... n |= input(LCD_DATA4);
480 00EA: BSF 03.5 480 00E5: BSF 03.5
481 00EB: BSF 08.4 481 00E6: BSF 08.4
482 00EC: MOVLW 00 482 00E7: MOVLW 00
483 00ED: BCF 03.5 483 00E8: BCF 03.5
484 00EE: BTFSC 08.4 484 00E9: BTFSC 08.4
485 00EF: MOVLW 01 485 00EA: MOVLW 01
486 00F0: IORWF 4E,F 486 00EB: IORWF 4F,F
487 .................... n |= input(LCD_DATA5) << 1; 487 .................... n |= input(LCD_DATA5) << 1;
488 00F1: BSF 03.5 488 00EC: BSF 03.5
489 00F2: BSF 08.5 489 00ED: BSF 08.5
490 00F3: MOVLW 00 490 00EE: MOVLW 00
491 00F4: BCF 03.5 491 00EF: BCF 03.5
492 00F5: BTFSC 08.5 492 00F0: BTFSC 08.5
493 00F6: MOVLW 01 493 00F1: MOVLW 01
494 00F7: MOVWF 77 494 00F2: MOVWF 77
495 00F8: BCF 03.0 495 00F3: BCF 03.0
496 00F9: RLF 77,F 496 00F4: RLF 77,F
497 00FA: MOVF 77,W 497 00F5: MOVF 77,W
498 00FB: IORWF 4E,F 498 00F6: IORWF 4F,F
499 .................... n |= input(LCD_DATA6) << 2; 499 .................... n |= input(LCD_DATA6) << 2;
500 00FC: BSF 03.5 500 00F7: BSF 03.5
501 00FD: BSF 08.6 501 00F8: BSF 08.6
502 00FE: MOVLW 00 502 00F9: MOVLW 00
503 00FF: BCF 03.5 503 00FA: BCF 03.5
504 0100: BTFSC 08.6 504 00FB: BTFSC 08.6
505 0101: MOVLW 01 505 00FC: MOVLW 01
506 0102: MOVWF 77 506 00FD: MOVWF 77
507 0103: RLF 77,F 507 00FE: RLF 77,F
508 0104: RLF 77,F 508 00FF: RLF 77,F
509 0105: MOVLW FC 509 0100: MOVLW FC
510 0106: ANDWF 77,F 510 0101: ANDWF 77,F
511 0107: MOVF 77,W 511 0102: MOVF 77,W
512 0108: IORWF 4E,F 512 0103: IORWF 4F,F
513 .................... n |= input(LCD_DATA7) << 3; 513 .................... n |= input(LCD_DATA7) << 3;
514 0109: BSF 03.5 514 0104: BSF 03.5
515 010A: BSF 08.7 515 0105: BSF 08.7
516 010B: MOVLW 00 516 0106: MOVLW 00
517 010C: BCF 03.5 517 0107: BCF 03.5
518 010D: BTFSC 08.7 518 0108: BTFSC 08.7
519 010E: MOVLW 01 519 0109: MOVLW 01
520 010F: MOVWF 77 520 010A: MOVWF 77
521 0110: RLF 77,F 521 010B: RLF 77,F
522 0111: RLF 77,F 522 010C: RLF 77,F
523 0112: RLF 77,F 523 010D: RLF 77,F
524 0113: MOVLW F8 524 010E: MOVLW F8
525 0114: ANDWF 77,F 525 010F: ANDWF 77,F
526 0115: MOVF 77,W 526 0110: MOVF 77,W
527 0116: IORWF 4E,F 527 0111: IORWF 4F,F
528 .................... 528 ....................
529 .................... return(n); 529 .................... return(n);
530 0117: MOVF 4E,W 530 0112: MOVF 4F,W
531 0118: MOVWF 78 531 0113: MOVWF 78
532 .................... #else 532 .................... #else
533 .................... return(lcd.data); 533 .................... return(lcd.data);
534 .................... #endif 534 .................... #endif
535 .................... } 535 .................... }
536 0119: RETURN 536 0114: RETURN
537 .................... 537 ....................
538 .................... void lcd_send_nibble(BYTE n) 538 .................... void lcd_send_nibble(BYTE n)
539 .................... { 539 .................... {
540 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 540 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
541 .................... /* Write to the data port */ 541 .................... /* Write to the data port */
542 .................... output_bit(LCD_DATA4, bit_test(n, 0)); 542 .................... output_bit(LCD_DATA4, bit_test(n, 0));
543 * 543 *
544 00BD: BTFSC 4D.0 544 00B8: BTFSC 4E.0
545 00BE: GOTO 0C1 545 00B9: GOTO 0BC
546 00BF: BCF 08.4 546 00BA: BCF 08.4
547 00C0: GOTO 0C2 547 00BB: GOTO 0BD
548 00C1: BSF 08.4 548 00BC: BSF 08.4
549 00C2: BSF 03.5 549 00BD: BSF 03.5
550 00C3: BCF 08.4 550 00BE: BCF 08.4
551 .................... output_bit(LCD_DATA5, bit_test(n, 1)); 551 .................... output_bit(LCD_DATA5, bit_test(n, 1));
552 00C4: BCF 03.5 552 00BF: BCF 03.5
553 00C5: BTFSC 4D.1 553 00C0: BTFSC 4E.1
554 00C6: GOTO 0C9 554 00C1: GOTO 0C4
555 00C7: BCF 08.5 555 00C2: BCF 08.5
556 00C8: GOTO 0CA 556 00C3: GOTO 0C5
557 00C9: BSF 08.5 557 00C4: BSF 08.5
558 00CA: BSF 03.5 558 00C5: BSF 03.5
559 00CB: BCF 08.5 559 00C6: BCF 08.5
560 .................... output_bit(LCD_DATA6, bit_test(n, 2)); 560 .................... output_bit(LCD_DATA6, bit_test(n, 2));
561 00CC: BCF 03.5 561 00C7: BCF 03.5
562 00CD: BTFSC 4D.2 562 00C8: BTFSC 4E.2
563 00CE: GOTO 0D1 563 00C9: GOTO 0CC
564 00CF: BCF 08.6 564 00CA: BCF 08.6
565 00D0: GOTO 0D2 565 00CB: GOTO 0CD
566 00D1: BSF 08.6 566 00CC: BSF 08.6
567 00D2: BSF 03.5 567 00CD: BSF 03.5
568 00D3: BCF 08.6 568 00CE: BCF 08.6
569 .................... output_bit(LCD_DATA7, bit_test(n, 3)); 569 .................... output_bit(LCD_DATA7, bit_test(n, 3));
570 00D4: BCF 03.5 570 00CF: BCF 03.5
571 00D5: BTFSC 4D.3 571 00D0: BTFSC 4E.3
572 00D6: GOTO 0D9 572 00D1: GOTO 0D4
573 00D7: BCF 08.7 573 00D2: BCF 08.7
574 00D8: GOTO 0DA 574 00D3: GOTO 0D5
575 00D9: BSF 08.7 575 00D4: BSF 08.7
576 00DA: BSF 03.5 576 00D5: BSF 03.5
577 00DB: BCF 08.7 577 00D6: BCF 08.7
578 .................... #else 578 .................... #else
579 .................... lcdlat.data = n; 579 .................... lcdlat.data = n;
580 .................... #endif 580 .................... #endif
581 .................... 581 ....................
582 .................... delay_cycles(1); 582 .................... delay_cycles(1);
583 00DC: NOP 583 00D7: NOP
584 .................... lcd_output_enable(1); 584 .................... lcd_output_enable(1);
585 00DD: BCF 03.5 585 00D8: BCF 03.5
586 00DE: BSF 09.0 586 00D9: BSF 09.0
587 00DF: BSF 03.5 587 00DA: BSF 03.5
588 00E0: BCF 09.0 588 00DB: BCF 09.0
589 .................... delay_us(2); 589 .................... delay_us(2);
590 00E1: GOTO 0E2 590 00DC: GOTO 0DD
591 00E2: GOTO 0E3 591 00DD: GOTO 0DE
592 .................... lcd_output_enable(0); 592 .................... lcd_output_enable(0);
593 00E3: BCF 03.5 593 00DE: BCF 03.5
594 00E4: BCF 09.0 594 00DF: BCF 09.0
595 00E5: BSF 03.5 595 00E0: BSF 03.5
596 00E6: BCF 09.0 596 00E1: BCF 09.0
597 .................... } 597 .................... }
598 00E7: BCF 03.5 598 00E2: BCF 03.5
599 00E8: RETURN 599 00E3: RETURN
600 .................... 600 ....................
601 .................... void lcd_send_byte(BYTE address, BYTE n) 601 .................... void lcd_send_byte(BYTE address, BYTE n)
602 .................... { 602 .................... {
603 .................... #if defined(__PCB__) 603 .................... #if defined(__PCB__)
604 .................... set_tris_lcd(LCD_OUTPUT_MAP); 604 .................... set_tris_lcd(LCD_OUTPUT_MAP);
605 .................... #else 605 .................... #else
606 .................... lcd_enable_tris(); 606 .................... lcd_enable_tris();
607 * 607 *
608 011A: BSF 03.5 608 0115: BSF 03.5
609 011B: BCF 09.0 609 0116: BCF 09.0
610 .................... lcd_rs_tris(); 610 .................... lcd_rs_tris();
611 011C: BCF 09.1 611 0117: BCF 09.1
612 .................... lcd_rw_tris(); 612 .................... lcd_rw_tris();
613 011D: BCF 09.2 613 0118: BCF 09.2
614 .................... #endif 614 .................... #endif
615 .................... 615 ....................
616 .................... lcd_output_rs(0); 616 .................... lcd_output_rs(0);
617 011E: BCF 03.5 617 0119: BCF 03.5
618 011F: BCF 09.1 618 011A: BCF 09.1
619 0120: BSF 03.5 619 011B: BSF 03.5
620 0121: BCF 09.1 620 011C: BCF 09.1
621 .................... while ( bit_test(lcd_read_byte(),7) ) ; 621 .................... while ( bit_test(lcd_read_byte(),7) ) ;
622 * 622 *
623 0150: MOVF 78,W 623 014B: MOVF 78,W
624 0151: MOVWF 4C 624 014C: MOVWF 4D
625 0152: BTFSS 4C.7 625 014D: BTFSS 4D.7
626 0153: GOTO 156 626 014E: GOTO 151
627 0154: BSF 03.5 627 014F: BSF 03.5
628 0155: GOTO 122 628 0150: GOTO 11D
629 .................... lcd_output_rs(address); 629 .................... lcd_output_rs(address);
630 0156: MOVF 4A,F 630 0151: MOVF 4B,F
631 0157: BTFSS 03.2 631 0152: BTFSS 03.2
632 0158: GOTO 15B 632 0153: GOTO 156
633 0159: BCF 09.1 633 0154: BCF 09.1
634 015A: GOTO 15C 634 0155: GOTO 157
635 015B: BSF 09.1 635 0156: BSF 09.1
-   636 0157: BSF 03.5
-   637 0158: BCF 09.1
-   638 .................... delay_cycles(1);
-   639 0159: NOP
-   640 .................... lcd_output_rw(0);
-   641 015A: BCF 03.5
-   642 015B: BCF 09.2
636 015C: BSF 03.5 643 015C: BSF 03.5
637 015D: BCF 09.1 644 015D: BCF 09.2
638 .................... delay_cycles(1); 645 .................... delay_cycles(1);
639 015E: NOP 646 015E: NOP
640 .................... lcd_output_rw(0); 647 .................... lcd_output_enable(0);
641 015F: BCF 03.5 648 015F: BCF 03.5
642 0160: BCF 09.2 649 0160: BCF 09.0
643 0161: BSF 03.5 650 0161: BSF 03.5
644 0162: BCF 09.2 651 0162: BCF 09.0
645 .................... delay_cycles(1); -  
646 0163: NOP -  
647 .................... lcd_output_enable(0); -  
648 0164: BCF 03.5 -  
649 0165: BCF 09.0 -  
650 0166: BSF 03.5 -  
651 0167: BCF 09.0 -  
652 .................... lcd_send_nibble(n >> 4); 652 .................... lcd_send_nibble(n >> 4);
653 0168: BCF 03.5 653 0163: BCF 03.5
654 0169: SWAPF 4B,W 654 0164: SWAPF 4C,W
655 016A: MOVWF 4C 655 0165: MOVWF 4D
656 016B: MOVLW 0F 656 0166: MOVLW 0F
657 016C: ANDWF 4C,F 657 0167: ANDWF 4D,F
658 016D: MOVF 4C,W 658 0168: MOVF 4D,W
659 016E: MOVWF 4D 659 0169: MOVWF 4E
660 016F: CALL 0BD 660 016A: CALL 0B8
661 .................... lcd_send_nibble(n & 0xf); 661 .................... lcd_send_nibble(n & 0xf);
662 0170: MOVF 4B,W 662 016B: MOVF 4C,W
663 0171: ANDLW 0F 663 016C: ANDLW 0F
664 0172: MOVWF 4C 664 016D: MOVWF 4D
665 0173: MOVWF 4D 665 016E: MOVWF 4E
666 0174: CALL 0BD 666 016F: CALL 0B8
667 .................... } 667 .................... }
668 0175: RETURN 668 0170: RETURN
669 .................... 669 ....................
670 .................... #if defined(LCD_EXTENDED_NEWLINE) 670 .................... #if defined(LCD_EXTENDED_NEWLINE)
671 .................... unsigned int8 g_LcdX, g_LcdY; 671 .................... unsigned int8 g_LcdX, g_LcdY;
672 .................... #endif 672 .................... #endif
673 .................... 673 ....................
Line 678... Line 678...
678 .................... #if defined(__PCB__) 678 .................... #if defined(__PCB__)
679 .................... set_tris_lcd(LCD_OUTPUT_MAP); 679 .................... set_tris_lcd(LCD_OUTPUT_MAP);
680 .................... #else 680 .................... #else
681 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 681 .................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
682 .................... output_drive(LCD_DATA4); 682 .................... output_drive(LCD_DATA4);
683 0176: BSF 03.5 683 0171: BSF 03.5
684 0177: BCF 08.4 684 0172: BCF 08.4
685 .................... output_drive(LCD_DATA5); 685 .................... output_drive(LCD_DATA5);
686 0178: BCF 08.5 686 0173: BCF 08.5
687 .................... output_drive(LCD_DATA6); 687 .................... output_drive(LCD_DATA6);
688 0179: BCF 08.6 688 0174: BCF 08.6
689 .................... output_drive(LCD_DATA7); 689 .................... output_drive(LCD_DATA7);
690 017A: BCF 08.7 690 0175: BCF 08.7
691 .................... #else 691 .................... #else
692 .................... lcdtris.data = 0x0; 692 .................... lcdtris.data = 0x0;
693 .................... #endif 693 .................... #endif
694 .................... lcd_enable_tris(); 694 .................... lcd_enable_tris();
695 017B: BCF 09.0 695 0176: BCF 09.0
696 .................... lcd_rs_tris(); 696 .................... lcd_rs_tris();
697 017C: BCF 09.1 697 0177: BCF 09.1
698 .................... lcd_rw_tris(); 698 .................... lcd_rw_tris();
699 017D: BCF 09.2 699 0178: BCF 09.2
700 .................... #endif 700 .................... #endif
701 .................... 701 ....................
702 .................... lcd_output_rs(0); 702 .................... lcd_output_rs(0);
703 017E: BCF 03.5 703 0179: BCF 03.5
704 017F: BCF 09.1 704 017A: BCF 09.1
705 0180: BSF 03.5 705 017B: BSF 03.5
706 0181: BCF 09.1 706 017C: BCF 09.1
707 .................... lcd_output_rw(0); 707 .................... lcd_output_rw(0);
708 0182: BCF 03.5 708 017D: BCF 03.5
709 0183: BCF 09.2 709 017E: BCF 09.2
710 0184: BSF 03.5 710 017F: BSF 03.5
711 0185: BCF 09.2 711 0180: BCF 09.2
712 .................... lcd_output_enable(0); 712 .................... lcd_output_enable(0);
713 0186: BCF 03.5 713 0181: BCF 03.5
714 0187: BCF 09.0 714 0182: BCF 09.0
715 0188: BSF 03.5 715 0183: BSF 03.5
716 0189: BCF 09.0 716 0184: BCF 09.0
717 .................... 717 ....................
718 .................... delay_ms(15); 718 .................... delay_ms(15);
719 018A: MOVLW 0F 719 0185: MOVLW 0F
720 018B: BCF 03.5 720 0186: BCF 03.5
721 018C: MOVWF 46 721 0187: MOVWF 47
722 018D: CALL 0A9 722 0188: CALL 0A4
723 .................... for(i=1;i<=3;++i) 723 .................... for(i=1;i<=3;++i)
724 018E: MOVLW 01 724 0189: MOVLW 01
725 018F: MOVWF 39 725 018A: MOVWF 3A
726 0190: MOVF 39,W 726 018B: MOVF 3A,W
727 0191: SUBLW 03 727 018C: SUBLW 03
728 0192: BTFSS 03.0 728 018D: BTFSS 03.0
729 0193: GOTO 19C 729 018E: GOTO 197
730 .................... { 730 .................... {
731 .................... lcd_send_nibble(3); 731 .................... lcd_send_nibble(3);
732 0194: MOVLW 03 732 018F: MOVLW 03
733 0195: MOVWF 4D 733 0190: MOVWF 4E
734 0196: CALL 0BD 734 0191: CALL 0B8
735 .................... delay_ms(5); 735 .................... delay_ms(5);
736 0197: MOVLW 05 736 0192: MOVLW 05
737 0198: MOVWF 46 737 0193: MOVWF 47
738 0199: CALL 0A9 738 0194: CALL 0A4
739 .................... } 739 .................... }
740 019A: INCF 39,F 740 0195: INCF 3A,F
741 019B: GOTO 190 741 0196: GOTO 18B
742 .................... 742 ....................
743 .................... lcd_send_nibble(2); 743 .................... lcd_send_nibble(2);
744 019C: MOVLW 02 744 0197: MOVLW 02
745 019D: MOVWF 4D 745 0198: MOVWF 4E
746 019E: CALL 0BD 746 0199: CALL 0B8
747 .................... for(i=0;i<=3;++i) 747 .................... for(i=0;i<=3;++i)
748 019F: CLRF 39 748 019A: CLRF 3A
749 01A0: MOVF 39,W 749 019B: MOVF 3A,W
750 01A1: SUBLW 03 750 019C: SUBLW 03
751 01A2: BTFSS 03.0 751 019D: BTFSS 03.0
752 01A3: GOTO 1AD 752 019E: GOTO 1A8
753 .................... lcd_send_byte(0,LCD_INIT_STRING[i]); 753 .................... lcd_send_byte(0,LCD_INIT_STRING[i]);
754 01A4: MOVF 39,W 754 019F: MOVF 3A,W
755 01A5: CALL 038 755 01A0: CALL 038
756 01A6: MOVWF 3A 756 01A1: MOVWF 3B
757 01A7: CLRF 4A 757 01A2: CLRF 4B
758 01A8: MOVF 3A,W 758 01A3: MOVF 3B,W
759 01A9: MOVWF 4B 759 01A4: MOVWF 4C
760 01AA: CALL 11A 760 01A5: CALL 115
761 .................... 761 ....................
762 .................... #if defined(LCD_EXTENDED_NEWLINE) 762 .................... #if defined(LCD_EXTENDED_NEWLINE)
763 01AB: INCF 39,F 763 01A6: INCF 3A,F
764 01AC: GOTO 1A0 764 01A7: GOTO 19B
765 .................... g_LcdX = 0; 765 .................... g_LcdX = 0;
766 .................... g_LcdY = 0; 766 .................... g_LcdY = 0;
767 .................... #endif 767 .................... #endif
768 .................... } 768 .................... }
769 01AD: BSF 0A.3 769 01A8: BSF 0A.3
770 01AE: BCF 0A.4 770 01A9: BCF 0A.4
771 01AF: GOTO 0B3 (RETURN) 771 01AA: GOTO 0BA (RETURN)
772 .................... 772 ....................
773 .................... void lcd_gotoxy(BYTE x, BYTE y) 773 .................... void lcd_gotoxy(BYTE x, BYTE y)
774 .................... { 774 .................... {
775 .................... BYTE address; 775 .................... BYTE address;
776 .................... 776 ....................
777 .................... if(y!=1) 777 .................... if(y!=1)
778 01B0: DECFSZ 47,W 778 01AB: DECFSZ 48,W
779 01B1: GOTO 1B3 779 01AC: GOTO 1AE
780 01B2: GOTO 1B6 780 01AD: GOTO 1B1
781 .................... address=LCD_LINE_TWO; 781 .................... address=LCD_LINE_TWO;
782 01B3: MOVLW 40 782 01AE: MOVLW 40
783 01B4: MOVWF 48 783 01AF: MOVWF 49
784 .................... else 784 .................... else
785 01B5: GOTO 1B7 785 01B0: GOTO 1B2
786 .................... address=0; 786 .................... address=0;
787 01B6: CLRF 48 787 01B1: CLRF 49
788 .................... 788 ....................
789 .................... address+=x-1; 789 .................... address+=x-1;
790 01B7: MOVLW 01 790 01B2: MOVLW 01
791 01B8: SUBWF 46,W 791 01B3: SUBWF 47,W
792 01B9: ADDWF 48,F 792 01B4: ADDWF 49,F
793 .................... lcd_send_byte(0,0x80|address); 793 .................... lcd_send_byte(0,0x80|address);
794 01BA: MOVF 48,W 794 01B5: MOVF 49,W
795 01BB: IORLW 80 795 01B6: IORLW 80
796 01BC: MOVWF 49 796 01B7: MOVWF 4A
797 01BD: CLRF 4A 797 01B8: CLRF 4B
798 01BE: MOVF 49,W 798 01B9: MOVF 4A,W
799 01BF: MOVWF 4B 799 01BA: MOVWF 4C
800 01C0: CALL 11A 800 01BB: CALL 115
801 .................... 801 ....................
802 .................... #if defined(LCD_EXTENDED_NEWLINE) 802 .................... #if defined(LCD_EXTENDED_NEWLINE)
803 .................... g_LcdX = x - 1; 803 .................... g_LcdX = x - 1;
804 .................... g_LcdY = y - 1; 804 .................... g_LcdY = y - 1;
805 .................... #endif 805 .................... #endif
806 .................... } 806 .................... }
807 01C1: RETURN 807 01BC: RETURN
808 .................... 808 ....................
809 .................... void lcd_putc(char c) 809 .................... void lcd_putc(char c)
810 .................... { 810 .................... {
811 .................... switch (c) 811 .................... switch (c)
812 .................... { 812 .................... {
813 01C2: MOVF 45,W 813 01BD: MOVF 46,W
814 01C3: XORLW 07 814 01BE: XORLW 07
815 01C4: BTFSC 03.2 815 01BF: BTFSC 03.2
816 01C5: GOTO 1D0 816 01C0: GOTO 1CB
817 01C6: XORLW 0B 817 01C1: XORLW 0B
818 01C7: BTFSC 03.2 818 01C2: BTFSC 03.2
819 01C8: GOTO 1D5 819 01C3: GOTO 1D0
820 01C9: XORLW 06 820 01C4: XORLW 06
821 01CA: BTFSC 03.2 821 01C5: BTFSC 03.2
822 01CB: GOTO 1DD 822 01C6: GOTO 1D8
823 01CC: XORLW 02 823 01C7: XORLW 02
824 01CD: BTFSC 03.2 824 01C8: BTFSC 03.2
825 01CE: GOTO 1E3 825 01C9: GOTO 1DE
826 01CF: GOTO 1E8 826 01CA: GOTO 1E3
827 .................... case '\a' : lcd_gotoxy(1,1); break; 827 .................... case '\a' : lcd_gotoxy(1,1); break;
828 01D0: MOVLW 01 828 01CB: MOVLW 01
829 01D1: MOVWF 46 829 01CC: MOVWF 47
830 01D2: MOVWF 47 830 01CD: MOVWF 48
831 01D3: CALL 1B0 831 01CE: CALL 1AB
832 01D4: GOTO 1EE 832 01CF: GOTO 1E9
833 .................... 833 ....................
834 .................... case '\f' : lcd_send_byte(0,1); 834 .................... case '\f' : lcd_send_byte(0,1);
835 01D5: CLRF 4A 835 01D0: CLRF 4B
836 01D6: MOVLW 01 836 01D1: MOVLW 01
837 01D7: MOVWF 4B 837 01D2: MOVWF 4C
838 01D8: CALL 11A 838 01D3: CALL 115
839 .................... delay_ms(2); 839 .................... delay_ms(2);
840 01D9: MOVLW 02 840 01D4: MOVLW 02
841 01DA: MOVWF 46 841 01D5: MOVWF 47
842 01DB: CALL 0A9 842 01D6: CALL 0A4
843 .................... #if defined(LCD_EXTENDED_NEWLINE) 843 .................... #if defined(LCD_EXTENDED_NEWLINE)
844 .................... g_LcdX = 0; 844 .................... g_LcdX = 0;
845 .................... g_LcdY = 0; 845 .................... g_LcdY = 0;
846 .................... #endif 846 .................... #endif
847 .................... break; 847 .................... break;
848 01DC: GOTO 1EE 848 01D7: GOTO 1E9
849 .................... 849 ....................
850 .................... #if defined(LCD_EXTENDED_NEWLINE) 850 .................... #if defined(LCD_EXTENDED_NEWLINE)
851 .................... case '\r' : lcd_gotoxy(1, g_LcdY+1); break; 851 .................... case '\r' : lcd_gotoxy(1, g_LcdY+1); break;
852 .................... case '\n' : 852 .................... case '\n' :
853 .................... while (g_LcdX++ < LCD_LINE_LENGTH) 853 .................... while (g_LcdX++ < LCD_LINE_LENGTH)
Line 856... Line 856...
856 .................... } 856 .................... }
857 .................... lcd_gotoxy(1, g_LcdY+2); 857 .................... lcd_gotoxy(1, g_LcdY+2);
858 .................... break; 858 .................... break;
859 .................... #else 859 .................... #else
860 .................... case '\n' : lcd_gotoxy(1,2); break; 860 .................... case '\n' : lcd_gotoxy(1,2); break;
861 01DD: MOVLW 01 861 01D8: MOVLW 01
862 01DE: MOVWF 46 862 01D9: MOVWF 47
863 01DF: MOVLW 02 863 01DA: MOVLW 02
864 01E0: MOVWF 47 864 01DB: MOVWF 48
865 01E1: CALL 1B0 865 01DC: CALL 1AB
866 01E2: GOTO 1EE 866 01DD: GOTO 1E9
867 .................... #endif 867 .................... #endif
868 .................... 868 ....................
869 .................... case '\b' : lcd_send_byte(0,0x10); break; 869 .................... case '\b' : lcd_send_byte(0,0x10); break;
870 01E3: CLRF 4A 870 01DE: CLRF 4B
871 01E4: MOVLW 10 871 01DF: MOVLW 10
872 01E5: MOVWF 4B 872 01E0: MOVWF 4C
873 01E6: CALL 11A 873 01E1: CALL 115
874 01E7: GOTO 1EE 874 01E2: GOTO 1E9
875 .................... 875 ....................
876 .................... #if defined(LCD_EXTENDED_NEWLINE) 876 .................... #if defined(LCD_EXTENDED_NEWLINE)
877 .................... default : 877 .................... default :
878 .................... if (g_LcdX < LCD_LINE_LENGTH) 878 .................... if (g_LcdX < LCD_LINE_LENGTH)
879 .................... { 879 .................... {
Line 881... Line 881...
881 .................... g_LcdX++; 881 .................... g_LcdX++;
882 .................... } 882 .................... }
883 .................... break; 883 .................... break;
884 .................... #else 884 .................... #else
885 .................... default : lcd_send_byte(1,c); break; 885 .................... default : lcd_send_byte(1,c); break;
886 01E8: MOVLW 01 886 01E3: MOVLW 01
887 01E9: MOVWF 4A 887 01E4: MOVWF 4B
888 01EA: MOVF 45,W 888 01E5: MOVF 46,W
889 01EB: MOVWF 4B 889 01E6: MOVWF 4C
890 01EC: CALL 11A 890 01E7: CALL 115
891 01ED: GOTO 1EE 891 01E8: GOTO 1E9
892 .................... #endif 892 .................... #endif
893 .................... } 893 .................... }
894 .................... } 894 .................... }
895 01EE: RETURN 895 01E9: RETURN
896 .................... 896 ....................
897 .................... char lcd_getc(BYTE x, BYTE y) 897 .................... char lcd_getc(BYTE x, BYTE y)
898 .................... { 898 .................... {
899 .................... char value; 899 .................... char value;
900 .................... 900 ....................
Line 959... Line 959...
959 .................... { 959 .................... {
960 .................... unsigned int i; 960 .................... unsigned int i;
961 .................... 961 ....................
962 .................... for(i=0;i<=lenght;i++) 962 .................... for(i=0;i<=lenght;i++)
963 * 963 *
964 060D: CLRF 3C 964 0654: CLRF 3D
965 060E: MOVF 3C,W 965 0655: MOVF 3D,W
966 060F: SUBWF 39,W 966 0656: SUBWF 3A,W
967 0610: BTFSS 03.0 967 0657: BTFSS 03.0
968 0611: GOTO 655 968 0658: GOTO 69C
969 .................... { 969 .................... {
970 .................... output_toggle(BEEP); 970 .................... output_toggle(BEEP);
971 0612: BSF 03.5 971 0659: BSF 03.5
972 0613: BCF 08.2 972 065A: BCF 08.2
973 0614: MOVLW 04 973 065B: MOVLW 04
974 0615: BCF 03.5 974 065C: BCF 03.5
975 0616: XORWF 08,F 975 065D: XORWF 08,F
976 .................... delay_us(1/frequency); 976 .................... delay_us(1/frequency);
977 0617: CLRF 3E 977 065E: CLRF 3F
978 0618: MOVLW 01 978 065F: MOVLW 01
979 0619: MOVWF 3D 979 0660: MOVWF 3E
980 061A: MOVF 3B,W 980 0661: MOVF 3C,W
981 061B: MOVWF 40 981 0662: MOVWF 41
982 061C: MOVF 3A,W 982 0663: MOVF 3B,W
983 061D: MOVWF 3F 983 0664: MOVWF 40
984 * 984 *
985 0642: MOVF 79,W 985 0689: MOVF 79,W
986 0643: MOVWF 3E 986 068A: MOVWF 3F
987 0644: MOVF 78,W 987 068B: MOVF 78,W
988 0645: MOVWF 3D 988 068C: MOVWF 3E
989 0646: MOVF 3E,W 989 068D: MOVF 3F,W
990 0647: MOVWF 3F 990 068E: MOVWF 40
991 0648: INCF 3F,F 991 068F: INCF 40,F
992 0649: DECF 3F,F 992 0690: DECF 40,F
993 064A: BTFSC 03.2 993 0691: BTFSC 03.2
994 064B: GOTO 650 994 0692: GOTO 697
995 064C: MOVLW FF 995 0693: MOVLW FF
996 064D: MOVWF 40 996 0694: MOVWF 41
997 064E: CALL 5FC 997 0695: CALL 643
998 064F: GOTO 649 998 0696: GOTO 690
999 0650: MOVF 3D,W 999 0697: MOVF 3E,W
1000 0651: MOVWF 40 1000 0698: MOVWF 41
1001 0652: CALL 5FC 1001 0699: CALL 643
1002 .................... } 1002 .................... }
1003 0653: INCF 3C,F 1003 069A: INCF 3D,F
1004 0654: GOTO 60E 1004 069B: GOTO 655
1005 .................... } 1005 .................... }
1006 0655: RETURN 1006 069C: RETURN
-   1007 ....................
-   1008 .................... #define TRESHOLD_setup 1
-   1009 .................... #define INTERVAL_setup 0
-   1010 ....................
1007 .................... 1011 ....................
1008 .................... void main() 1012 .................... void main()
1009 .................... { 1013 .................... {
1010 * 1014 *
1011 0800: CLRF 04 1015 0800: CLRF 04
Line 1044... Line 1048...
1044 0821: CLRF 09 1048 0821: CLRF 09
1045 * 1049 *
1046 0825: CLRF 31 1050 0825: CLRF 31
1047 0826: MOVLW 3C 1051 0826: MOVLW 3C
1048 0827: MOVWF 30 1052 0827: MOVWF 30
-   1053 0828: BCF 36.1
1049 0828: CLRF 38 1054 0829: CLRF 38
1050 0829: CLRF 37 1055 082A: CLRF 37
-   1056 082B: MOVLW 06
-   1057 082C: MOVWF 39
1051 .................... unsigned int16 integration_time=60; 1058 .................... unsigned int16 integration_time=60;
1052 .................... unsigned int16 time; 1059 .................... unsigned int16 time;
1053 .................... unsigned int16 last_timer; // promena pro praskani 1060 .................... unsigned int16 last_timer; // promena pro praskani
1054 .................... unsigned int1 button_press,voltage_setup,time_setup; // semafor pro cteni tlacitek 1061 .................... unsigned int1 button_press,setup_mode=INTERVAL_setup; // semafor pro cteni tlacitek
1055 .................... unsigned int16 measurement_number=0; 1062 .................... unsigned int16 measurement_number=0;
-   1063 .................... unsigned int8 treshold=6;
1056 .................... 1064 ....................
1057 .................... setup_adc_ports(sAN0|VSS_VDD); 1065 .................... setup_adc_ports(sAN0|VSS_VDD);
1058 082A: BSF 03.5 1066 082D: BSF 03.5
1059 082B: BSF 03.6 1067 082E: BSF 03.6
1060 082C: MOVF 09,W 1068 082F: MOVF 09,W
1061 082D: ANDLW C0 1069 0830: ANDLW C0
1062 082E: MOVWF 09 1070 0831: MOVWF 09
1063 082F: BCF 03.6 1071 0832: BCF 03.6
1064 0830: BCF 1F.4 1072 0833: BCF 1F.4
1065 0831: BCF 1F.5 1073 0834: BCF 1F.5
1066 0832: MOVLW 01 1074 0835: MOVLW 01
1067 0833: BSF 03.6 1075 0836: BSF 03.6
1068 0834: MOVWF 08 1076 0837: MOVWF 08
1069 .................... setup_adc(ADC_CLOCK_DIV_32); 1077 .................... setup_adc(ADC_CLOCK_DIV_32);
1070 0835: BCF 03.5 1078 0838: BCF 03.5
1071 0836: BCF 03.6 1079 0839: BCF 03.6
1072 0837: BCF 1F.6 1080 083A: BCF 1F.6
1073 0838: BSF 1F.7 1081 083B: BSF 1F.7
1074 0839: BSF 03.5 1082 083C: BSF 03.5
1075 083A: BSF 1F.7 1083 083D: BSF 1F.7
1076 083B: BCF 03.5 1084 083E: BCF 03.5
1077 083C: BSF 1F.0 1085 083F: BSF 1F.0
1078 .................... setup_spi(SPI_SS_DISABLED); 1086 .................... setup_spi(SPI_SS_DISABLED);
1079 083D: BCF 14.5 1087 0840: BCF 14.5
1080 083E: BCF 2F.5 1088 0841: BCF 2F.5
1081 083F: MOVF 2F,W 1089 0842: MOVF 2F,W
1082 0840: BSF 03.5 1090 0843: BSF 03.5
1083 0841: MOVWF 07 1091 0844: MOVWF 07
1084 0842: BCF 03.5 1092 0845: BCF 03.5
1085 0843: BSF 2F.4 1093 0846: BSF 2F.4
1086 0844: MOVF 2F,W 1094 0847: MOVF 2F,W
1087 0845: BSF 03.5 1095 0848: BSF 03.5
1088 0846: MOVWF 07 1096 0849: MOVWF 07
1089 0847: BCF 03.5 1097 084A: BCF 03.5
1090 0848: BCF 2F.3 1098 084B: BCF 2F.3
1091 0849: MOVF 2F,W 1099 084C: MOVF 2F,W
1092 084A: BSF 03.5 1100 084D: BSF 03.5
1093 084B: MOVWF 07 1101 084E: MOVWF 07
1094 084C: MOVLW 01 -  
1095 084D: BCF 03.5 -  
1096 084E: MOVWF 14 -  
1097 084F: MOVLW 00 1102 084F: MOVLW 01
1098 0850: BSF 03.5 1103 0850: BCF 03.5
1099 0851: MOVWF 14 1104 0851: MOVWF 14
-   1105 0852: MOVLW 00
-   1106 0853: BSF 03.5
-   1107 0854: MOVWF 14
1100 .................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_256); 1108 .................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_256);
1101 0852: MOVF 01,W 1109 0855: MOVF 01,W
1102 0853: ANDLW C0 1110 0856: ANDLW C0
1103 0854: IORLW 07 1111 0857: IORLW 07
1104 0855: MOVWF 01 1112 0858: MOVWF 01
1105 .................... setup_timer_1(T1_EXTERNAL|T1_DIV_BY_1); 1113 .................... setup_timer_1(T1_EXTERNAL|T1_DIV_BY_1);
1106 0856: MOVLW 07 1114 0859: MOVLW 07
1107 0857: BCF 03.5 1115 085A: BCF 03.5
1108 0858: MOVWF 10 1116 085B: MOVWF 10
1109 .................... setup_timer_2(T2_DISABLED,0,1); 1117 .................... setup_timer_2(T2_DISABLED,0,1);
1110 0859: MOVLW 00 -  
1111 085A: MOVWF 78 -  
1112 085B: MOVWF 12 -  
1113 085C: MOVLW 00 1118 085C: MOVLW 00
1114 085D: BSF 03.5 1119 085D: MOVWF 78
1115 085E: MOVWF 12 1120 085E: MOVWF 12
-   1121 085F: MOVLW 00
-   1122 0860: BSF 03.5
-   1123 0861: MOVWF 12
1116 .................... setup_ccp1(CCP_PWM); 1124 .................... setup_ccp1(CCP_PWM);
1117 085F: BCF 03.5 1125 0862: BCF 03.5
1118 0860: BCF 2F.2 1126 0863: BCF 2F.2
1119 0861: MOVF 2F,W 1127 0864: MOVF 2F,W
1120 0862: BSF 03.5 1128 0865: BSF 03.5
1121 0863: MOVWF 07 1129 0866: MOVWF 07
1122 0864: BCF 03.5 1130 0867: BCF 03.5
1123 0865: BCF 07.2 1131 0868: BCF 07.2
1124 0866: BSF 03.5 1132 0869: BSF 03.5
1125 0867: BCF 09.6 1133 086A: BCF 09.6
1126 0868: MOVLW 0C 1134 086B: MOVLW 0C
1127 0869: BCF 03.5 1135 086C: BCF 03.5
1128 086A: MOVWF 17 1136 086D: MOVWF 17
1129 086B: BSF 03.5 1137 086E: BSF 03.5
1130 086C: CLRF 1B 1138 086F: CLRF 1B
1131 086D: CLRF 1C 1139 0870: CLRF 1C
1132 086E: MOVLW 01 1140 0871: MOVLW 01
1133 086F: MOVWF 1D 1141 0872: MOVWF 1D
1134 .................... setup_ccp2(CCP_PWM); 1142 .................... setup_ccp2(CCP_PWM);
1135 0870: BCF 03.5 1143 0873: BCF 03.5
1136 0871: BCF 2F.1 1144 0874: BCF 2F.1
1137 0872: MOVF 2F,W 1145 0875: MOVF 2F,W
1138 0873: BSF 03.5 1146 0876: BSF 03.5
1139 0874: MOVWF 07 1147 0877: MOVWF 07
1140 0875: BCF 03.5 1148 0878: BCF 03.5
1141 0876: BCF 07.1 1149 0879: BCF 07.1
1142 0877: MOVLW 0C 1150 087A: MOVLW 0C
1143 0878: MOVWF 1D 1151 087B: MOVWF 1D
1144 0879: MOVLW 01 1152 087C: MOVLW 01
1145 087A: MOVWF 00 1153 087D: MOVWF 00
1146 .................... setup_oscillator(OSC_8MHZ); 1154 .................... setup_oscillator(OSC_8MHZ);
1147 087B: MOVLW 71 1155 087E: MOVLW 71
1148 087C: BSF 03.5 1156 087F: BSF 03.5
1149 087D: MOVWF 0F 1157 0880: MOVWF 0F
1150 087E: MOVF 0F,W 1158 0881: MOVF 0F,W
1151 .................... 1159 ....................
1152 .................... set_pwm1_duty(0); 1160 .................... set_pwm1_duty(0);
1153 087F: BCF 03.5 1161 0882: BCF 03.5
1154 0880: CLRF 15 1162 0883: CLRF 15
1155 .................... set_pwm2_duty(0); 1163 .................... set_pwm2_duty(0);
1156 0881: CLRF 1B 1164 0884: CLRF 1B
1157 .................... 1165 ....................
1158 .................... output_high(LED1); 1166 .................... output_high(LED1);
1159 0882: BCF 2F.6 1167 0885: BCF 2F.6
1160 0883: MOVF 2F,W 1168 0886: MOVF 2F,W
1161 0884: BSF 03.5 1169 0887: BSF 03.5
1162 0885: MOVWF 07 1170 0888: MOVWF 07
1163 0886: BCF 03.5 1171 0889: BCF 03.5
1164 0887: BSF 07.6 1172 088A: BSF 07.6
1165 .................... output_high(LED2); 1173 .................... output_high(LED2);
1166 0888: BCF 2F.5 1174 088B: BCF 2F.5
1167 0889: MOVF 2F,W 1175 088C: MOVF 2F,W
1168 088A: BSF 03.5 1176 088D: BSF 03.5
1169 088B: MOVWF 07 1177 088E: MOVWF 07
1170 088C: BCF 03.5 1178 088F: BCF 03.5
1171 088D: BSF 07.5 1179 0890: BSF 07.5
1172 .................... output_high(LED3); 1180 .................... output_high(LED3);
1173 088E: BCF 2F.4 1181 0891: BCF 2F.4
1174 088F: MOVF 2F,W 1182 0892: MOVF 2F,W
1175 0890: BSF 03.5 1183 0893: BSF 03.5
1176 0891: MOVWF 07 1184 0894: MOVWF 07
1177 0892: BCF 03.5 1185 0895: BCF 03.5
1178 0893: BSF 07.4 1186 0896: BSF 07.4
1179 .................... output_high(LED4); 1187 .................... output_high(LED4);
1180 0894: BSF 03.5 1188 0897: BSF 03.5
1181 0895: BCF 08.3 1189 0898: BCF 08.3
1182 0896: BCF 03.5 1190 0899: BCF 03.5
1183 0897: BSF 08.3 1191 089A: BSF 08.3
1184 .................... output_low(BEEP); 1192 .................... output_low(BEEP);
1185 0898: BSF 03.5 1193 089B: BSF 03.5
1186 0899: BCF 08.2 1194 089C: BCF 08.2
1187 089A: BCF 03.5 1195 089D: BCF 03.5
1188 089B: BCF 08.2 1196 089E: BCF 08.2
1189 .................... 1197 ....................
1190 .................... setup_comparator(CP2_A0_VREF|CP2_OUT_ON_A5); // sets two comparators(A1 and VR and A2 as the output) 1198 .................... setup_comparator(CP2_A0_VREF|CP2_OUT_ON_A5); // sets two comparators(A1 and VR and A2 as the output)
1191 089C: BSF 03.6 1199 089F: BSF 03.6
1192 089D: CLRF 07 1200 08A0: CLRF 07
1193 089E: MOVLW A4 1201 08A1: MOVLW A4
1194 089F: MOVWF 08 1202 08A2: MOVWF 08
1195 08A0: MOVLW 10 1203 08A3: MOVLW 10
1196 08A1: MOVWF 09 1204 08A4: MOVWF 09
1197 08A2: BSF 03.5 1205 08A5: BSF 03.5
1198 08A3: BCF 03.6 1206 08A6: BCF 03.6
1199 08A4: BCF 05.5 1207 08A7: BCF 05.5
1200 08A5: BSF 05.0 1208 08A8: BSF 05.0
1201 .................... setup_vref(VREF_HIGH|6); //sets 3.6(vdd *value/32 +vdd/4) if vdd is 5.0V 1209 .................... setup_vref(VREF_HIGH|treshold); //sets 3.6(vdd *value/32 +vdd/4) if vdd is 5.0V
-   1210 08A9: BCF 03.5
-   1211 08AA: MOVF 39,W
1202 08A6: MOVLW 86 1212 08AB: IORLW 80
-   1213 08AC: MOVWF 3A
-   1214 08AD: BSF 03.5
1203 08A7: MOVWF 17 1215 08AE: MOVWF 17
1204 .................... enable_interrupts(INT_COMP); //enables the comparator interrupt 1216 .................... enable_interrupts(INT_COMP); //enables the comparator interrupt
1205 08A8: BSF 0D.5 1217 08AF: BSF 0D.5
1206 .................... enable_interrupts(INT_RTCC); 1218 .................... enable_interrupts(INT_RTCC);
1207 08A9: BCF 03.5 1219 08B0: BCF 03.5
1208 08AA: BSF 0B.5 1220 08B1: BSF 0B.5
1209 .................... enable_interrupts(INT_TIMER1); 1221 .................... enable_interrupts(INT_TIMER1);
1210 08AB: BSF 03.5 1222 08B2: BSF 03.5
1211 08AC: BSF 0C.0 1223 08B3: BSF 0C.0
1212 .................... enable_interrupts(INT_TIMER2); 1224 .................... enable_interrupts(INT_TIMER2);
1213 08AD: BSF 0C.1 1225 08B4: BSF 0C.1
1214 .................... enable_interrupts(GLOBAL); 1226 .................... enable_interrupts(GLOBAL);
1215 08AE: MOVLW C0 1227 08B5: MOVLW C0
1216 08AF: BCF 03.5 1228 08B6: BCF 03.5
1217 08B0: IORWF 0B,F 1229 08B7: IORWF 0B,F
1218 .................... lcd_init(); 1230 .................... lcd_init();
1219 08B1: BCF 0A.3 1231 08B8: BCF 0A.3
1220 08B2: GOTO 176 1232 08B9: GOTO 171
1221 08B3: BSF 0A.3 1233 08BA: BSF 0A.3
1222 .................... 1234 ....................
1223 .................... lcd_putc("\fGM counter V1.0 \n 2013 MLAB"); 1235 .................... lcd_putc("\fGM counter V1.0 \n 2013 MLAB");
1224 08B4: MOVLW 5A 1236 08BB: MOVLW 5A
1225 08B5: BSF 03.6 1237 08BC: BSF 03.6
1226 08B6: MOVWF 0D 1238 08BD: MOVWF 0D
1227 08B7: MOVLW 00 1239 08BE: MOVLW 00
1228 08B8: MOVWF 0F 1240 08BF: MOVWF 0F
1229 08B9: BCF 0A.3 1241 08C0: BCF 0A.3
1230 08BA: BCF 03.6 1242 08C1: BCF 03.6
1231 08BB: CALL 1EF 1243 08C2: CALL 1EA
1232 08BC: BSF 0A.3 1244 08C3: BSF 0A.3
1233 .................... printf("Geiger-Muller Counter V1.0 \r\n"); 1245 .................... printf("Geiger-Muller Counter V1.0 \r\n");
1234 08BD: MOVLW 6A 1246 08C4: MOVLW 6A
1235 08BE: BSF 03.6 1247 08C5: BSF 03.6
1236 08BF: MOVWF 0D 1248 08C6: MOVWF 0D
1237 08C0: MOVLW 00 1249 08C7: MOVLW 00
1238 08C1: MOVWF 0F 1250 08C8: MOVWF 0F
1239 08C2: BCF 0A.3 1251 08C9: BCF 0A.3
1240 08C3: BCF 03.6 1252 08CA: BCF 03.6
1241 08C4: CALL 257 1253 08CB: CALL 252
1242 08C5: BSF 0A.3 1254 08CC: BSF 0A.3
1243 .................... printf("(c) 2013 MLAB and UST.cz \r\n"); 1255 .................... printf("(c) 2013 MLAB and UST.cz \r\n");
1244 08C6: MOVLW 79 1256 08CD: MOVLW 79
1245 08C7: BSF 03.6 1257 08CE: BSF 03.6
1246 08C8: MOVWF 0D 1258 08CF: MOVWF 0D
1247 08C9: MOVLW 00 1259 08D0: MOVLW 00
1248 08CA: MOVWF 0F 1260 08D1: MOVWF 0F
1249 08CB: BCF 0A.3 1261 08D2: BCF 0A.3
1250 08CC: BCF 03.6 -  
1251 08CD: CALL 257 -  
1252 08CE: BSF 0A.3 -  
1253 .................... Delay_ms(1000); -  
1254 08CF: MOVLW 04 -  
1255 08D0: MOVWF 39 -  
1256 08D1: MOVLW FA -  
1257 08D2: MOVWF 46 -  
1258 08D3: BCF 0A.3 1262 08D3: BCF 03.6
1259 08D4: CALL 0A9 1263 08D4: CALL 252
1260 08D5: BSF 0A.3 1264 08D5: BSF 0A.3
-   1265 .................... Delay_ms(1000);
-   1266 08D6: MOVLW 04
-   1267 08D7: MOVWF 3A
-   1268 08D8: MOVLW FA
-   1269 08D9: MOVWF 47
-   1270 08DA: BCF 0A.3
-   1271 08DB: CALL 0A4
-   1272 08DC: BSF 0A.3
1261 08D6: DECFSZ 39,F 1273 08DD: DECFSZ 3A,F
1262 08D7: GOTO 0D1 1274 08DE: GOTO 0D8
1263 .................... 1275 ....................
1264 .................... lcd_putc("\f"); 1276 .................... lcd_putc("\f");
1265 08D8: MOVLW 87 1277 08DF: MOVLW 87
1266 08D9: BSF 03.6 1278 08E0: BSF 03.6
1267 08DA: MOVWF 0D 1279 08E1: MOVWF 0D
1268 08DB: MOVLW 00 1280 08E2: MOVLW 00
1269 08DC: MOVWF 0F 1281 08E3: MOVWF 0F
1270 08DD: BCF 0A.3 1282 08E4: BCF 0A.3
1271 08DE: BCF 03.6 1283 08E5: BCF 03.6
1272 08DF: CALL 1EF 1284 08E6: CALL 1EA
1273 08E0: BSF 0A.3 1285 08E7: BSF 0A.3
1274 .................... printf("\r\n"); 1286 .................... printf("\r\n");
1275 08E1: MOVLW 0D 1287 08E8: MOVLW 0D
1276 08E2: MOVWF 45 1288 08E9: MOVWF 46
1277 08E3: BCF 0A.3 1289 08EA: BCF 0A.3
1278 08E4: CALL 235 1290 08EB: CALL 230
1279 08E5: BSF 0A.3 1291 08EC: BSF 0A.3
1280 08E6: MOVLW 0A 1292 08ED: MOVLW 0A
1281 08E7: MOVWF 45 1293 08EE: MOVWF 46
1282 08E8: BCF 0A.3 1294 08EF: BCF 0A.3
1283 08E9: CALL 235 1295 08F0: CALL 230
1284 08EA: BSF 0A.3 1296 08F1: BSF 0A.3
1285 .................... 1297 ....................
1286 .................... set_timer1(0); 1298 .................... set_timer1(0);
1287 08EB: CLRF 0F 1299 08F2: CLRF 0F
1288 08EC: CLRF 0E 1300 08F3: CLRF 0E
1289 .................... 1301 ....................
1290 .................... lcd_gotoxy(1,1); // vypsani hodnoty count, abz byla na LCD hned od zapnuti 1302 .................... lcd_gotoxy(1,1); // vypsani hodnoty count, abz byla na LCD hned od zapnuti
1291 08ED: MOVLW 01 1303 08F4: MOVLW 01
1292 08EE: MOVWF 46 1304 08F5: MOVWF 47
1293 08EF: MOVWF 47 1305 08F6: MOVWF 48
1294 08F0: BCF 0A.3 1306 08F7: BCF 0A.3
1295 08F1: CALL 1B0 1307 08F8: CALL 1AB
1296 08F2: BSF 0A.3 1308 08F9: BSF 0A.3
1297 .................... printf(lcd_putc,"Count:%lu ",pulse_count); 1309 .................... printf(lcd_putc,"Count:%lu ",pulse_count);
1298 08F3: MOVLW 88 1310 08FA: MOVLW 88
1299 08F4: BSF 03.6 1311 08FB: BSF 03.6
1300 08F5: MOVWF 0D 1312 08FC: MOVWF 0D
1301 08F6: MOVLW 00 1313 08FD: MOVLW 00
1302 08F7: MOVWF 0F 1314 08FE: MOVWF 0F
1303 08F8: BCF 03.0 1315 08FF: BCF 03.0
1304 08F9: MOVLW 06 1316 0900: MOVLW 06
1305 08FA: BCF 03.6 1317 0901: BCF 03.6
1306 08FB: MOVWF 39 1318 0902: MOVWF 3A
1307 08FC: BCF 0A.3 1319 0903: BCF 0A.3
1308 08FD: CALL 29D 1320 0904: CALL 298
1309 08FE: BSF 0A.3 1321 0905: BSF 0A.3
1310 08FF: MOVLW 41 1322 0906: MOVLW 41
1311 0900: MOVWF 04 1323 0907: MOVWF 04
1312 0901: MOVF 2A,W 1324 0908: MOVF 2A,W
1313 0902: MOVWF 3C 1325 0909: MOVWF 3D
1314 0903: MOVF 29,W 1326 090A: MOVF 29,W
1315 0904: MOVWF 3B 1327 090B: MOVWF 3C
1316 0905: MOVF 28,W 1328 090C: MOVF 28,W
1317 0906: MOVWF 3A 1329 090D: MOVWF 3B
1318 0907: MOVF 27,W 1330 090E: MOVF 27,W
1319 0908: MOVWF 39 1331 090F: MOVWF 3A
1320 0909: BCF 0A.3 1332 0910: BCF 0A.3
1321 090A: CALL 32E 1333 0911: CALL 329
1322 090B: BSF 0A.3 1334 0912: BSF 0A.3
1323 090C: MOVLW 8C 1335 0913: MOVLW 8C
1324 090D: BSF 03.6 1336 0914: BSF 03.6
1325 090E: MOVWF 0D 1337 0915: MOVWF 0D
1326 090F: MOVLW 00 1338 0916: MOVLW 00
1327 0910: MOVWF 0F 1339 0917: MOVWF 0F
1328 0911: BSF 03.0 1340 0918: BSF 03.0
1329 0912: MOVLW 05 1341 0919: MOVLW 05
1330 0913: BCF 03.6 1342 091A: BCF 03.6
1331 0914: MOVWF 39 1343 091B: MOVWF 3A
1332 0915: BCF 0A.3 1344 091C: BCF 0A.3
1333 0916: CALL 29D 1345 091D: CALL 298
1334 0917: BSF 0A.3 1346 091E: BSF 0A.3
1335 .................... 1347 ....................
1336 .................... while(true) 1348 .................... while(true)
1337 .................... { 1349 .................... {
1338 .................... pulse_count = get_timer1() + (0xffff * overflow_count); // compute pulse count 1350 .................... pulse_count = get_timer1() + (0xffff * overflow_count); // compute pulse count
1339 0918: MOVF 0F,W 1351 091F: MOVF 0F,W
1340 0919: MOVWF 7A 1352 0920: MOVWF 7A
1341 091A: MOVF 0E,W 1353 0921: MOVF 0E,W
1342 091B: MOVWF 77 1354 0922: MOVWF 77
1343 091C: MOVF 0F,W 1355 0923: MOVF 0F,W
1344 091D: SUBWF 7A,W 1356 0924: SUBWF 7A,W
1345 091E: BTFSS 03.2 1357 0925: BTFSS 03.2
1346 091F: GOTO 118 1358 0926: GOTO 11F
1347 0920: MOVF 77,W 1359 0927: MOVF 77,W
1348 0921: MOVWF 39 1360 0928: MOVWF 3A
1349 0922: MOVF 7A,W 1361 0929: MOVF 7A,W
1350 0923: MOVWF 3A 1362 092A: MOVWF 3B
1351 0924: MOVLW FF 1363 092B: MOVLW FF
1352 0925: MOVWF 3C 1364 092C: MOVWF 3D
1353 0926: MOVWF 3B 1365 092D: MOVWF 3C
1354 0927: MOVF 2C,W 1366 092E: MOVF 2C,W
1355 0928: MOVWF 3E 1367 092F: MOVWF 3F
1356 0929: MOVF 2B,W 1368 0930: MOVF 2B,W
1357 092A: MOVWF 3D 1369 0931: MOVWF 3E
1358 092B: BCF 0A.3 1370 0932: BCF 0A.3
1359 092C: GOTO 38A 1371 0933: GOTO 385
1360 092D: BSF 0A.3 1372 0934: BSF 0A.3
1361 092E: MOVF 79,W 1373 0935: MOVF 79,W
1362 092F: MOVWF 7A 1374 0936: MOVWF 7A
1363 0930: MOVF 78,W 1375 0937: MOVF 78,W
1364 0931: ADDWF 39,W 1376 0938: ADDWF 3A,W
1365 0932: MOVWF 27 1377 0939: MOVWF 27
1366 0933: MOVF 3A,W 1378 093A: MOVF 3B,W
1367 0934: MOVWF 28 1379 093B: MOVWF 28
1368 0935: MOVF 7A,W 1380 093C: MOVF 7A,W
1369 0936: BTFSC 03.0 1381 093D: BTFSC 03.0
1370 0937: INCFSZ 7A,W 1382 093E: INCFSZ 7A,W
1371 0938: ADDWF 28,F 1383 093F: ADDWF 28,F
1372 0939: CLRF 29 1384 0940: CLRF 29
1373 093A: CLRF 2A 1385 0941: CLRF 2A
1374 .................... time = integration_time + 1 - (time_overflow_count * 0.0327); // compute time interval 1386 .................... time = integration_time + 1 - (time_overflow_count * 0.0327); // compute time interval
1375 093B: MOVLW 01 1387 0942: MOVLW 01
1376 093C: ADDWF 30,W 1388 0943: ADDWF 30,W
1377 093D: MOVWF 39 1389 0944: MOVWF 3A
1378 093E: MOVF 31,W 1390 0945: MOVF 31,W
1379 093F: MOVWF 3A 1391 0946: MOVWF 3B
1380 0940: BTFSC 03.0 1392 0947: BTFSC 03.0
1381 0941: INCF 3A,F 1393 0948: INCF 3B,F
1382 0942: MOVF 2E,W 1394 0949: MOVF 2E,W
1383 0943: MOVWF 40 1395 094A: MOVWF 41
1384 0944: MOVF 2D,W 1396 094B: MOVF 2D,W
1385 0945: MOVWF 3F 1397 094C: MOVWF 40
1386 0946: BCF 0A.3 1398 094D: BCF 0A.3
1387 0947: CALL 3A1 1399 094E: CALL 39C
1388 0948: BSF 0A.3 1400 094F: BSF 0A.3
1389 0949: MOVF 7A,W 1401 0950: MOVF 7A,W
1390 094A: MOVWF 3E 1402 0951: MOVWF 3F
1391 094B: MOVF 79,W 1403 0952: MOVF 79,W
1392 094C: MOVWF 3D 1404 0953: MOVWF 3E
1393 094D: MOVF 78,W 1405 0954: MOVF 78,W
1394 094E: MOVWF 3C 1406 0955: MOVWF 3D
1395 094F: MOVF 77,W 1407 0956: MOVF 77,W
1396 0950: MOVWF 3B 1408 0957: MOVWF 3C
1397 0951: MOVLW 6F 1409 0958: MOVLW 6F
1398 0952: MOVWF 42 1410 0959: MOVWF 43
1399 0953: MOVLW F0 1411 095A: MOVLW F0
1400 0954: MOVWF 41 1412 095B: MOVWF 42
1401 0955: MOVLW 05 1413 095C: MOVLW 05
1402 0956: MOVWF 40 1414 095D: MOVWF 41
1403 0957: MOVLW 7A 1415 095E: MOVLW 7A
1404 0958: MOVWF 3F 1416 095F: MOVWF 40
1405 0959: BCF 0A.3 1417 0960: BCF 0A.3
1406 095A: GOTO 3BE 1418 0961: GOTO 3B9
1407 095B: BSF 0A.3 1419 0962: BSF 0A.3
1408 095C: MOVF 77,W 1420 0963: MOVF 77,W
1409 095D: MOVWF 3B 1421 0964: MOVWF 3C
1410 095E: MOVF 78,W 1422 0965: MOVF 78,W
1411 095F: MOVWF 3C 1423 0966: MOVWF 3D
1412 0960: MOVF 79,W 1424 0967: MOVF 79,W
1413 0961: MOVWF 3D 1425 0968: MOVWF 3E
1414 0962: MOVF 7A,W 1426 0969: MOVF 7A,W
1415 0963: MOVWF 3E 1427 096A: MOVWF 3F
1416 0964: MOVF 3A,W 1428 096B: MOVF 3B,W
1417 0965: MOVWF 40 1429 096C: MOVWF 41
1418 0966: MOVF 39,W 1430 096D: MOVF 3A,W
1419 0967: MOVWF 3F 1431 096E: MOVWF 40
1420 0968: BCF 0A.3 1432 096F: BCF 0A.3
1421 0969: CALL 3A1 1433 0970: CALL 39C
1422 096A: BSF 0A.3 1434 0971: BSF 0A.3
1423 096B: BSF 03.1 1435 0972: BSF 03.1
1424 096C: MOVF 7A,W 1436 0973: MOVF 7A,W
1425 096D: MOVWF 42 1437 0974: MOVWF 43
1426 096E: MOVF 79,W 1438 0975: MOVF 79,W
1427 096F: MOVWF 41 1439 0976: MOVWF 42
1428 0970: MOVF 78,W 1440 0977: MOVF 78,W
1429 0971: MOVWF 40 1441 0978: MOVWF 41
1430 0972: MOVF 77,W 1442 0979: MOVF 77,W
1431 0973: MOVWF 3F 1443 097A: MOVWF 40
1432 0974: MOVF 3E,W 1444 097B: MOVF 3F,W
1433 0975: MOVWF 46 1445 097C: MOVWF 47
1434 0976: MOVF 3D,W 1446 097D: MOVF 3E,W
1435 0977: MOVWF 45 1447 097E: MOVWF 46
1436 0978: MOVF 3C,W 1448 097F: MOVF 3D,W
1437 0979: MOVWF 44 1449 0980: MOVWF 45
1438 097A: MOVF 3B,W 1450 0981: MOVF 3C,W
1439 097B: MOVWF 43 1451 0982: MOVWF 44
1440 097C: BCF 0A.3 1452 0983: BCF 0A.3
1441 097D: GOTO 435 1453 0984: GOTO 430
1442 097E: BSF 0A.3 1454 0985: BSF 0A.3
1443 097F: MOVF 7A,W 1455 0986: MOVF 7A,W
1444 0980: MOVWF 42 1456 0987: MOVWF 43
1445 0981: MOVF 79,W 1457 0988: MOVF 79,W
1446 0982: MOVWF 41 1458 0989: MOVWF 42
1447 0983: MOVF 78,W 1459 098A: MOVF 78,W
1448 0984: MOVWF 40 1460 098B: MOVWF 41
1449 0985: MOVF 77,W 1461 098C: MOVF 77,W
1450 0986: MOVWF 3F 1462 098D: MOVWF 40
1451 0987: BCF 0A.3 1463 098E: BCF 0A.3
1452 0988: GOTO 578 1464 098F: GOTO 573
1453 0989: BSF 0A.3 1465 0990: BSF 0A.3
1454 098A: MOVF 79,W 1466 0991: MOVF 79,W
1455 098B: MOVWF 33 1467 0992: MOVWF 33
1456 098C: MOVF 78,W 1468 0993: MOVF 78,W
1457 098D: MOVWF 32 1469 0994: MOVWF 32
1458 .................... 1470 ....................
1459 .................... if(get_timer1() != last_timer) // timer count increment detection 1471 .................... if(get_timer1() != last_timer) // timer count increment detection
1460 098E: MOVF 0F,W 1472 0995: MOVF 0F,W
1461 098F: MOVWF 7A 1473 0996: MOVWF 7A
1462 0990: MOVF 0E,W 1474 0997: MOVF 0E,W
1463 0991: MOVWF 77 1475 0998: MOVWF 77
1464 0992: MOVF 0F,W 1476 0999: MOVF 0F,W
1465 0993: SUBWF 7A,W 1477 099A: SUBWF 7A,W
1466 0994: BTFSS 03.2 1478 099B: BTFSS 03.2
1467 0995: GOTO 18E 1479 099C: GOTO 195
1468 0996: MOVF 77,W 1480 099D: MOVF 77,W
1469 0997: MOVWF 39 1481 099E: MOVWF 3A
1470 0998: MOVF 7A,W 1482 099F: MOVF 7A,W
1471 0999: MOVWF 3A 1483 09A0: MOVWF 3B
1472 099A: MOVF 34,W 1484 09A1: MOVF 34,W
1473 099B: SUBWF 39,W 1485 09A2: SUBWF 3A,W
1474 099C: BTFSS 03.2 1486 09A3: BTFSS 03.2
1475 099D: GOTO 1A2 1487 09A4: GOTO 1A9
1476 099E: MOVF 35,W 1488 09A5: MOVF 35,W
1477 099F: SUBWF 3A,W 1489 09A6: SUBWF 3B,W
1478 09A0: BTFSC 03.2 1490 09A7: BTFSC 03.2
1479 09A1: GOTO 1EF 1491 09A8: GOTO 1F6
1480 .................... { 1492 .................... {
1481 .................... output_toggle(BEEP); 1493 .................... output_toggle(BEEP);
1482 09A2: BSF 03.5 1494 09A9: BSF 03.5
1483 09A3: BCF 08.2 1495 09AA: BCF 08.2
1484 09A4: MOVLW 04 1496 09AB: MOVLW 04
1485 09A5: BCF 03.5 1497 09AC: BCF 03.5
1486 09A6: XORWF 08,F 1498 09AD: XORWF 08,F
1487 .................... delay_ms(1); 1499 .................... delay_ms(1);
1488 09A7: MOVLW 01 1500 09AE: MOVLW 01
1489 09A8: MOVWF 46 1501 09AF: MOVWF 47
1490 09A9: BCF 0A.3 1502 09B0: BCF 0A.3
1491 09AA: CALL 0A9 1503 09B1: CALL 0A4
1492 09AB: BSF 0A.3 1504 09B2: BSF 0A.3
1493 .................... output_toggle(BEEP); 1505 .................... output_toggle(BEEP);
1494 09AC: BSF 03.5 -  
1495 09AD: BCF 08.2 -  
1496 09AE: MOVLW 04 -  
1497 09AF: BCF 03.5 -  
1498 09B0: XORWF 08,F -  
1499 .................... output_toggle(LED3); -  
1500 09B1: BCF 2F.4 -  
1501 09B2: MOVF 2F,W -  
1502 09B3: BSF 03.5 1506 09B3: BSF 03.5
1503 09B4: MOVWF 07 1507 09B4: BCF 08.2
1504 09B5: MOVLW 10 1508 09B5: MOVLW 04
1505 09B6: BCF 03.5 1509 09B6: BCF 03.5
1506 09B7: XORWF 07,F 1510 09B7: XORWF 08,F
-   1511 .................... output_toggle(LED3);
-   1512 09B8: BCF 2F.4
-   1513 09B9: MOVF 2F,W
-   1514 09BA: BSF 03.5
-   1515 09BB: MOVWF 07
-   1516 09BC: MOVLW 10
-   1517 09BD: BCF 03.5
-   1518 09BE: XORWF 07,F
1507 .................... last_timer=get_timer1(); 1519 .................... last_timer=get_timer1();
1508 09B8: MOVF 0F,W 1520 09BF: MOVF 0F,W
1509 09B9: MOVWF 7A 1521 09C0: MOVWF 7A
1510 09BA: MOVF 0E,W 1522 09C1: MOVF 0E,W
1511 09BB: MOVWF 77 1523 09C2: MOVWF 77
1512 09BC: MOVF 0F,W 1524 09C3: MOVF 0F,W
1513 09BD: SUBWF 7A,W 1525 09C4: SUBWF 7A,W
1514 09BE: BTFSS 03.2 1526 09C5: BTFSS 03.2
1515 09BF: GOTO 1B8 1527 09C6: GOTO 1BF
1516 09C0: MOVF 77,W 1528 09C7: MOVF 77,W
1517 09C1: MOVWF 34 1529 09C8: MOVWF 34
1518 09C2: MOVF 7A,W 1530 09C9: MOVF 7A,W
1519 09C3: MOVWF 35 1531 09CA: MOVWF 35
1520 .................... lcd_gotoxy(1,1); // prepsani dat na displeje 1532 .................... lcd_gotoxy(1,1); // prepsani dat na displeje
1521 09C4: MOVLW 01 1533 09CB: MOVLW 01
1522 09C5: MOVWF 46 1534 09CC: MOVWF 47
1523 09C6: MOVWF 47 1535 09CD: MOVWF 48
1524 09C7: BCF 0A.3 1536 09CE: BCF 0A.3
1525 09C8: CALL 1B0 1537 09CF: CALL 1AB
1526 09C9: BSF 0A.3 1538 09D0: BSF 0A.3
1527 .................... printf(lcd_putc,"Count:%lu ",pulse_count); 1539 .................... printf(lcd_putc,"Count:%lu ",pulse_count);
1528 09CA: MOVLW 90 1540 09D1: MOVLW 90
1529 09CB: BSF 03.6 1541 09D2: BSF 03.6
1530 09CC: MOVWF 0D 1542 09D3: MOVWF 0D
1531 09CD: MOVLW 00 1543 09D4: MOVLW 00
1532 09CE: MOVWF 0F 1544 09D5: MOVWF 0F
1533 09CF: BCF 03.0 1545 09D6: BCF 03.0
1534 09D0: MOVLW 06 1546 09D7: MOVLW 06
1535 09D1: BCF 03.6 1547 09D8: BCF 03.6
1536 09D2: MOVWF 39 1548 09D9: MOVWF 3A
1537 09D3: BCF 0A.3 1549 09DA: BCF 0A.3
1538 09D4: CALL 29D 1550 09DB: CALL 298
1539 09D5: BSF 0A.3 1551 09DC: BSF 0A.3
1540 09D6: MOVLW 41 1552 09DD: MOVLW 41
1541 09D7: MOVWF 04 1553 09DE: MOVWF 04
1542 09D8: MOVF 2A,W 1554 09DF: MOVF 2A,W
1543 09D9: MOVWF 3C 1555 09E0: MOVWF 3D
1544 09DA: MOVF 29,W 1556 09E1: MOVF 29,W
1545 09DB: MOVWF 3B 1557 09E2: MOVWF 3C
1546 09DC: MOVF 28,W 1558 09E3: MOVF 28,W
1547 09DD: MOVWF 3A 1559 09E4: MOVWF 3B
1548 09DE: MOVF 27,W 1560 09E5: MOVF 27,W
1549 09DF: MOVWF 39 1561 09E6: MOVWF 3A
1550 09E0: BCF 0A.3 1562 09E7: BCF 0A.3
1551 09E1: CALL 32E 1563 09E8: CALL 329
1552 09E2: BSF 0A.3 1564 09E9: BSF 0A.3
1553 09E3: MOVLW 94 1565 09EA: MOVLW 94
1554 09E4: BSF 03.6 1566 09EB: BSF 03.6
1555 09E5: MOVWF 0D 1567 09EC: MOVWF 0D
1556 09E6: MOVLW 00 1568 09ED: MOVLW 00
1557 09E7: MOVWF 0F 1569 09EE: MOVWF 0F
1558 09E8: BSF 03.0 1570 09EF: BSF 03.0
1559 09E9: MOVLW 05 1571 09F0: MOVLW 05
1560 09EA: BCF 03.6 1572 09F1: BCF 03.6
1561 09EB: MOVWF 39 1573 09F2: MOVWF 3A
1562 09EC: BCF 0A.3 1574 09F3: BCF 0A.3
1563 09ED: CALL 29D 1575 09F4: CALL 298
1564 09EE: BSF 0A.3 1576 09F5: BSF 0A.3
1565 .................... } 1577 .................... }
1566 .................... 1578 ....................
1567 .................... lcd_gotoxy(1,2); 1579 .................... lcd_gotoxy(1,2);
1568 09EF: MOVLW 01 1580 09F6: MOVLW 01
1569 09F0: MOVWF 46 1581 09F7: MOVWF 47
1570 09F1: MOVLW 02 1582 09F8: MOVLW 02
1571 09F2: MOVWF 47 1583 09F9: MOVWF 48
1572 09F3: BCF 0A.3 1584 09FA: BCF 0A.3
1573 09F4: CALL 1B0 1585 09FB: CALL 1AB
1574 09F5: BSF 0A.3 1586 09FC: BSF 0A.3
1575 .................... printf(lcd_putc,"T:%lu ",time); 1587 .................... printf(lcd_putc,"T:%3lu I:%3lu U:%2u ",time,integration_time,treshold);
1576 09F6: MOVLW 54 1588 09FD: MOVLW 54
1577 09F7: MOVWF 45 1589 09FE: MOVWF 46
1578 09F8: BCF 0A.3 1590 09FF: BCF 0A.3
1579 09F9: CALL 1C2 1591 0A00: CALL 1BD
1580 09FA: BSF 0A.3 1592 0A01: BSF 0A.3
1581 09FB: MOVLW 3A 1593 0A02: MOVLW 3A
1582 09FC: MOVWF 45 1594 0A03: MOVWF 46
1583 09FD: BCF 0A.3 1595 0A04: BCF 0A.3
1584 09FE: CALL 1C2 1596 0A05: CALL 1BD
1585 09FF: BSF 0A.3 1597 0A06: BSF 0A.3
1586 0A00: MOVLW 10 1598 0A07: MOVLW 02
1587 0A01: MOVWF 04 1599 0A08: MOVWF 04
1588 0A02: MOVF 33,W 1600 0A09: MOVF 33,W
1589 0A03: MOVWF 3A 1601 0A0A: MOVWF 3B
1590 0A04: MOVF 32,W 1602 0A0B: MOVF 32,W
1591 0A05: MOVWF 39 1603 0A0C: MOVWF 3A
1592 0A06: BCF 0A.3 1604 0A0D: BCF 0A.3
1593 0A07: CALL 599 1605 0A0E: CALL 594
1594 0A08: BSF 0A.3 -  
1595 0A09: MOVLW 20 -  
1596 0A0A: MOVWF 45 -  
1597 0A0B: BCF 0A.3 -  
1598 0A0C: CALL 1C2 -  
1599 0A0D: BSF 0A.3 1606 0A0F: BSF 0A.3
1600 0A0E: MOVLW 20 1607 0A10: MOVLW 20
1601 0A0F: MOVWF 45 1608 0A11: MOVWF 46
1602 0A10: BCF 0A.3 1609 0A12: BCF 0A.3
1603 0A11: CALL 1C2 1610 0A13: CALL 1BD
1604 0A12: BSF 0A.3 1611 0A14: BSF 0A.3
1605 0A13: MOVLW 20 1612 0A15: MOVLW 49
1606 0A14: MOVWF 45 1613 0A16: MOVWF 46
1607 0A15: BCF 0A.3 1614 0A17: BCF 0A.3
1608 0A16: CALL 1C2 1615 0A18: CALL 1BD
1609 0A17: BSF 0A.3 1616 0A19: BSF 0A.3
1610 .................... lcd_gotoxy(9,2); -  
1611 0A18: MOVLW 09 -  
1612 0A19: MOVWF 46 -  
1613 0A1A: MOVLW 02 1617 0A1A: MOVLW 3A
1614 0A1B: MOVWF 47 1618 0A1B: MOVWF 46
1615 0A1C: BCF 0A.3 1619 0A1C: BCF 0A.3
1616 0A1D: CALL 1B0 1620 0A1D: CALL 1BD
1617 0A1E: BSF 0A.3 1621 0A1E: BSF 0A.3
1618 .................... printf(lcd_putc,"I:%lu ", integration_time); -  
1619 0A1F: MOVLW 49 1622 0A1F: MOVLW 02
1620 0A20: MOVWF 45 1623 0A20: MOVWF 04
1621 0A21: BCF 0A.3 1624 0A21: MOVF 31,W
1622 0A22: CALL 1C2 1625 0A22: MOVWF 3B
1623 0A23: BSF 0A.3 1626 0A23: MOVF 30,W
1624 0A24: MOVLW 3A 1627 0A24: MOVWF 3A
1625 0A25: MOVWF 45 -  
1626 0A26: BCF 0A.3 1628 0A25: BCF 0A.3
1627 0A27: CALL 1C2 1629 0A26: CALL 594
1628 0A28: BSF 0A.3 1630 0A27: BSF 0A.3
1629 0A29: MOVLW 10 1631 0A28: MOVLW 20
1630 0A2A: MOVWF 04 1632 0A29: MOVWF 46
-   1633 0A2A: BCF 0A.3
1631 0A2B: MOVF 31,W 1634 0A2B: CALL 1BD
1632 0A2C: MOVWF 3A 1635 0A2C: BSF 0A.3
1633 0A2D: MOVF 30,W 1636 0A2D: MOVLW 55
1634 0A2E: MOVWF 39 1637 0A2E: MOVWF 46
1635 0A2F: BCF 0A.3 1638 0A2F: BCF 0A.3
1636 0A30: CALL 599 1639 0A30: CALL 1BD
1637 0A31: BSF 0A.3 1640 0A31: BSF 0A.3
1638 0A32: MOVLW 9A 1641 0A32: MOVLW 3A
1639 0A33: BSF 03.6 1642 0A33: MOVWF 46
1640 0A34: MOVWF 0D 1643 0A34: BCF 0A.3
1641 0A35: MOVLW 00 1644 0A35: CALL 1BD
1642 0A36: MOVWF 0F 1645 0A36: BSF 0A.3
1643 0A37: BSF 03.0 1646 0A37: MOVF 39,W
1644 0A38: MOVLW 04 1647 0A38: MOVWF 3A
1645 0A39: BCF 03.6 1648 0A39: MOVLW 11
1646 0A3A: MOVWF 39 1649 0A3A: MOVWF 3B
1647 0A3B: BCF 0A.3 1650 0A3B: BCF 0A.3
1648 0A3C: CALL 29D 1651 0A3C: GOTO 60C
1649 0A3D: BSF 0A.3 1652 0A3D: BSF 0A.3
-   1653 0A3E: MOVLW 20
-   1654 0A3F: MOVWF 46
-   1655 0A40: BCF 0A.3
-   1656 0A41: CALL 1BD
-   1657 0A42: BSF 0A.3
-   1658 .................... // printf(lcd_putc,"I:%4lu ", integration_time);
1650 .................... 1659 ....................
1651 .................... if(time == 0) // po uplynuti mereneho intervalu vypis na seriovku 1660 .................... if(time == 0) // po uplynuti mereneho intervalu vypis na seriovku
1652 0A3E: MOVF 32,F 1661 0A43: MOVF 32,F
1653 0A3F: BTFSS 03.2 1662 0A44: BTFSS 03.2
1654 0A40: GOTO 298 1663 0A45: GOTO 29D
1655 0A41: MOVF 33,F 1664 0A46: MOVF 33,F
1656 0A42: BTFSS 03.2 1665 0A47: BTFSS 03.2
1657 0A43: GOTO 298 1666 0A48: GOTO 29D
1658 .................... { 1667 .................... {
1659 .................... set_timer0(0); 1668 .................... set_timer0(0);
1660 0A44: CLRF 01 1669 0A49: CLRF 01
1661 .................... time_overflow_count=0; 1670 .................... time_overflow_count=0;
1662 0A45: CLRF 2E 1671 0A4A: CLRF 2E
1663 0A46: CLRF 2D 1672 0A4B: CLRF 2D
1664 .................... sound_beep(1000,700); 1673 .................... sound_beep(1000,700);
1665 0A47: MOVLW E8 1674 0A4C: MOVLW E8
1666 0A48: MOVWF 39 1675 0A4D: MOVWF 3A
1667 0A49: MOVLW 02 1676 0A4E: MOVLW 02
1668 0A4A: MOVWF 3B 1677 0A4F: MOVWF 3C
1669 0A4B: MOVLW BC 1678 0A50: MOVLW BC
1670 0A4C: MOVWF 3A 1679 0A51: MOVWF 3B
1671 0A4D: BCF 0A.3 1680 0A52: BCF 0A.3
1672 0A4E: CALL 60D 1681 0A53: CALL 654
1673 0A4F: BSF 0A.3 1682 0A54: BSF 0A.3
1674 .................... printf("$GMC1.0 %lu %lu %lu \r\n", measurement_number, integration_time, pulse_count); 1683 .................... printf("$GMC1.0 %lu %lu %lu \r\n", measurement_number, integration_time, pulse_count);
1675 0A50: MOVLW 9D 1684 0A55: MOVLW 98
1676 0A51: BSF 03.6 1685 0A56: BSF 03.6
1677 0A52: MOVWF 0D 1686 0A57: MOVWF 0D
1678 0A53: MOVLW 00 1687 0A58: MOVLW 00
1679 0A54: MOVWF 0F 1688 0A59: MOVWF 0F
1680 0A55: BCF 03.0 1689 0A5A: BCF 03.0
1681 0A56: MOVLW 08 1690 0A5B: MOVLW 08
1682 0A57: BCF 03.6 1691 0A5C: BCF 03.6
1683 0A58: MOVWF 39 1692 0A5D: MOVWF 3A
1684 0A59: BCF 0A.3 1693 0A5E: BCF 0A.3
1685 0A5A: CALL 656 1694 0A5F: CALL 69D
1686 0A5B: BSF 0A.3 1695 0A60: BSF 0A.3
1687 0A5C: MOVLW 10 1696 0A61: MOVLW 10
1688 0A5D: MOVWF 04 1697 0A62: MOVWF 04
1689 0A5E: MOVF 38,W 1698 0A63: MOVF 38,W
1690 0A5F: MOVWF 3A 1699 0A64: MOVWF 3B
1691 0A60: MOVF 37,W 1700 0A65: MOVF 37,W
1692 0A61: MOVWF 39 -  
1693 0A62: BCF 0A.3 -  
1694 0A63: CALL 6A5 -  
1695 0A64: BSF 0A.3 -  
1696 0A65: MOVLW 20 -  
1697 0A66: MOVWF 45 1701 0A66: MOVWF 3A
1698 0A67: BCF 0A.3 1702 0A67: BCF 0A.3
1699 0A68: CALL 235 1703 0A68: CALL 6EC
1700 0A69: BSF 0A.3 1704 0A69: BSF 0A.3
1701 0A6A: MOVLW 10 1705 0A6A: MOVLW 20
1702 0A6B: MOVWF 04 1706 0A6B: MOVWF 46
1703 0A6C: MOVF 31,W 1707 0A6C: BCF 0A.3
1704 0A6D: MOVWF 3A 1708 0A6D: CALL 230
1705 0A6E: MOVF 30,W 1709 0A6E: BSF 0A.3
1706 0A6F: MOVWF 39 1710 0A6F: MOVLW 10
1707 0A70: BCF 0A.3 1711 0A70: MOVWF 04
1708 0A71: CALL 6A5 1712 0A71: MOVF 31,W
1709 0A72: BSF 0A.3 1713 0A72: MOVWF 3B
1710 0A73: MOVLW 20 1714 0A73: MOVF 30,W
1711 0A74: MOVWF 45 1715 0A74: MOVWF 3A
1712 0A75: BCF 0A.3 1716 0A75: BCF 0A.3
1713 0A76: CALL 235 1717 0A76: CALL 6EC
1714 0A77: BSF 0A.3 1718 0A77: BSF 0A.3
-   1719 0A78: MOVLW 20
-   1720 0A79: MOVWF 46
-   1721 0A7A: BCF 0A.3
-   1722 0A7B: CALL 230
-   1723 0A7C: BSF 0A.3
1715 0A78: MOVLW 41 1724 0A7D: MOVLW 41
1716 0A79: MOVWF 04 1725 0A7E: MOVWF 04
1717 0A7A: MOVF 2A,W 1726 0A7F: MOVF 2A,W
1718 0A7B: MOVWF 3C 1727 0A80: MOVWF 3D
1719 0A7C: MOVF 29,W 1728 0A81: MOVF 29,W
1720 0A7D: MOVWF 3B 1729 0A82: MOVWF 3C
1721 0A7E: MOVF 28,W 1730 0A83: MOVF 28,W
1722 0A7F: MOVWF 3A 1731 0A84: MOVWF 3B
1723 0A80: MOVF 27,W 1732 0A85: MOVF 27,W
1724 0A81: MOVWF 39 1733 0A86: MOVWF 3A
1725 0A82: BCF 0A.3 1734 0A87: BCF 0A.3
1726 0A83: GOTO 708 1735 0A88: GOTO 74F
1727 0A84: BSF 0A.3 1736 0A89: BSF 0A.3
1728 0A85: MOVLW A6 1737 0A8A: MOVLW A1
1729 0A86: BSF 03.6 1738 0A8B: BSF 03.6
1730 0A87: MOVWF 0D 1739 0A8C: MOVWF 0D
1731 0A88: MOVLW 00 1740 0A8D: MOVLW 00
1732 0A89: MOVWF 0F 1741 0A8E: MOVWF 0F
1733 0A8A: BSF 03.0 1742 0A8F: BSF 03.0
1734 0A8B: MOVLW 04 1743 0A90: MOVLW 04
1735 0A8C: BCF 03.6 1744 0A91: BCF 03.6
1736 0A8D: MOVWF 39 1745 0A92: MOVWF 3A
1737 0A8E: BCF 0A.3 1746 0A93: BCF 0A.3
1738 0A8F: CALL 656 1747 0A94: CALL 69D
1739 0A90: BSF 0A.3 1748 0A95: BSF 0A.3
1740 .................... set_timer1(0); 1749 .................... set_timer1(0);
1741 0A91: CLRF 0F 1750 0A96: CLRF 0F
1742 0A92: CLRF 0E 1751 0A97: CLRF 0E
1743 .................... overflow_count=0; 1752 .................... overflow_count=0;
1744 0A93: CLRF 2C 1753 0A98: CLRF 2C
1745 0A94: CLRF 2B 1754 0A99: CLRF 2B
1746 .................... measurement_number++; 1755 .................... measurement_number++;
1747 0A95: INCF 37,F 1756 0A9A: INCF 37,F
1748 0A96: BTFSC 03.2 1757 0A9B: BTFSC 03.2
1749 0A97: INCF 38,F 1758 0A9C: INCF 38,F
1750 .................... } 1759 .................... }
1751 .................... 1760 ....................
1752 .................... if(button_press==false ) // tlacitka se ctou znovu pouze pokud v redchozim cyklu nebyla zmacknuta. 1761 .................... if(button_press==false ) // tlacitka se ctou znovu pouze pokud v redchozim cyklu nebyla zmacknuta.
1753 0A98: BTFSC 36.0 1762 0A9D: BTFSC 36.0
1754 0A99: GOTO 37E 1763 0A9E: GOTO 3EF
1755 .................... { 1764 .................... {
1756 .................... if(!input(S1)) 1765 .................... if(!input(S1))
1757 0A9A: BSF 2F.2 1766 0A9F: BSF 2F.2
1758 0A9B: MOVF 2F,W 1767 0AA0: MOVF 2F,W
1759 0A9C: BSF 03.5 1768 0AA1: BSF 03.5
1760 0A9D: MOVWF 07 1769 0AA2: MOVWF 07
1761 0A9E: BCF 03.5 1770 0AA3: BCF 03.5
1762 0A9F: BTFSC 07.2 1771 0AA4: BTFSC 07.2
1763 0AA0: GOTO 2C7 1772 0AA5: GOTO 2E2
1764 .................... { 1773 .................... {
1765 .................... delay_ms(20); 1774 .................... delay_ms(20);
1766 0AA1: MOVLW 14 1775 0AA6: MOVLW 14
1767 0AA2: MOVWF 46 1776 0AA7: MOVWF 47
1768 0AA3: BCF 0A.3 1777 0AA8: BCF 0A.3
1769 0AA4: CALL 0A9 1778 0AA9: CALL 0A4
1770 0AA5: BSF 0A.3 1779 0AAA: BSF 0A.3
1771 .................... if(!input(S1)) 1780 .................... if(!input(S1))
1772 0AA6: BSF 2F.2 1781 0AAB: BSF 2F.2
1773 0AA7: MOVF 2F,W 1782 0AAC: MOVF 2F,W
1774 0AA8: BSF 03.5 1783 0AAD: BSF 03.5
1775 0AA9: MOVWF 07 1784 0AAE: MOVWF 07
1776 0AAA: BCF 03.5 1785 0AAF: BCF 03.5
1777 0AAB: BTFSC 07.2 1786 0AB0: BTFSC 07.2
1778 0AAC: GOTO 2C7 1787 0AB1: GOTO 2E2
1779 .................... { 1788 .................... {
1780 .................... button_press=true; 1789 .................... button_press=true;
1781 0AAD: BSF 36.0 1790 0AB2: BSF 36.0
1782 .................... if(time_setup==TRUE) 1791 .................... sound_beep(100,700);
-   1792 0AB3: MOVLW 64
-   1793 0AB4: MOVWF 3A
-   1794 0AB5: MOVLW 02
-   1795 0AB6: MOVWF 3C
-   1796 0AB7: MOVLW BC
-   1797 0AB8: MOVWF 3B
1783 0AAE: BTFSS 36.2 1798 0AB9: BCF 0A.3
1784 0AAF: GOTO 2C7 1799 0ABA: CALL 654
-   1800 0ABB: BSF 0A.3
-   1801 .................... switch (setup_mode)
1785 .................... { 1802 .................... {
1786 .................... sound_beep(100,700); -  
1787 0AB0: MOVLW 64 1803 0ABC: MOVLW 00
1788 0AB1: MOVWF 39 1804 0ABD: BTFSC 36.1
1789 0AB2: MOVLW 02 1805 0ABE: MOVLW 01
1790 0AB3: MOVWF 3B 1806 0ABF: XORLW 00
-   1807 0AC0: BTFSC 03.2
1791 0AB4: MOVLW BC 1808 0AC1: GOTO 2C6
1792 0AB5: MOVWF 3A 1809 0AC2: XORLW 01
1793 0AB6: BCF 0A.3 1810 0AC3: BTFSC 03.2
1794 0AB7: CALL 60D 1811 0AC4: GOTO 2D5
1795 0AB8: BSF 0A.3 1812 0AC5: GOTO 2E2
-   1813 .................... case INTERVAL_setup:
1796 .................... if(integration_time < 0xfffa ) integration_time+=5; 1814 .................... if(integration_time < 0xfffa ) integration_time+=5;
1797 0AB9: MOVF 31,W 1815 0AC6: MOVF 31,W
1798 0ABA: SUBLW FF 1816 0AC7: SUBLW FF
1799 0ABB: BTFSS 03.0 1817 0AC8: BTFSS 03.0
1800 0ABC: GOTO 2C7 1818 0AC9: GOTO 2D4
1801 0ABD: BTFSS 03.2 1819 0ACA: BTFSS 03.2
1802 0ABE: GOTO 2C3 1820 0ACB: GOTO 2D0
1803 0ABF: MOVF 30,W 1821 0ACC: MOVF 30,W
1804 0AC0: SUBLW F9 1822 0ACD: SUBLW F9
1805 0AC1: BTFSS 03.0 1823 0ACE: BTFSS 03.0
1806 0AC2: GOTO 2C7 1824 0ACF: GOTO 2D4
1807 0AC3: MOVLW 05 1825 0AD0: MOVLW 05
1808 0AC4: ADDWF 30,F 1826 0AD1: ADDWF 30,F
1809 0AC5: BTFSC 03.0 1827 0AD2: BTFSC 03.0
1810 0AC6: INCF 31,F 1828 0AD3: INCF 31,F
-   1829 .................... break;
-   1830 0AD4: GOTO 2E2
-   1831 ....................
-   1832 .................... case TRESHOLD_setup:
-   1833 .................... if(treshold < 0x0a ) treshold +=5;
-   1834 0AD5: MOVF 39,W
-   1835 0AD6: SUBLW 09
-   1836 0AD7: BTFSS 03.0
-   1837 0AD8: GOTO 2DB
-   1838 0AD9: MOVLW 05
-   1839 0ADA: ADDWF 39,F
-   1840 .................... setup_vref(VREF_HIGH|treshold); //sets 3.6(vdd *value/32 +vdd/4) if vdd is 5.0V
-   1841 0ADB: MOVF 39,W
-   1842 0ADC: IORLW 80
-   1843 0ADD: MOVWF 3A
-   1844 0ADE: BSF 03.5
-   1845 0ADF: MOVWF 17
-   1846 .................... break;
-   1847 0AE0: BCF 03.5
-   1848 0AE1: GOTO 2E2
1811 .................... } 1849 .................... }
1812 .................... } 1850 .................... }
1813 .................... } 1851 .................... }
1814 .................... 1852 ....................
1815 .................... if(!input(S2)) 1853 .................... if(!input(S2))
1816 0AC7: BSF 2F.3 1854 0AE2: BSF 2F.3
1817 0AC8: MOVF 2F,W 1855 0AE3: MOVF 2F,W
1818 0AC9: BSF 03.5 1856 0AE4: BSF 03.5
1819 0ACA: MOVWF 07 1857 0AE5: MOVWF 07
1820 0ACB: BCF 03.5 1858 0AE6: BCF 03.5
1821 0ACC: BTFSC 07.3 1859 0AE7: BTFSC 07.3
1822 0ACD: GOTO 2FA 1860 0AE8: GOTO 32B
1823 .................... { 1861 .................... {
1824 .................... delay_ms(20); 1862 .................... delay_ms(20);
1825 0ACE: MOVLW 14 1863 0AE9: MOVLW 14
1826 0ACF: MOVWF 46 1864 0AEA: MOVWF 47
1827 0AD0: BCF 0A.3 1865 0AEB: BCF 0A.3
1828 0AD1: CALL 0A9 1866 0AEC: CALL 0A4
1829 0AD2: BSF 0A.3 1867 0AED: BSF 0A.3
1830 .................... if(!input(S2)) 1868 .................... if(!input(S2))
1831 0AD3: BSF 2F.3 1869 0AEE: BSF 2F.3
1832 0AD4: MOVF 2F,W 1870 0AEF: MOVF 2F,W
1833 0AD5: BSF 03.5 1871 0AF0: BSF 03.5
1834 0AD6: MOVWF 07 1872 0AF1: MOVWF 07
1835 0AD7: BCF 03.5 1873 0AF2: BCF 03.5
1836 0AD8: BTFSC 07.3 1874 0AF3: BTFSC 07.3
1837 0AD9: GOTO 2FA 1875 0AF4: GOTO 32B
1838 .................... { 1876 .................... {
1839 .................... button_press=true; 1877 .................... button_press=true;
1840 0ADA: BSF 36.0 1878 0AF5: BSF 36.0
1841 .................... if(time_setup==TRUE) 1879 .................... sound_beep(100,600);
-   1880 0AF6: MOVLW 64
-   1881 0AF7: MOVWF 3A
-   1882 0AF8: MOVLW 02
-   1883 0AF9: MOVWF 3C
-   1884 0AFA: MOVLW 58
-   1885 0AFB: MOVWF 3B
1842 0ADB: BTFSS 36.2 1886 0AFC: BCF 0A.3
1843 0ADC: GOTO 2FA 1887 0AFD: CALL 654
-   1888 0AFE: BSF 0A.3
-   1889 .................... switch (setup_mode)
1844 .................... { 1890 .................... {
1845 .................... sound_beep(100,600); -  
1846 0ADD: MOVLW 64 1891 0AFF: MOVLW 00
-   1892 0B00: BTFSC 36.1
1847 0ADE: MOVWF 39 1893 0B01: MOVLW 01
1848 0ADF: MOVLW 02 1894 0B02: XORLW 00
1849 0AE0: MOVWF 3B 1895 0B03: BTFSC 03.2
1850 0AE1: MOVLW 58 1896 0B04: GOTO 309
1851 0AE2: MOVWF 3A 1897 0B05: XORLW 01
1852 0AE3: BCF 0A.3 1898 0B06: BTFSC 03.2
1853 0AE4: CALL 60D 1899 0B07: GOTO 31E
1854 0AE5: BSF 0A.3 1900 0B08: GOTO 32B
-   1901 .................... case INTERVAL_setup:
1855 .................... if(integration_time > 0x0005 ) integration_time-=5; 1902 .................... if(integration_time > 0x0005 ) integration_time-=5;
1856 0AE6: MOVF 31,F 1903 0B09: MOVF 31,F
1857 0AE7: BTFSS 03.2 1904 0B0A: BTFSS 03.2
1858 0AE8: GOTO 2ED 1905 0B0B: GOTO 310
1859 0AE9: MOVF 30,W 1906 0B0C: MOVF 30,W
1860 0AEA: SUBLW 05 1907 0B0D: SUBLW 05
1861 0AEB: BTFSC 03.0 1908 0B0E: BTFSC 03.0
1862 0AEC: GOTO 2F3 1909 0B0F: GOTO 316
1863 0AED: MOVLW 05 1910 0B10: MOVLW 05
1864 0AEE: SUBWF 30,F 1911 0B11: SUBWF 30,F
1865 0AEF: MOVLW 00 1912 0B12: MOVLW 00
1866 0AF0: BTFSS 03.0 1913 0B13: BTFSS 03.0
1867 0AF1: MOVLW 01 1914 0B14: MOVLW 01
1868 0AF2: SUBWF 31,F 1915 0B15: SUBWF 31,F
1869 .................... -  
1870 .................... set_timer0(0); // vynulovani pocitadel, kdyz uzivatel sahne na tlacitka 1916 .................... set_timer0(0); // vynulovani pocitadel, kdyz uzivatel sahne na tlacitka
1871 0AF3: CLRF 01 1917 0B16: CLRF 01
1872 .................... time_overflow_count=0; 1918 .................... time_overflow_count=0;
1873 0AF4: CLRF 2E 1919 0B17: CLRF 2E
1874 0AF5: CLRF 2D 1920 0B18: CLRF 2D
1875 .................... set_timer1(0); 1921 .................... set_timer1(0);
1876 0AF6: CLRF 0F 1922 0B19: CLRF 0F
1877 0AF7: CLRF 0E 1923 0B1A: CLRF 0E
1878 .................... overflow_count=0; 1924 .................... overflow_count=0;
1879 0AF8: CLRF 2C 1925 0B1B: CLRF 2C
1880 0AF9: CLRF 2B 1926 0B1C: CLRF 2B
-   1927 .................... break;
-   1928 0B1D: GOTO 32B
-   1929 .................... case TRESHOLD_setup:
-   1930 .................... if(treshold > 0x05 ) treshold +=5;
-   1931 0B1E: MOVF 39,W
-   1932 0B1F: SUBLW 05
-   1933 0B20: BTFSC 03.0
-   1934 0B21: GOTO 324
-   1935 0B22: MOVLW 05
-   1936 0B23: ADDWF 39,F
-   1937 .................... setup_vref(VREF_HIGH|treshold); //sets 3.6(vdd *value/32 +vdd/4) if vdd is 5.0V
-   1938 0B24: MOVF 39,W
-   1939 0B25: IORLW 80
-   1940 0B26: MOVWF 3A
-   1941 0B27: BSF 03.5
-   1942 0B28: MOVWF 17
-   1943 .................... break;
-   1944 0B29: BCF 03.5
-   1945 0B2A: GOTO 32B
1881 .................... } 1946 .................... }
1882 .................... } 1947 .................... }
1883 .................... } 1948 .................... }
1884 .................... 1949 ....................
1885 .................... if(!input(S3)) 1950 .................... if(!input(S3))
1886 0AFA: BSF 03.5 1951 0B2B: BSF 03.5
1887 0AFB: BSF 08.0 1952 0B2C: BSF 08.0
1888 0AFC: BCF 03.5 1953 0B2D: BCF 03.5
1889 0AFD: BTFSC 08.0 1954 0B2E: BTFSC 08.0
1890 0AFE: GOTO 31D 1955 0B2F: GOTO 362
1891 .................... { 1956 .................... {
1892 .................... delay_ms(20); 1957 .................... delay_ms(20);
1893 0AFF: MOVLW 14 1958 0B30: MOVLW 14
1894 0B00: MOVWF 46 1959 0B31: MOVWF 47
1895 0B01: BCF 0A.3 1960 0B32: BCF 0A.3
1896 0B02: CALL 0A9 1961 0B33: CALL 0A4
1897 0B03: BSF 0A.3 1962 0B34: BSF 0A.3
1898 .................... if(!input(S3)) 1963 .................... if(!input(S3))
1899 0B04: BSF 03.5 1964 0B35: BSF 03.5
1900 0B05: BSF 08.0 1965 0B36: BSF 08.0
1901 0B06: BCF 03.5 1966 0B37: BCF 03.5
1902 0B07: BTFSC 08.0 1967 0B38: BTFSC 08.0
1903 0B08: GOTO 31D 1968 0B39: GOTO 362
1904 .................... { 1969 .................... {
1905 .................... button_press=true; 1970 .................... button_press=true;
1906 0B09: BSF 36.0 1971 0B3A: BSF 36.0
1907 .................... if(time_setup==TRUE) 1972 .................... sound_beep(100,500);
-   1973 0B3B: MOVLW 64
-   1974 0B3C: MOVWF 3A
-   1975 0B3D: MOVLW 01
-   1976 0B3E: MOVWF 3C
-   1977 0B3F: MOVLW F4
-   1978 0B40: MOVWF 3B
1908 0B0A: BTFSS 36.2 1979 0B41: BCF 0A.3
1909 0B0B: GOTO 31D 1980 0B42: CALL 654
-   1981 0B43: BSF 0A.3
-   1982 .................... switch (setup_mode)
1910 .................... { 1983 .................... {
1911 .................... sound_beep(100,500); -  
1912 0B0C: MOVLW 64 1984 0B44: MOVLW 00
1913 0B0D: MOVWF 39 1985 0B45: BTFSC 36.1
1914 0B0E: MOVLW 01 1986 0B46: MOVLW 01
1915 0B0F: MOVWF 3B 1987 0B47: XORLW 00
-   1988 0B48: BTFSC 03.2
1916 0B10: MOVLW F4 1989 0B49: GOTO 34E
1917 0B11: MOVWF 3A 1990 0B4A: XORLW 01
1918 0B12: BCF 0A.3 1991 0B4B: BTFSC 03.2
1919 0B13: CALL 60D 1992 0B4C: GOTO 357
1920 0B14: BSF 0A.3 1993 0B4D: GOTO 362
-   1994 .................... case INTERVAL_setup:
1921 .................... if(integration_time < 0xffff ) integration_time++; 1995 .................... if(integration_time < 0xffff ) integration_time++;
1922 0B15: INCFSZ 30,W 1996 0B4E: INCFSZ 30,W
1923 0B16: GOTO 31A 1997 0B4F: GOTO 353
1924 0B17: INCFSZ 31,W 1998 0B50: INCFSZ 31,W
1925 0B18: GOTO 31A 1999 0B51: GOTO 353
1926 0B19: GOTO 31D 2000 0B52: GOTO 356
1927 0B1A: INCF 30,F 2001 0B53: INCF 30,F
1928 0B1B: BTFSC 03.2 2002 0B54: BTFSC 03.2
1929 0B1C: INCF 31,F 2003 0B55: INCF 31,F
-   2004 .................... break;
-   2005 0B56: GOTO 362
-   2006 ....................
-   2007 .................... case TRESHOLD_setup:
-   2008 .................... if(treshold < 0x0F ) treshold ++;
-   2009 0B57: MOVF 39,W
-   2010 0B58: SUBLW 0E
-   2011 0B59: BTFSC 03.0
-   2012 0B5A: INCF 39,F
-   2013 .................... setup_vref(VREF_HIGH|treshold); //sets 3.6(vdd *value/32 +vdd/4) if vdd is 5.0V
-   2014 0B5B: MOVF 39,W
-   2015 0B5C: IORLW 80
-   2016 0B5D: MOVWF 3A
-   2017 0B5E: BSF 03.5
-   2018 0B5F: MOVWF 17
-   2019 .................... break;
-   2020 0B60: BCF 03.5
-   2021 0B61: GOTO 362
1930 .................... } 2022 .................... }
1931 .................... } 2023 .................... }
1932 .................... } 2024 .................... }
1933 .................... 2025 ....................
1934 .................... if(!input(S4)) 2026 .................... if(!input(S4))
1935 0B1D: BSF 03.5 2027 0B62: BSF 03.5
1936 0B1E: BSF 08.1 2028 0B63: BSF 08.1
1937 0B1F: BCF 03.5 2029 0B64: BCF 03.5
1938 0B20: BTFSC 08.1 2030 0B65: BTFSC 08.1
1939 0B21: GOTO 34A 2031 0B66: GOTO 3A3
1940 .................... { 2032 .................... {
1941 .................... delay_ms(20); 2033 .................... delay_ms(20);
1942 0B22: MOVLW 14 2034 0B67: MOVLW 14
1943 0B23: MOVWF 46 2035 0B68: MOVWF 47
1944 0B24: BCF 0A.3 2036 0B69: BCF 0A.3
1945 0B25: CALL 0A9 2037 0B6A: CALL 0A4
1946 0B26: BSF 0A.3 2038 0B6B: BSF 0A.3
1947 .................... if(!input(S4)) 2039 .................... if(!input(S4))
1948 0B27: BSF 03.5 2040 0B6C: BSF 03.5
1949 0B28: BSF 08.1 2041 0B6D: BSF 08.1
1950 0B29: BCF 03.5 2042 0B6E: BCF 03.5
1951 0B2A: BTFSC 08.1 2043 0B6F: BTFSC 08.1
1952 0B2B: GOTO 34A 2044 0B70: GOTO 3A3
1953 .................... { 2045 .................... {
1954 .................... button_press=true; 2046 .................... button_press=true;
1955 0B2C: BSF 36.0 2047 0B71: BSF 36.0
1956 .................... if(time_setup==TRUE) 2048 .................... sound_beep(100,400);
-   2049 0B72: MOVLW 64
-   2050 0B73: MOVWF 3A
-   2051 0B74: MOVLW 01
-   2052 0B75: MOVWF 3C
-   2053 0B76: MOVLW 90
-   2054 0B77: MOVWF 3B
1957 0B2D: BTFSS 36.2 2055 0B78: BCF 0A.3
1958 0B2E: GOTO 34A 2056 0B79: CALL 654
-   2057 0B7A: BSF 0A.3
-   2058 .................... switch (setup_mode)
1959 .................... { 2059 .................... {
1960 .................... sound_beep(100,400); -  
1961 0B2F: MOVLW 64 2060 0B7B: MOVLW 00
1962 0B30: MOVWF 39 2061 0B7C: BTFSC 36.1
1963 0B31: MOVLW 01 2062 0B7D: MOVLW 01
1964 0B32: MOVWF 3B 2063 0B7E: XORLW 00
-   2064 0B7F: BTFSC 03.2
1965 0B33: MOVLW 90 2065 0B80: GOTO 385
1966 0B34: MOVWF 3A 2066 0B81: XORLW 01
1967 0B35: BCF 0A.3 2067 0B82: BTFSC 03.2
1968 0B36: CALL 60D 2068 0B83: GOTO 398
1969 0B37: BSF 0A.3 2069 0B84: GOTO 3A3
-   2070 .................... case INTERVAL_setup:
-   2071 ....................
1970 .................... if(integration_time > 0x0001 ) integration_time--; 2072 .................... if(integration_time > 0x0001 ) integration_time--;
1971 0B38: MOVF 31,F 2073 0B85: MOVF 31,F
1972 0B39: BTFSS 03.2 2074 0B86: BTFSS 03.2
1973 0B3A: GOTO 33F 2075 0B87: GOTO 38C
1974 0B3B: MOVF 30,W 2076 0B88: MOVF 30,W
1975 0B3C: SUBLW 01 2077 0B89: SUBLW 01
1976 0B3D: BTFSC 03.0 2078 0B8A: BTFSC 03.0
1977 0B3E: GOTO 343 2079 0B8B: GOTO 390
1978 0B3F: MOVF 30,W 2080 0B8C: MOVF 30,W
1979 0B40: BTFSC 03.2 2081 0B8D: BTFSC 03.2
1980 0B41: DECF 31,F 2082 0B8E: DECF 31,F
1981 0B42: DECF 30,F 2083 0B8F: DECF 30,F
1982 .................... 2084 ....................
1983 .................... set_timer0(0); // vynulovani pocitadel, kdyz uzivatel sahne na tlacitka 2085 .................... set_timer0(0); // vynulovani pocitadel, kdyz uzivatel sahne na tlacitka
1984 0B43: CLRF 01 2086 0B90: CLRF 01
1985 .................... time_overflow_count=0; 2087 .................... time_overflow_count=0;
1986 0B44: CLRF 2E 2088 0B91: CLRF 2E
1987 0B45: CLRF 2D 2089 0B92: CLRF 2D
1988 .................... set_timer1(0); 2090 .................... set_timer1(0);
1989 0B46: CLRF 0F 2091 0B93: CLRF 0F
1990 0B47: CLRF 0E 2092 0B94: CLRF 0E
1991 .................... overflow_count=0; 2093 .................... overflow_count=0;
1992 0B48: CLRF 2C 2094 0B95: CLRF 2C
1993 0B49: CLRF 2B 2095 0B96: CLRF 2B
-   2096 .................... break;
-   2097 0B97: GOTO 3A3
-   2098 .................... case TRESHOLD_setup:
-   2099 .................... if(treshold > 0x01 ) treshold--;
-   2100 0B98: MOVF 39,W
-   2101 0B99: SUBLW 01
-   2102 0B9A: BTFSS 03.0
-   2103 0B9B: DECF 39,F
-   2104 .................... setup_vref(VREF_HIGH|treshold); //sets 3.6(vdd *value/32 +vdd/4) if vdd is 5.0V
-   2105 0B9C: MOVF 39,W
-   2106 0B9D: IORLW 80
-   2107 0B9E: MOVWF 3A
-   2108 0B9F: BSF 03.5
-   2109 0BA0: MOVWF 17
-   2110 .................... break;
-   2111 0BA1: BCF 03.5
-   2112 0BA2: GOTO 3A3
1994 .................... } 2113 .................... }
1995 .................... } 2114 .................... }
1996 .................... } 2115 .................... }
1997 .................... 2116 ....................
1998 .................... if(!input(S5)) // prepnuti na nastavovani casu 2117 .................... if(!input(S5)) // prepnuti na nastavovani casu
1999 0B4A: BSF 03.5 2118 0BA3: BSF 03.5
2000 0B4B: BSF 06.1 2119 0BA4: BSF 06.1
2001 0B4C: BCF 03.5 2120 0BA5: BCF 03.5
2002 0B4D: BTFSC 06.1 2121 0BA6: BTFSC 06.1
2003 0B4E: GOTO 364 2122 0BA7: GOTO 3C9
2004 .................... { 2123 .................... {
2005 .................... delay_ms(20); 2124 .................... delay_ms(20);
2006 0B4F: MOVLW 14 2125 0BA8: MOVLW 14
2007 0B50: MOVWF 46 2126 0BA9: MOVWF 47
2008 0B51: BCF 0A.3 2127 0BAA: BCF 0A.3
2009 0B52: CALL 0A9 2128 0BAB: CALL 0A4
2010 0B53: BSF 0A.3 2129 0BAC: BSF 0A.3
2011 .................... if(!input(S5)) 2130 .................... if(!input(S5))
2012 0B54: BSF 03.5 2131 0BAD: BSF 03.5
2013 0B55: BSF 06.1 2132 0BAE: BSF 06.1
2014 0B56: BCF 03.5 2133 0BAF: BCF 03.5
2015 0B57: BTFSC 06.1 2134 0BB0: BTFSC 06.1
2016 0B58: GOTO 364 2135 0BB1: GOTO 3C9
2017 .................... { 2136 .................... {
-   2137 .................... button_press=true;
-   2138 0BB2: BSF 36.0
2018 .................... sound_beep(100,800); 2139 .................... sound_beep(100,800);
2019 0B59: MOVLW 64 2140 0BB3: MOVLW 64
2020 0B5A: MOVWF 39 2141 0BB4: MOVWF 3A
2021 0B5B: MOVLW 03 2142 0BB5: MOVLW 03
2022 0B5C: MOVWF 3B 2143 0BB6: MOVWF 3C
2023 0B5D: MOVLW 20 2144 0BB7: MOVLW 20
2024 0B5E: MOVWF 3A 2145 0BB8: MOVWF 3B
2025 0B5F: BCF 0A.3 2146 0BB9: BCF 0A.3
2026 0B60: CALL 60D 2147 0BBA: CALL 654
2027 0B61: BSF 0A.3 2148 0BBB: BSF 0A.3
2028 .................... voltage_setup=FALSE; 2149 .................... setup_mode=INTERVAL_setup;
2029 0B62: BCF 36.1 2150 0BBC: BCF 36.1
-   2151 .................... lcd_gotoxy(16,1); // prepsani dat na displeje
-   2152 0BBD: MOVLW 10
-   2153 0BBE: MOVWF 47
-   2154 0BBF: MOVLW 01
-   2155 0BC0: MOVWF 48
-   2156 0BC1: BCF 0A.3
-   2157 0BC2: CALL 1AB
-   2158 0BC3: BSF 0A.3
2030 .................... time_setup=TRUE; 2159 .................... printf(lcd_putc,"I");
-   2160 0BC4: MOVLW 49
-   2161 0BC5: MOVWF 46
-   2162 0BC6: BCF 0A.3
-   2163 0BC7: CALL 1BD
2031 0B63: BSF 36.2 2164 0BC8: BSF 0A.3
2032 .................... } 2165 .................... }
2033 .................... } 2166 .................... }
2034 .................... 2167 ....................
2035 .................... if(!input(S6)) // prepnuti na nastavovani napeti 2168 .................... if(!input(S6)) // prepnuti na nastavovani napeti
2036 0B64: BSF 03.5 2169 0BC9: BSF 03.5
2037 0B65: BSF 06.2 2170 0BCA: BSF 06.2
2038 0B66: BCF 03.5 2171 0BCB: BCF 03.5
2039 0B67: BTFSC 06.2 2172 0BCC: BTFSC 06.2
2040 0B68: GOTO 37E 2173 0BCD: GOTO 3EF
2041 .................... { 2174 .................... {
2042 .................... delay_ms(20); 2175 .................... delay_ms(20);
2043 0B69: MOVLW 14 2176 0BCE: MOVLW 14
2044 0B6A: MOVWF 46 2177 0BCF: MOVWF 47
2045 0B6B: BCF 0A.3 2178 0BD0: BCF 0A.3
2046 0B6C: CALL 0A9 2179 0BD1: CALL 0A4
2047 0B6D: BSF 0A.3 2180 0BD2: BSF 0A.3
2048 .................... if(!input(S6)) 2181 .................... if(!input(S6))
2049 0B6E: BSF 03.5 2182 0BD3: BSF 03.5
2050 0B6F: BSF 06.2 2183 0BD4: BSF 06.2
2051 0B70: BCF 03.5 2184 0BD5: BCF 03.5
2052 0B71: BTFSC 06.2 2185 0BD6: BTFSC 06.2
2053 0B72: GOTO 37E 2186 0BD7: GOTO 3EF
2054 .................... { 2187 .................... {
-   2188 .................... button_press=true;
-   2189 0BD8: BSF 36.0
2055 .................... sound_beep(100,800); 2190 .................... sound_beep(100,800);
2056 0B73: MOVLW 64 2191 0BD9: MOVLW 64
2057 0B74: MOVWF 39 2192 0BDA: MOVWF 3A
2058 0B75: MOVLW 03 2193 0BDB: MOVLW 03
2059 0B76: MOVWF 3B 2194 0BDC: MOVWF 3C
2060 0B77: MOVLW 20 2195 0BDD: MOVLW 20
2061 0B78: MOVWF 3A 2196 0BDE: MOVWF 3B
2062 0B79: BCF 0A.3 2197 0BDF: BCF 0A.3
2063 0B7A: CALL 60D 2198 0BE0: CALL 654
2064 0B7B: BSF 0A.3 2199 0BE1: BSF 0A.3
2065 .................... voltage_setup=TRUE; 2200 .................... setup_mode=TRESHOLD_setup;
2066 0B7C: BSF 36.1 2201 0BE2: BSF 36.1
-   2202 .................... lcd_gotoxy(16,1); // prepsani dat na displeje
-   2203 0BE3: MOVLW 10
-   2204 0BE4: MOVWF 47
-   2205 0BE5: MOVLW 01
-   2206 0BE6: MOVWF 48
-   2207 0BE7: BCF 0A.3
-   2208 0BE8: CALL 1AB
-   2209 0BE9: BSF 0A.3
2067 .................... time_setup=FALSE; 2210 .................... printf(lcd_putc,"U");
-   2211 0BEA: MOVLW 55
-   2212 0BEB: MOVWF 46
2068 0B7D: BCF 36.2 2213 0BEC: BCF 0A.3
-   2214 0BED: CALL 1BD
-   2215 0BEE: BSF 0A.3
2069 .................... } 2216 .................... }
2070 .................... } 2217 .................... }
2071 .................... } 2218 .................... }
2072 .................... 2219 ....................
2073 .................... if ( input(S1) && input(S2) && input(S3) && input(S4) && input(S5) && input(S6)) // detekce pustenych tlacitek 2220 .................... if ( input(S1) && input(S2) && input(S3) && input(S4) && input(S5) && input(S6)) // detekce pustenych tlacitek
2074 0B7E: BSF 2F.2 2221 0BEF: BSF 2F.2
2075 0B7F: MOVF 2F,W 2222 0BF0: MOVF 2F,W
2076 0B80: BSF 03.5 2223 0BF1: BSF 03.5
2077 0B81: MOVWF 07 2224 0BF2: MOVWF 07
2078 0B82: BCF 03.5 2225 0BF3: BCF 03.5
2079 0B83: BTFSS 07.2 2226 0BF4: BTFSS 07.2
2080 0B84: GOTO 3A1 2227 0BF5: GOTO 412
2081 0B85: BSF 2F.3 2228 0BF6: BSF 2F.3
2082 0B86: MOVF 2F,W 2229 0BF7: MOVF 2F,W
2083 0B87: BSF 03.5 2230 0BF8: BSF 03.5
2084 0B88: MOVWF 07 2231 0BF9: MOVWF 07
2085 0B89: BCF 03.5 2232 0BFA: BCF 03.5
2086 0B8A: BTFSS 07.3 2233 0BFB: BTFSS 07.3
2087 0B8B: GOTO 3A1 2234 0BFC: GOTO 412
2088 0B8C: BSF 03.5 2235 0BFD: BSF 03.5
2089 0B8D: BSF 08.0 2236 0BFE: BSF 08.0
2090 0B8E: BCF 03.5 2237 0BFF: BCF 03.5
2091 0B8F: BTFSS 08.0 2238 0C00: BTFSS 08.0
2092 0B90: GOTO 3A1 2239 0C01: GOTO 412
2093 0B91: BSF 03.5 2240 0C02: BSF 03.5
2094 0B92: BSF 08.1 2241 0C03: BSF 08.1
2095 0B93: BCF 03.5 2242 0C04: BCF 03.5
2096 0B94: BTFSS 08.1 2243 0C05: BTFSS 08.1
2097 0B95: GOTO 3A1 2244 0C06: GOTO 412
2098 0B96: BSF 03.5 2245 0C07: BSF 03.5
2099 0B97: BSF 06.1 2246 0C08: BSF 06.1
2100 0B98: BCF 03.5 2247 0C09: BCF 03.5
2101 0B99: BTFSS 06.1 2248 0C0A: BTFSS 06.1
2102 0B9A: GOTO 3A1 2249 0C0B: GOTO 412
2103 0B9B: BSF 03.5 2250 0C0C: BSF 03.5
2104 0B9C: BSF 06.2 2251 0C0D: BSF 06.2
2105 0B9D: BCF 03.5 2252 0C0E: BCF 03.5
2106 0B9E: BTFSS 06.2 2253 0C0F: BTFSS 06.2
2107 0B9F: GOTO 3A1 2254 0C10: GOTO 412
2108 .................... { 2255 .................... {
2109 .................... button_press=false; 2256 .................... button_press=false;
2110 0BA0: BCF 36.0 2257 0C11: BCF 36.0
2111 .................... } 2258 .................... }
2112 .................... } 2259 .................... }
2113 0BA1: GOTO 118 2260 0C12: GOTO 11F
2114 .................... } 2261 .................... }
2115 0BA2: SLEEP 2262 0C13: SLEEP
2116   2263  
2117 Configuration Fuses: 2264 Configuration Fuses:
2118 Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG 2265 Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
2119 Word 2: 3FFF NOWRT BORV40 2266 Word 2: 3FFF NOWRT BORV40