Line 1... |
Line 1... |
1 |
CCS PCM C Compiler, Version 4.106, 47914 03-IX-13 00:32 |
1 |
CCS PCM C Compiler, Version 4.106, 47914 10-IX-13 13:59 |
2 |
|
2 |
|
3 |
Filename: D:\MLAB\Designs\Measuring_instruments\GeoMet01A\SW\PIC16F887\main.lst |
3 |
Filename: Z:\home\kaklik\svnMLAB\Designs\Measuring_instruments\GeoMet01A\SW\PIC16F887\main.lst |
4 |
|
4 |
|
5 |
ROM used: 3183 words (39%) |
5 |
ROM used: 3809 words (46%) |
6 |
Largest free fragment is 2048 |
6 |
Largest free fragment is 2048 |
7 |
RAM used: 27 (7%) at main() level |
7 |
RAM used: 35 (10%) at main() level |
8 |
52 (14%) worst case |
8 |
72 (20%) worst case |
9 |
Stack: 5 locations |
9 |
Stack: 5 locations |
10 |
|
10 |
|
11 |
* |
11 |
* |
12 |
0000: MOVLW 0A |
12 |
0000: MOVLW 0C |
13 |
0001: MOVWF 0A |
13 |
0001: MOVWF 0A |
14 |
0002: GOTO 2B7 |
14 |
0002: GOTO 4E5 |
15 |
0003: NOP |
15 |
0003: NOP |
16 |
.................... #include "main.h" |
16 |
.................... #include "main.h" |
17 |
.................... #include <16F887.h> |
17 |
.................... #include <16F887.h> |
18 |
.................... //////// Standard Header file for the PIC16F887 device //////////////// |
18 |
.................... //////// Standard Header file for the PIC16F887 device //////////////// |
19 |
.................... #device PIC16F887 |
19 |
.................... #device PIC16F887 |
Line 35... |
Line 35... |
35 |
.................... #FUSES NOWRT //Program memory not write protected |
35 |
.................... #FUSES NOWRT //Program memory not write protected |
36 |
.................... #FUSES BORV40 //Brownout reset at 4.0V |
36 |
.................... #FUSES BORV40 //Brownout reset at 4.0V |
37 |
.................... |
37 |
.................... |
38 |
.................... #use delay(clock=8000000) |
38 |
.................... #use delay(clock=8000000) |
39 |
* |
39 |
* |
40 |
00FB: MOVLW 43 |
40 |
00FB: MOVLW 4B |
41 |
00FC: MOVWF 04 |
41 |
00FC: MOVWF 04 |
42 |
00FD: BCF 03.7 |
42 |
00FD: BCF 03.7 |
43 |
00FE: MOVF 00,W |
43 |
00FE: MOVF 00,W |
44 |
00FF: BTFSC 03.2 |
44 |
00FF: BTFSC 03.2 |
45 |
0100: GOTO 10E |
45 |
0100: GOTO 10E |
Line 67... |
Line 67... |
67 |
007D: MOVF 20,W |
67 |
007D: MOVF 20,W |
68 |
007E: BSF 03.5 |
68 |
007E: BSF 03.5 |
69 |
007F: MOVWF 07 |
69 |
007F: MOVWF 07 |
70 |
0080: NOP |
70 |
0080: NOP |
71 |
0081: BCF 03.5 |
71 |
0081: BCF 03.5 |
72 |
0082: RLF 3B,F |
72 |
0082: RLF 4E,F |
73 |
0083: BCF 07.4 |
73 |
0083: BCF 07.4 |
74 |
0084: BTFSS 03.0 |
74 |
0084: BTFSS 03.0 |
75 |
0085: GOTO 08C |
75 |
0085: GOTO 08C |
76 |
0086: BSF 20.4 |
76 |
0086: BSF 20.4 |
77 |
0087: MOVF 20,W |
77 |
0087: MOVF 20,W |
Line 133... |
Line 133... |
133 |
00BF: MOVWF 07 |
133 |
00BF: MOVWF 07 |
134 |
00C0: BCF 03.5 |
134 |
00C0: BCF 03.5 |
135 |
00C1: RETURN |
135 |
00C1: RETURN |
136 |
* |
136 |
* |
137 |
0285: MOVLW 08 |
137 |
0285: MOVLW 08 |
138 |
0286: MOVWF 3C |
138 |
0286: MOVWF 4F |
139 |
0287: MOVF 77,W |
139 |
0287: MOVF 77,W |
140 |
0288: MOVWF 3D |
140 |
0288: MOVWF 50 |
141 |
0289: BSF 20.4 |
141 |
0289: BSF 20.4 |
142 |
028A: MOVF 20,W |
142 |
028A: MOVF 20,W |
143 |
028B: BSF 03.5 |
143 |
028B: BSF 03.5 |
144 |
028C: MOVWF 07 |
144 |
028C: MOVWF 07 |
145 |
028D: NOP |
145 |
028D: NOP |
Line 161... |
Line 161... |
161 |
029D: MOVF 20,W |
161 |
029D: MOVF 20,W |
162 |
029E: BSF 03.5 |
162 |
029E: BSF 03.5 |
163 |
029F: MOVWF 07 |
163 |
029F: MOVWF 07 |
164 |
02A0: BCF 03.5 |
164 |
02A0: BCF 03.5 |
165 |
02A1: BCF 07.3 |
165 |
02A1: BCF 07.3 |
166 |
02A2: DECFSZ 3C,F |
166 |
02A2: DECFSZ 4F,F |
167 |
02A3: GOTO 289 |
167 |
02A3: GOTO 289 |
168 |
02A4: BSF 20.4 |
168 |
02A4: BSF 20.4 |
169 |
02A5: MOVF 20,W |
169 |
02A5: MOVF 20,W |
170 |
02A6: BSF 03.5 |
170 |
02A6: BSF 03.5 |
171 |
02A7: MOVWF 07 |
171 |
02A7: MOVWF 07 |
172 |
02A8: NOP |
172 |
02A8: NOP |
173 |
02A9: BCF 03.5 |
173 |
02A9: BCF 03.5 |
174 |
02AA: BCF 07.4 |
174 |
02AA: BCF 07.4 |
175 |
02AB: MOVF 3D,W |
175 |
02AB: MOVF 50,W |
176 |
02AC: BTFSC 03.2 |
176 |
02AC: BTFSC 03.2 |
177 |
02AD: GOTO 2B3 |
177 |
02AD: GOTO 2B3 |
178 |
02AE: BCF 20.4 |
178 |
02AE: BCF 20.4 |
179 |
02AF: MOVF 20,W |
179 |
02AF: MOVF 20,W |
180 |
02B0: BSF 03.5 |
180 |
02B0: BSF 03.5 |
Line 439... |
Line 439... |
439 |
0181: NOP |
439 |
0181: NOP |
440 |
.................... high = lcd_read_nibble(); |
440 |
.................... high = lcd_read_nibble(); |
441 |
0182: BCF 03.5 |
441 |
0182: BCF 03.5 |
442 |
0183: CALL 13B |
442 |
0183: CALL 13B |
443 |
0184: MOVF 78,W |
443 |
0184: MOVF 78,W |
444 |
0185: MOVWF 4A |
444 |
0185: MOVWF 52 |
445 |
.................... |
445 |
.................... |
446 |
.................... lcd_output_enable(0); |
446 |
.................... lcd_output_enable(0); |
447 |
0186: BCF 09.0 |
447 |
0186: BCF 09.0 |
448 |
0187: BSF 03.5 |
448 |
0187: BSF 03.5 |
449 |
0188: BCF 09.0 |
449 |
0188: BCF 09.0 |
Line 458... |
Line 458... |
458 |
018E: GOTO 18F |
458 |
018E: GOTO 18F |
459 |
.................... low = lcd_read_nibble(); |
459 |
.................... low = lcd_read_nibble(); |
460 |
018F: BCF 03.5 |
460 |
018F: BCF 03.5 |
461 |
0190: CALL 13B |
461 |
0190: CALL 13B |
462 |
0191: MOVF 78,W |
462 |
0191: MOVF 78,W |
463 |
0192: MOVWF 49 |
463 |
0192: MOVWF 51 |
464 |
.................... |
464 |
.................... |
465 |
.................... lcd_output_enable(0); |
465 |
.................... lcd_output_enable(0); |
466 |
0193: BCF 09.0 |
466 |
0193: BCF 09.0 |
467 |
0194: BSF 03.5 |
467 |
0194: BSF 03.5 |
468 |
0195: BCF 09.0 |
468 |
0195: BCF 09.0 |
Line 484... |
Line 484... |
484 |
.................... #endif |
484 |
.................... #endif |
485 |
.................... #endif |
485 |
.................... #endif |
486 |
.................... |
486 |
.................... |
487 |
.................... return( (high<<4) | low); |
487 |
.................... return( (high<<4) | low); |
488 |
019A: BCF 03.5 |
488 |
019A: BCF 03.5 |
489 |
019B: SWAPF 4A,W |
489 |
019B: SWAPF 52,W |
490 |
019C: MOVWF 77 |
490 |
019C: MOVWF 77 |
491 |
019D: MOVLW F0 |
491 |
019D: MOVLW F0 |
492 |
019E: ANDWF 77,F |
492 |
019E: ANDWF 77,F |
493 |
019F: MOVF 77,W |
493 |
019F: MOVF 77,W |
494 |
01A0: IORWF 49,W |
494 |
01A0: IORWF 51,W |
495 |
01A1: MOVWF 78 |
495 |
01A1: MOVWF 78 |
496 |
.................... } |
496 |
.................... } |
497 |
.................... |
497 |
.................... |
498 |
.................... BYTE lcd_read_nibble(void) |
498 |
.................... BYTE lcd_read_nibble(void) |
499 |
.................... { |
499 |
.................... { |
500 |
.................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) |
500 |
.................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) |
501 |
* |
501 |
* |
502 |
013B: CLRF 4B |
502 |
013B: CLRF 53 |
503 |
.................... BYTE n = 0x00; |
503 |
.................... BYTE n = 0x00; |
504 |
.................... |
504 |
.................... |
505 |
.................... /* Read the data port */ |
505 |
.................... /* Read the data port */ |
506 |
.................... n |= input(LCD_DATA4); |
506 |
.................... n |= input(LCD_DATA4); |
507 |
013C: BSF 03.5 |
507 |
013C: BSF 03.5 |
508 |
013D: BSF 08.4 |
508 |
013D: BSF 08.4 |
509 |
013E: MOVLW 00 |
509 |
013E: MOVLW 00 |
510 |
013F: BCF 03.5 |
510 |
013F: BCF 03.5 |
511 |
0140: BTFSC 08.4 |
511 |
0140: BTFSC 08.4 |
512 |
0141: MOVLW 01 |
512 |
0141: MOVLW 01 |
513 |
0142: IORWF 4B,F |
513 |
0142: IORWF 53,F |
514 |
.................... n |= input(LCD_DATA5) << 1; |
514 |
.................... n |= input(LCD_DATA5) << 1; |
515 |
0143: BSF 03.5 |
515 |
0143: BSF 03.5 |
516 |
0144: BSF 08.5 |
516 |
0144: BSF 08.5 |
517 |
0145: MOVLW 00 |
517 |
0145: MOVLW 00 |
518 |
0146: BCF 03.5 |
518 |
0146: BCF 03.5 |
Line 520... |
Line 520... |
520 |
0148: MOVLW 01 |
520 |
0148: MOVLW 01 |
521 |
0149: MOVWF 77 |
521 |
0149: MOVWF 77 |
522 |
014A: BCF 03.0 |
522 |
014A: BCF 03.0 |
523 |
014B: RLF 77,F |
523 |
014B: RLF 77,F |
524 |
014C: MOVF 77,W |
524 |
014C: MOVF 77,W |
525 |
014D: IORWF 4B,F |
525 |
014D: IORWF 53,F |
526 |
.................... n |= input(LCD_DATA6) << 2; |
526 |
.................... n |= input(LCD_DATA6) << 2; |
527 |
014E: BSF 03.5 |
527 |
014E: BSF 03.5 |
528 |
014F: BSF 08.6 |
528 |
014F: BSF 08.6 |
529 |
0150: MOVLW 00 |
529 |
0150: MOVLW 00 |
530 |
0151: BCF 03.5 |
530 |
0151: BCF 03.5 |
Line 534... |
Line 534... |
534 |
0155: RLF 77,F |
534 |
0155: RLF 77,F |
535 |
0156: RLF 77,F |
535 |
0156: RLF 77,F |
536 |
0157: MOVLW FC |
536 |
0157: MOVLW FC |
537 |
0158: ANDWF 77,F |
537 |
0158: ANDWF 77,F |
538 |
0159: MOVF 77,W |
538 |
0159: MOVF 77,W |
539 |
015A: IORWF 4B,F |
539 |
015A: IORWF 53,F |
540 |
.................... n |= input(LCD_DATA7) << 3; |
540 |
.................... n |= input(LCD_DATA7) << 3; |
541 |
015B: BSF 03.5 |
541 |
015B: BSF 03.5 |
542 |
015C: BSF 08.7 |
542 |
015C: BSF 08.7 |
543 |
015D: MOVLW 00 |
543 |
015D: MOVLW 00 |
544 |
015E: BCF 03.5 |
544 |
015E: BCF 03.5 |
Line 549... |
Line 549... |
549 |
0163: RLF 77,F |
549 |
0163: RLF 77,F |
550 |
0164: RLF 77,F |
550 |
0164: RLF 77,F |
551 |
0165: MOVLW F8 |
551 |
0165: MOVLW F8 |
552 |
0166: ANDWF 77,F |
552 |
0166: ANDWF 77,F |
553 |
0167: MOVF 77,W |
553 |
0167: MOVF 77,W |
554 |
0168: IORWF 4B,F |
554 |
0168: IORWF 53,F |
555 |
.................... |
555 |
.................... |
556 |
.................... return(n); |
556 |
.................... return(n); |
557 |
0169: MOVF 4B,W |
557 |
0169: MOVF 53,W |
558 |
016A: MOVWF 78 |
558 |
016A: MOVWF 78 |
559 |
.................... #else |
559 |
.................... #else |
560 |
.................... return(lcd.data); |
560 |
.................... return(lcd.data); |
561 |
.................... #endif |
561 |
.................... #endif |
562 |
.................... } |
562 |
.................... } |
Line 566... |
Line 566... |
566 |
.................... { |
566 |
.................... { |
567 |
.................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) |
567 |
.................... #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) |
568 |
.................... /* Write to the data port */ |
568 |
.................... /* Write to the data port */ |
569 |
.................... output_bit(LCD_DATA4, bit_test(n, 0)); |
569 |
.................... output_bit(LCD_DATA4, bit_test(n, 0)); |
570 |
* |
570 |
* |
571 |
010F: BTFSC 4A.0 |
571 |
010F: BTFSC 52.0 |
572 |
0110: GOTO 113 |
572 |
0110: GOTO 113 |
573 |
0111: BCF 08.4 |
573 |
0111: BCF 08.4 |
574 |
0112: GOTO 114 |
574 |
0112: GOTO 114 |
575 |
0113: BSF 08.4 |
575 |
0113: BSF 08.4 |
576 |
0114: BSF 03.5 |
576 |
0114: BSF 03.5 |
577 |
0115: BCF 08.4 |
577 |
0115: BCF 08.4 |
578 |
.................... output_bit(LCD_DATA5, bit_test(n, 1)); |
578 |
.................... output_bit(LCD_DATA5, bit_test(n, 1)); |
579 |
0116: BCF 03.5 |
579 |
0116: BCF 03.5 |
580 |
0117: BTFSC 4A.1 |
580 |
0117: BTFSC 52.1 |
581 |
0118: GOTO 11B |
581 |
0118: GOTO 11B |
582 |
0119: BCF 08.5 |
582 |
0119: BCF 08.5 |
583 |
011A: GOTO 11C |
583 |
011A: GOTO 11C |
584 |
011B: BSF 08.5 |
584 |
011B: BSF 08.5 |
585 |
011C: BSF 03.5 |
585 |
011C: BSF 03.5 |
586 |
011D: BCF 08.5 |
586 |
011D: BCF 08.5 |
587 |
.................... output_bit(LCD_DATA6, bit_test(n, 2)); |
587 |
.................... output_bit(LCD_DATA6, bit_test(n, 2)); |
588 |
011E: BCF 03.5 |
588 |
011E: BCF 03.5 |
589 |
011F: BTFSC 4A.2 |
589 |
011F: BTFSC 52.2 |
590 |
0120: GOTO 123 |
590 |
0120: GOTO 123 |
591 |
0121: BCF 08.6 |
591 |
0121: BCF 08.6 |
592 |
0122: GOTO 124 |
592 |
0122: GOTO 124 |
593 |
0123: BSF 08.6 |
593 |
0123: BSF 08.6 |
594 |
0124: BSF 03.5 |
594 |
0124: BSF 03.5 |
595 |
0125: BCF 08.6 |
595 |
0125: BCF 08.6 |
596 |
.................... output_bit(LCD_DATA7, bit_test(n, 3)); |
596 |
.................... output_bit(LCD_DATA7, bit_test(n, 3)); |
597 |
0126: BCF 03.5 |
597 |
0126: BCF 03.5 |
598 |
0127: BTFSC 4A.3 |
598 |
0127: BTFSC 52.3 |
599 |
0128: GOTO 12B |
599 |
0128: GOTO 12B |
600 |
0129: BCF 08.7 |
600 |
0129: BCF 08.7 |
601 |
012A: GOTO 12C |
601 |
012A: GOTO 12C |
602 |
012B: BSF 08.7 |
602 |
012B: BSF 08.7 |
603 |
012C: BSF 03.5 |
603 |
012C: BSF 03.5 |
Line 646... |
Line 646... |
646 |
0172: BSF 03.5 |
646 |
0172: BSF 03.5 |
647 |
0173: BCF 09.1 |
647 |
0173: BCF 09.1 |
648 |
.................... while ( bit_test(lcd_read_byte(),7) ) ; |
648 |
.................... while ( bit_test(lcd_read_byte(),7) ) ; |
649 |
* |
649 |
* |
650 |
01A2: MOVF 78,W |
650 |
01A2: MOVF 78,W |
651 |
01A3: MOVWF 49 |
651 |
01A3: MOVWF 51 |
652 |
01A4: BTFSS 49.7 |
652 |
01A4: BTFSS 51.7 |
653 |
01A5: GOTO 1A8 |
653 |
01A5: GOTO 1A8 |
654 |
01A6: BSF 03.5 |
654 |
01A6: BSF 03.5 |
655 |
01A7: GOTO 174 |
655 |
01A7: GOTO 174 |
656 |
.................... lcd_output_rs(address); |
656 |
.................... lcd_output_rs(address); |
657 |
01A8: MOVF 47,F |
657 |
01A8: MOVF 4F,F |
658 |
01A9: BTFSS 03.2 |
658 |
01A9: BTFSS 03.2 |
659 |
01AA: GOTO 1AD |
659 |
01AA: GOTO 1AD |
660 |
01AB: BCF 09.1 |
660 |
01AB: BCF 09.1 |
661 |
01AC: GOTO 1AE |
661 |
01AC: GOTO 1AE |
662 |
01AD: BSF 09.1 |
662 |
01AD: BSF 09.1 |
Line 676... |
Line 676... |
676 |
01B7: BCF 09.0 |
676 |
01B7: BCF 09.0 |
677 |
01B8: BSF 03.5 |
677 |
01B8: BSF 03.5 |
678 |
01B9: BCF 09.0 |
678 |
01B9: BCF 09.0 |
679 |
.................... lcd_send_nibble(n >> 4); |
679 |
.................... lcd_send_nibble(n >> 4); |
680 |
01BA: BCF 03.5 |
680 |
01BA: BCF 03.5 |
681 |
01BB: SWAPF 48,W |
681 |
01BB: SWAPF 50,W |
682 |
01BC: MOVWF 49 |
682 |
01BC: MOVWF 51 |
683 |
01BD: MOVLW 0F |
683 |
01BD: MOVLW 0F |
684 |
01BE: ANDWF 49,F |
684 |
01BE: ANDWF 51,F |
685 |
01BF: MOVF 49,W |
685 |
01BF: MOVF 51,W |
686 |
01C0: MOVWF 4A |
686 |
01C0: MOVWF 52 |
687 |
01C1: CALL 10F |
687 |
01C1: CALL 10F |
688 |
.................... lcd_send_nibble(n & 0xf); |
688 |
.................... lcd_send_nibble(n & 0xf); |
689 |
01C2: MOVF 48,W |
689 |
01C2: MOVF 50,W |
690 |
01C3: ANDLW 0F |
690 |
01C3: ANDLW 0F |
691 |
01C4: MOVWF 49 |
691 |
01C4: MOVWF 51 |
692 |
01C5: MOVWF 4A |
692 |
01C5: MOVWF 52 |
693 |
01C6: CALL 10F |
693 |
01C6: CALL 10F |
694 |
.................... } |
694 |
.................... } |
695 |
01C7: RETURN |
695 |
01C7: RETURN |
696 |
.................... |
696 |
.................... |
697 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
697 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
Line 743... |
Line 743... |
743 |
01DB: BCF 09.0 |
743 |
01DB: BCF 09.0 |
744 |
.................... |
744 |
.................... |
745 |
.................... delay_ms(15); |
745 |
.................... delay_ms(15); |
746 |
01DC: MOVLW 0F |
746 |
01DC: MOVLW 0F |
747 |
01DD: BCF 03.5 |
747 |
01DD: BCF 03.5 |
748 |
01DE: MOVWF 43 |
748 |
01DE: MOVWF 4B |
749 |
01DF: CALL 0FB |
749 |
01DF: CALL 0FB |
750 |
.................... for(i=1;i<=3;++i) |
750 |
.................... for(i=1;i<=3;++i) |
751 |
01E0: MOVLW 01 |
751 |
01E0: MOVLW 01 |
752 |
01E1: MOVWF 35 |
752 |
01E1: MOVWF 3D |
753 |
01E2: MOVF 35,W |
753 |
01E2: MOVF 3D,W |
754 |
01E3: SUBLW 03 |
754 |
01E3: SUBLW 03 |
755 |
01E4: BTFSS 03.0 |
755 |
01E4: BTFSS 03.0 |
756 |
01E5: GOTO 1EE |
756 |
01E5: GOTO 1EE |
757 |
.................... { |
757 |
.................... { |
758 |
.................... lcd_send_nibble(3); |
758 |
.................... lcd_send_nibble(3); |
759 |
01E6: MOVLW 03 |
759 |
01E6: MOVLW 03 |
760 |
01E7: MOVWF 4A |
760 |
01E7: MOVWF 52 |
761 |
01E8: CALL 10F |
761 |
01E8: CALL 10F |
762 |
.................... delay_ms(5); |
762 |
.................... delay_ms(5); |
763 |
01E9: MOVLW 05 |
763 |
01E9: MOVLW 05 |
764 |
01EA: MOVWF 43 |
764 |
01EA: MOVWF 4B |
765 |
01EB: CALL 0FB |
765 |
01EB: CALL 0FB |
766 |
.................... } |
766 |
.................... } |
767 |
01EC: INCF 35,F |
767 |
01EC: INCF 3D,F |
768 |
01ED: GOTO 1E2 |
768 |
01ED: GOTO 1E2 |
769 |
.................... |
769 |
.................... |
770 |
.................... lcd_send_nibble(2); |
770 |
.................... lcd_send_nibble(2); |
771 |
01EE: MOVLW 02 |
771 |
01EE: MOVLW 02 |
772 |
01EF: MOVWF 4A |
772 |
01EF: MOVWF 52 |
773 |
01F0: CALL 10F |
773 |
01F0: CALL 10F |
774 |
.................... for(i=0;i<=3;++i) |
774 |
.................... for(i=0;i<=3;++i) |
775 |
01F1: CLRF 35 |
775 |
01F1: CLRF 3D |
776 |
01F2: MOVF 35,W |
776 |
01F2: MOVF 3D,W |
777 |
01F3: SUBLW 03 |
777 |
01F3: SUBLW 03 |
778 |
01F4: BTFSS 03.0 |
778 |
01F4: BTFSS 03.0 |
779 |
01F5: GOTO 1FF |
779 |
01F5: GOTO 1FF |
780 |
.................... lcd_send_byte(0,LCD_INIT_STRING[i]); |
780 |
.................... lcd_send_byte(0,LCD_INIT_STRING[i]); |
781 |
01F6: MOVF 35,W |
781 |
01F6: MOVF 3D,W |
782 |
01F7: CALL 004 |
782 |
01F7: CALL 004 |
783 |
01F8: MOVWF 36 |
783 |
01F8: MOVWF 3E |
784 |
01F9: CLRF 47 |
784 |
01F9: CLRF 4F |
785 |
01FA: MOVF 36,W |
785 |
01FA: MOVF 3E,W |
786 |
01FB: MOVWF 48 |
786 |
01FB: MOVWF 50 |
787 |
01FC: CALL 16C |
787 |
01FC: CALL 16C |
788 |
.................... |
788 |
.................... |
789 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
789 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
790 |
01FD: INCF 35,F |
790 |
01FD: INCF 3D,F |
791 |
01FE: GOTO 1F2 |
791 |
01FE: GOTO 1F2 |
792 |
.................... g_LcdX = 0; |
792 |
.................... g_LcdX = 0; |
793 |
.................... g_LcdY = 0; |
793 |
.................... g_LcdY = 0; |
794 |
.................... #endif |
794 |
.................... #endif |
795 |
.................... } |
795 |
.................... } |
Line 798... |
Line 798... |
798 |
.................... void lcd_gotoxy(BYTE x, BYTE y) |
798 |
.................... void lcd_gotoxy(BYTE x, BYTE y) |
799 |
.................... { |
799 |
.................... { |
800 |
.................... BYTE address; |
800 |
.................... BYTE address; |
801 |
.................... |
801 |
.................... |
802 |
.................... if(y!=1) |
802 |
.................... if(y!=1) |
803 |
0200: DECFSZ 44,W |
803 |
0200: DECFSZ 4C,W |
804 |
0201: GOTO 203 |
804 |
0201: GOTO 203 |
805 |
0202: GOTO 206 |
805 |
0202: GOTO 206 |
806 |
.................... address=LCD_LINE_TWO; |
806 |
.................... address=LCD_LINE_TWO; |
807 |
0203: MOVLW 40 |
807 |
0203: MOVLW 40 |
808 |
0204: MOVWF 45 |
808 |
0204: MOVWF 4D |
809 |
.................... else |
809 |
.................... else |
810 |
0205: GOTO 207 |
810 |
0205: GOTO 207 |
811 |
.................... address=0; |
811 |
.................... address=0; |
812 |
0206: CLRF 45 |
812 |
0206: CLRF 4D |
813 |
.................... |
813 |
.................... |
814 |
.................... address+=x-1; |
814 |
.................... address+=x-1; |
815 |
0207: MOVLW 01 |
815 |
0207: MOVLW 01 |
816 |
0208: SUBWF 43,W |
816 |
0208: SUBWF 4B,W |
817 |
0209: ADDWF 45,F |
817 |
0209: ADDWF 4D,F |
818 |
.................... lcd_send_byte(0,0x80|address); |
818 |
.................... lcd_send_byte(0,0x80|address); |
819 |
020A: MOVF 45,W |
819 |
020A: MOVF 4D,W |
820 |
020B: IORLW 80 |
820 |
020B: IORLW 80 |
821 |
020C: MOVWF 46 |
821 |
020C: MOVWF 4E |
822 |
020D: CLRF 47 |
822 |
020D: CLRF 4F |
823 |
020E: MOVF 46,W |
823 |
020E: MOVF 4E,W |
824 |
020F: MOVWF 48 |
824 |
020F: MOVWF 50 |
825 |
0210: CALL 16C |
825 |
0210: CALL 16C |
826 |
.................... |
826 |
.................... |
827 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
827 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
828 |
.................... g_LcdX = x - 1; |
828 |
.................... g_LcdX = x - 1; |
829 |
.................... g_LcdY = y - 1; |
829 |
.................... g_LcdY = y - 1; |
Line 833... |
Line 833... |
833 |
.................... |
833 |
.................... |
834 |
.................... void lcd_putc(char c) |
834 |
.................... void lcd_putc(char c) |
835 |
.................... { |
835 |
.................... { |
836 |
.................... switch (c) |
836 |
.................... switch (c) |
837 |
.................... { |
837 |
.................... { |
838 |
0212: MOVF 42,W |
838 |
0212: MOVF 4A,W |
839 |
0213: XORLW 07 |
839 |
0213: XORLW 07 |
840 |
0214: BTFSC 03.2 |
840 |
0214: BTFSC 03.2 |
841 |
0215: GOTO 220 |
841 |
0215: GOTO 220 |
842 |
0216: XORLW 0B |
842 |
0216: XORLW 0B |
843 |
0217: BTFSC 03.2 |
843 |
0217: BTFSC 03.2 |
Line 849... |
Line 849... |
849 |
021D: BTFSC 03.2 |
849 |
021D: BTFSC 03.2 |
850 |
021E: GOTO 233 |
850 |
021E: GOTO 233 |
851 |
021F: GOTO 238 |
851 |
021F: GOTO 238 |
852 |
.................... case '\a' : lcd_gotoxy(1,1); break; |
852 |
.................... case '\a' : lcd_gotoxy(1,1); break; |
853 |
0220: MOVLW 01 |
853 |
0220: MOVLW 01 |
854 |
0221: MOVWF 43 |
854 |
0221: MOVWF 4B |
855 |
0222: MOVWF 44 |
855 |
0222: MOVWF 4C |
856 |
0223: CALL 200 |
856 |
0223: CALL 200 |
857 |
0224: GOTO 23E |
857 |
0224: GOTO 23E |
858 |
.................... |
858 |
.................... |
859 |
.................... case '\f' : lcd_send_byte(0,1); |
859 |
.................... case '\f' : lcd_send_byte(0,1); |
860 |
0225: CLRF 47 |
860 |
0225: CLRF 4F |
861 |
0226: MOVLW 01 |
861 |
0226: MOVLW 01 |
862 |
0227: MOVWF 48 |
862 |
0227: MOVWF 50 |
863 |
0228: CALL 16C |
863 |
0228: CALL 16C |
864 |
.................... delay_ms(2); |
864 |
.................... delay_ms(2); |
865 |
0229: MOVLW 02 |
865 |
0229: MOVLW 02 |
866 |
022A: MOVWF 43 |
866 |
022A: MOVWF 4B |
867 |
022B: CALL 0FB |
867 |
022B: CALL 0FB |
868 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
868 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
869 |
.................... g_LcdX = 0; |
869 |
.................... g_LcdX = 0; |
870 |
.................... g_LcdY = 0; |
870 |
.................... g_LcdY = 0; |
871 |
.................... #endif |
871 |
.................... #endif |
Line 882... |
Line 882... |
882 |
.................... lcd_gotoxy(1, g_LcdY+2); |
882 |
.................... lcd_gotoxy(1, g_LcdY+2); |
883 |
.................... break; |
883 |
.................... break; |
884 |
.................... #else |
884 |
.................... #else |
885 |
.................... case '\n' : lcd_gotoxy(1,2); break; |
885 |
.................... case '\n' : lcd_gotoxy(1,2); break; |
886 |
022D: MOVLW 01 |
886 |
022D: MOVLW 01 |
887 |
022E: MOVWF 43 |
887 |
022E: MOVWF 4B |
888 |
022F: MOVLW 02 |
888 |
022F: MOVLW 02 |
889 |
0230: MOVWF 44 |
889 |
0230: MOVWF 4C |
890 |
0231: CALL 200 |
890 |
0231: CALL 200 |
891 |
0232: GOTO 23E |
891 |
0232: GOTO 23E |
892 |
.................... #endif |
892 |
.................... #endif |
893 |
.................... |
893 |
.................... |
894 |
.................... case '\b' : lcd_send_byte(0,0x10); break; |
894 |
.................... case '\b' : lcd_send_byte(0,0x10); break; |
895 |
0233: CLRF 47 |
895 |
0233: CLRF 4F |
896 |
0234: MOVLW 10 |
896 |
0234: MOVLW 10 |
897 |
0235: MOVWF 48 |
897 |
0235: MOVWF 50 |
898 |
0236: CALL 16C |
898 |
0236: CALL 16C |
899 |
0237: GOTO 23E |
899 |
0237: GOTO 23E |
900 |
.................... |
900 |
.................... |
901 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
901 |
.................... #if defined(LCD_EXTENDED_NEWLINE) |
902 |
.................... default : |
902 |
.................... default : |
Line 907... |
Line 907... |
907 |
.................... } |
907 |
.................... } |
908 |
.................... break; |
908 |
.................... break; |
909 |
.................... #else |
909 |
.................... #else |
910 |
.................... default : lcd_send_byte(1,c); break; |
910 |
.................... default : lcd_send_byte(1,c); break; |
911 |
0238: MOVLW 01 |
911 |
0238: MOVLW 01 |
912 |
0239: MOVWF 47 |
912 |
0239: MOVWF 4F |
913 |
023A: MOVF 42,W |
913 |
023A: MOVF 4A,W |
914 |
023B: MOVWF 48 |
914 |
023B: MOVWF 50 |
915 |
023C: CALL 16C |
915 |
023C: CALL 16C |
916 |
023D: GOTO 23E |
916 |
023D: GOTO 23E |
917 |
.................... #endif |
917 |
.................... #endif |
918 |
.................... } |
918 |
.................... } |
919 |
.................... } |
919 |
.................... } |
Line 1022... |
Line 1022... |
1022 |
057F: BSF 03.5 |
1022 |
057F: BSF 03.5 |
1023 |
0580: MOVWF 07 |
1023 |
0580: MOVWF 07 |
1024 |
.................... I2C_Write(SHT25_ADDR); |
1024 |
.................... I2C_Write(SHT25_ADDR); |
1025 |
0581: MOVLW 80 |
1025 |
0581: MOVLW 80 |
1026 |
0582: BCF 03.5 |
1026 |
0582: BCF 03.5 |
1027 |
0583: MOVWF 3B |
1027 |
0583: MOVWF 4E |
1028 |
0584: CALL 078 |
1028 |
0584: CALL 078 |
1029 |
.................... I2C_write(0xE3); |
1029 |
.................... I2C_write(0xE3); |
1030 |
0585: MOVLW E3 |
1030 |
0585: MOVLW E3 |
1031 |
0586: MOVWF 3B |
1031 |
0586: MOVWF 4E |
1032 |
0587: CALL 078 |
1032 |
0587: CALL 078 |
1033 |
.................... i2c_stop(); |
1033 |
.................... i2c_stop(); |
1034 |
0588: BCF 20.4 |
1034 |
0588: BCF 20.4 |
1035 |
0589: MOVF 20,W |
1035 |
0589: MOVF 20,W |
1036 |
058A: BSF 03.5 |
1036 |
058A: BSF 03.5 |
Line 1054... |
Line 1054... |
1054 |
059C: NOP |
1054 |
059C: NOP |
1055 |
.................... |
1055 |
.................... |
1056 |
.................... delay_ms(100); |
1056 |
.................... delay_ms(100); |
1057 |
059D: MOVLW 64 |
1057 |
059D: MOVLW 64 |
1058 |
059E: BCF 03.5 |
1058 |
059E: BCF 03.5 |
1059 |
059F: MOVWF 43 |
1059 |
059F: MOVWF 4B |
1060 |
05A0: CALL 0FB |
1060 |
05A0: CALL 0FB |
1061 |
.................... |
1061 |
.................... |
1062 |
.................... i2c_start(); |
1062 |
.................... i2c_start(); |
1063 |
05A1: BSF 20.4 |
1063 |
05A1: BSF 20.4 |
1064 |
05A2: MOVF 20,W |
1064 |
05A2: MOVF 20,W |
Line 1085... |
Line 1085... |
1085 |
05B7: BSF 03.5 |
1085 |
05B7: BSF 03.5 |
1086 |
05B8: MOVWF 07 |
1086 |
05B8: MOVWF 07 |
1087 |
.................... I2C_Write(SHT25_ADDR+1); |
1087 |
.................... I2C_Write(SHT25_ADDR+1); |
1088 |
05B9: MOVLW 81 |
1088 |
05B9: MOVLW 81 |
1089 |
05BA: BCF 03.5 |
1089 |
05BA: BCF 03.5 |
1090 |
05BB: MOVWF 3B |
1090 |
05BB: MOVWF 4E |
1091 |
05BC: CALL 078 |
1091 |
05BC: CALL 078 |
1092 |
.................... MSB=i2c_read(1); |
1092 |
.................... MSB=i2c_read(1); |
1093 |
05BD: MOVLW 01 |
1093 |
05BD: MOVLW 01 |
1094 |
05BE: MOVWF 77 |
1094 |
05BE: MOVWF 77 |
1095 |
05BF: CALL 285 |
1095 |
05BF: CALL 285 |
1096 |
05C0: MOVF 78,W |
1096 |
05C0: MOVF 78,W |
1097 |
05C1: MOVWF 35 |
1097 |
05C1: MOVWF 3D |
1098 |
.................... LSB=i2c_read(1); |
1098 |
.................... LSB=i2c_read(1); |
1099 |
05C2: MOVLW 01 |
1099 |
05C2: MOVLW 01 |
1100 |
05C3: MOVWF 77 |
1100 |
05C3: MOVWF 77 |
1101 |
05C4: CALL 285 |
1101 |
05C4: CALL 285 |
1102 |
05C5: MOVF 78,W |
1102 |
05C5: MOVF 78,W |
1103 |
05C6: MOVWF 36 |
1103 |
05C6: MOVWF 3E |
1104 |
.................... Check=i2c_read(0); |
1104 |
.................... Check=i2c_read(0); |
1105 |
05C7: CLRF 77 |
1105 |
05C7: CLRF 77 |
1106 |
05C8: CALL 285 |
1106 |
05C8: CALL 285 |
1107 |
05C9: MOVF 78,W |
1107 |
05C9: MOVF 78,W |
1108 |
05CA: MOVWF 37 |
1108 |
05CA: MOVWF 3F |
1109 |
.................... i2c_stop(); |
1109 |
.................... i2c_stop(); |
1110 |
05CB: BCF 20.4 |
1110 |
05CB: BCF 20.4 |
1111 |
05CC: MOVF 20,W |
1111 |
05CC: MOVF 20,W |
1112 |
05CD: BSF 03.5 |
1112 |
05CD: BSF 03.5 |
1113 |
05CE: MOVWF 07 |
1113 |
05CE: MOVWF 07 |
Line 1129... |
Line 1129... |
1129 |
05DE: MOVWF 07 |
1129 |
05DE: MOVWF 07 |
1130 |
05DF: NOP |
1130 |
05DF: NOP |
1131 |
.................... |
1131 |
.................... |
1132 |
.................... LSB = LSB >> 2; // trow out status bits |
1132 |
.................... LSB = LSB >> 2; // trow out status bits |
1133 |
05E0: BCF 03.5 |
1133 |
05E0: BCF 03.5 |
1134 |
05E1: RRF 36,F |
1134 |
05E1: RRF 3E,F |
1135 |
05E2: RRF 36,F |
1135 |
05E2: RRF 3E,F |
1136 |
05E3: MOVLW 3F |
1136 |
05E3: MOVLW 3F |
1137 |
05E4: ANDWF 36,F |
1137 |
05E4: ANDWF 3E,F |
1138 |
.................... |
1138 |
.................... |
1139 |
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4)); |
1139 |
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4)); |
1140 |
05E5: CLRF 3B |
1140 |
05E5: CLRF 43 |
1141 |
05E6: MOVF 35,W |
1141 |
05E6: MOVF 3D,W |
1142 |
05E7: MOVWF 3A |
1142 |
05E7: MOVWF 42 |
1143 |
05E8: MOVWF 3B |
1143 |
05E8: MOVWF 43 |
1144 |
05E9: CLRF 3A |
1144 |
05E9: CLRF 42 |
1145 |
05EA: SWAPF 36,W |
1145 |
05EA: SWAPF 3E,W |
1146 |
05EB: MOVWF 77 |
1146 |
05EB: MOVWF 77 |
1147 |
05EC: MOVLW F0 |
1147 |
05EC: MOVLW F0 |
1148 |
05ED: ANDWF 77,F |
1148 |
05ED: ANDWF 77,F |
1149 |
05EE: MOVF 77,W |
1149 |
05EE: MOVF 77,W |
1150 |
05EF: ADDWF 3A,W |
1150 |
05EF: ADDWF 42,W |
1151 |
05F0: MOVWF 38 |
1151 |
05F0: MOVWF 40 |
1152 |
05F1: MOVF 3B,W |
1152 |
05F1: MOVF 43,W |
1153 |
05F2: MOVWF 39 |
1153 |
05F2: MOVWF 41 |
1154 |
05F3: BTFSC 03.0 |
1154 |
05F3: BTFSC 03.0 |
1155 |
05F4: INCF 39,F |
1155 |
05F4: INCF 41,F |
1156 |
.................... return(-46.85 + 175.72*((float)data/0xFFFF)); |
1156 |
.................... return(-46.85 + 175.72*((float)data/0xFFFF)); |
1157 |
05F5: MOVF 39,W |
1157 |
05F5: MOVF 41,W |
1158 |
05F6: MOVWF 3B |
1158 |
05F6: MOVWF 4E |
1159 |
05F7: MOVF 38,W |
1159 |
05F7: MOVF 40,W |
1160 |
05F8: MOVWF 3A |
1160 |
05F8: MOVWF 4D |
1161 |
05F9: CALL 2CA |
1161 |
05F9: CALL 2CA |
1162 |
05FA: MOVF 77,W |
1162 |
05FA: MOVF 77,W |
1163 |
05FB: MOVWF 3A |
1163 |
05FB: MOVWF 42 |
1164 |
05FC: MOVF 78,W |
1164 |
05FC: MOVF 78,W |
1165 |
05FD: MOVWF 3B |
1165 |
05FD: MOVWF 43 |
1166 |
05FE: MOVF 79,W |
1166 |
05FE: MOVF 79,W |
1167 |
05FF: MOVWF 3C |
1167 |
05FF: MOVWF 44 |
1168 |
0600: MOVF 7A,W |
1168 |
0600: MOVF 7A,W |
1169 |
0601: MOVWF 3D |
1169 |
0601: MOVWF 45 |
1170 |
0602: MOVWF 41 |
1170 |
0602: MOVWF 54 |
1171 |
0603: MOVF 79,W |
1171 |
0603: MOVF 79,W |
1172 |
0604: MOVWF 40 |
1172 |
0604: MOVWF 53 |
1173 |
0605: MOVF 78,W |
1173 |
0605: MOVF 78,W |
1174 |
0606: MOVWF 3F |
1174 |
0606: MOVWF 52 |
1175 |
0607: MOVF 77,W |
1175 |
0607: MOVF 77,W |
1176 |
0608: MOVWF 3E |
1176 |
0608: MOVWF 51 |
1177 |
0609: CLRF 45 |
1177 |
0609: CLRF 58 |
1178 |
060A: MOVLW FF |
1178 |
060A: MOVLW FF |
1179 |
060B: MOVWF 44 |
1179 |
060B: MOVWF 57 |
1180 |
060C: MOVLW 7F |
1180 |
060C: MOVLW 7F |
1181 |
060D: MOVWF 43 |
1181 |
060D: MOVWF 56 |
1182 |
060E: MOVLW 8E |
1182 |
060E: MOVLW 8E |
1183 |
060F: MOVWF 42 |
1183 |
060F: MOVWF 55 |
1184 |
0610: CALL 2E7 |
1184 |
0610: CALL 2E7 |
1185 |
0611: MOVLW 52 |
1185 |
0611: MOVLW 52 |
1186 |
0612: MOVWF 45 |
1186 |
0612: MOVWF 4D |
1187 |
0613: MOVLW B8 |
1187 |
0613: MOVLW B8 |
1188 |
0614: MOVWF 44 |
1188 |
0614: MOVWF 4C |
1189 |
0615: MOVLW 2F |
1189 |
0615: MOVLW 2F |
1190 |
0616: MOVWF 43 |
1190 |
0616: MOVWF 4B |
1191 |
0617: MOVLW 86 |
1191 |
0617: MOVLW 86 |
1192 |
0618: MOVWF 42 |
1192 |
0618: MOVWF 4A |
1193 |
0619: MOVF 7A,W |
1193 |
0619: MOVF 7A,W |
1194 |
061A: MOVWF 49 |
1194 |
061A: MOVWF 51 |
1195 |
061B: MOVF 79,W |
1195 |
061B: MOVF 79,W |
1196 |
061C: MOVWF 48 |
1196 |
061C: MOVWF 50 |
1197 |
061D: MOVF 78,W |
1197 |
061D: MOVF 78,W |
1198 |
061E: MOVWF 47 |
1198 |
061E: MOVWF 4F |
1199 |
061F: MOVF 77,W |
1199 |
061F: MOVF 77,W |
1200 |
0620: MOVWF 46 |
1200 |
0620: MOVWF 4E |
1201 |
0621: CALL 3B1 |
1201 |
0621: CALL 3B1 |
1202 |
0622: BCF 03.1 |
1202 |
0622: BCF 03.1 |
1203 |
0623: MOVLW 66 |
1203 |
0623: MOVLW 66 |
1204 |
0624: MOVWF 3D |
1204 |
0624: MOVWF 56 |
1205 |
0625: MOVWF 3C |
1205 |
0625: MOVWF 55 |
1206 |
0626: MOVLW BB |
1206 |
0626: MOVLW BB |
1207 |
0627: MOVWF 3B |
1207 |
0627: MOVWF 54 |
1208 |
0628: MOVLW 84 |
1208 |
0628: MOVLW 84 |
1209 |
0629: MOVWF 3A |
1209 |
0629: MOVWF 53 |
1210 |
062A: MOVF 7A,W |
1210 |
062A: MOVF 7A,W |
1211 |
062B: MOVWF 41 |
1211 |
062B: MOVWF 5A |
1212 |
062C: MOVF 79,W |
1212 |
062C: MOVF 79,W |
1213 |
062D: MOVWF 40 |
1213 |
062D: MOVWF 59 |
1214 |
062E: MOVF 78,W |
1214 |
062E: MOVF 78,W |
1215 |
062F: MOVWF 3F |
1215 |
062F: MOVWF 58 |
1216 |
0630: MOVF 77,W |
1216 |
0630: MOVF 77,W |
1217 |
0631: MOVWF 3E |
1217 |
0631: MOVWF 57 |
1218 |
0632: CALL 426 |
1218 |
0632: CALL 426 |
1219 |
.................... } |
1219 |
.................... } |
1220 |
0633: BSF 0A.3 |
1220 |
0633: BSF 0A.3 |
1221 |
0634: BCF 0A.4 |
1221 |
0634: BCF 0A.4 |
1222 |
0635: GOTO 38B (RETURN) |
1222 |
0635: GOTO 5B9 (RETURN) |
1223 |
.................... |
1223 |
.................... |
1224 |
.................... float SHT25_get_hum() |
1224 |
.................... float SHT25_get_hum() |
1225 |
.................... { |
1225 |
.................... { |
1226 |
.................... unsigned int8 MSB, LSB, Check; |
1226 |
.................... unsigned int8 MSB, LSB, Check; |
1227 |
.................... unsigned int16 data; |
1227 |
.................... unsigned int16 data; |
Line 1252... |
Line 1252... |
1252 |
064C: BSF 03.5 |
1252 |
064C: BSF 03.5 |
1253 |
064D: MOVWF 07 |
1253 |
064D: MOVWF 07 |
1254 |
.................... I2C_Write(SHT25_ADDR); |
1254 |
.................... I2C_Write(SHT25_ADDR); |
1255 |
064E: MOVLW 80 |
1255 |
064E: MOVLW 80 |
1256 |
064F: BCF 03.5 |
1256 |
064F: BCF 03.5 |
1257 |
0650: MOVWF 3B |
1257 |
0650: MOVWF 4E |
1258 |
0651: CALL 078 |
1258 |
0651: CALL 078 |
1259 |
.................... I2C_write(0xE5); |
1259 |
.................... I2C_write(0xE5); |
1260 |
0652: MOVLW E5 |
1260 |
0652: MOVLW E5 |
1261 |
0653: MOVWF 3B |
1261 |
0653: MOVWF 4E |
1262 |
0654: CALL 078 |
1262 |
0654: CALL 078 |
1263 |
.................... |
1263 |
.................... |
1264 |
.................... delay_ms(100); |
1264 |
.................... delay_ms(100); |
1265 |
0655: MOVLW 64 |
1265 |
0655: MOVLW 64 |
1266 |
0656: MOVWF 43 |
1266 |
0656: MOVWF 4B |
1267 |
0657: CALL 0FB |
1267 |
0657: CALL 0FB |
1268 |
.................... |
1268 |
.................... |
1269 |
.................... i2c_start(); |
1269 |
.................... i2c_start(); |
1270 |
0658: BSF 20.4 |
1270 |
0658: BSF 20.4 |
1271 |
0659: MOVF 20,W |
1271 |
0659: MOVF 20,W |
Line 1294... |
Line 1294... |
1294 |
0670: BSF 03.5 |
1294 |
0670: BSF 03.5 |
1295 |
0671: MOVWF 07 |
1295 |
0671: MOVWF 07 |
1296 |
.................... I2C_Write(SHT25_ADDR+1); |
1296 |
.................... I2C_Write(SHT25_ADDR+1); |
1297 |
0672: MOVLW 81 |
1297 |
0672: MOVLW 81 |
1298 |
0673: BCF 03.5 |
1298 |
0673: BCF 03.5 |
1299 |
0674: MOVWF 3B |
1299 |
0674: MOVWF 4E |
1300 |
0675: CALL 078 |
1300 |
0675: CALL 078 |
1301 |
.................... MSB=i2c_read(1); |
1301 |
.................... MSB=i2c_read(1); |
1302 |
0676: MOVLW 01 |
1302 |
0676: MOVLW 01 |
1303 |
0677: MOVWF 77 |
1303 |
0677: MOVWF 77 |
1304 |
0678: CALL 285 |
1304 |
0678: CALL 285 |
1305 |
0679: MOVF 78,W |
1305 |
0679: MOVF 78,W |
1306 |
067A: MOVWF 35 |
1306 |
067A: MOVWF 3D |
1307 |
.................... LSB=i2c_read(1); |
1307 |
.................... LSB=i2c_read(1); |
1308 |
067B: MOVLW 01 |
1308 |
067B: MOVLW 01 |
1309 |
067C: MOVWF 77 |
1309 |
067C: MOVWF 77 |
1310 |
067D: CALL 285 |
1310 |
067D: CALL 285 |
1311 |
067E: MOVF 78,W |
1311 |
067E: MOVF 78,W |
1312 |
067F: MOVWF 36 |
1312 |
067F: MOVWF 3E |
1313 |
.................... Check=i2c_read(0); |
1313 |
.................... Check=i2c_read(0); |
1314 |
0680: CLRF 77 |
1314 |
0680: CLRF 77 |
1315 |
0681: CALL 285 |
1315 |
0681: CALL 285 |
1316 |
0682: MOVF 78,W |
1316 |
0682: MOVF 78,W |
1317 |
0683: MOVWF 37 |
1317 |
0683: MOVWF 3F |
1318 |
.................... i2c_stop(); |
1318 |
.................... i2c_stop(); |
1319 |
0684: BCF 20.4 |
1319 |
0684: BCF 20.4 |
1320 |
0685: MOVF 20,W |
1320 |
0685: MOVF 20,W |
1321 |
0686: BSF 03.5 |
1321 |
0686: BSF 03.5 |
1322 |
0687: MOVWF 07 |
1322 |
0687: MOVWF 07 |
Line 1338... |
Line 1338... |
1338 |
0697: MOVWF 07 |
1338 |
0697: MOVWF 07 |
1339 |
0698: NOP |
1339 |
0698: NOP |
1340 |
.................... |
1340 |
.................... |
1341 |
.................... LSB = LSB >> 2; // trow out status bits |
1341 |
.................... LSB = LSB >> 2; // trow out status bits |
1342 |
0699: BCF 03.5 |
1342 |
0699: BCF 03.5 |
1343 |
069A: RRF 36,F |
1343 |
069A: RRF 3E,F |
1344 |
069B: RRF 36,F |
1344 |
069B: RRF 3E,F |
1345 |
069C: MOVLW 3F |
1345 |
069C: MOVLW 3F |
1346 |
069D: ANDWF 36,F |
1346 |
069D: ANDWF 3E,F |
1347 |
.................... |
1347 |
.................... |
1348 |
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4) ); |
1348 |
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4) ); |
1349 |
069E: CLRF 3B |
1349 |
069E: CLRF 43 |
1350 |
069F: MOVF 35,W |
1350 |
069F: MOVF 3D,W |
1351 |
06A0: MOVWF 3A |
1351 |
06A0: MOVWF 42 |
1352 |
06A1: MOVWF 3B |
1352 |
06A1: MOVWF 43 |
1353 |
06A2: CLRF 3A |
1353 |
06A2: CLRF 42 |
1354 |
06A3: SWAPF 36,W |
1354 |
06A3: SWAPF 3E,W |
1355 |
06A4: MOVWF 77 |
1355 |
06A4: MOVWF 77 |
1356 |
06A5: MOVLW F0 |
1356 |
06A5: MOVLW F0 |
1357 |
06A6: ANDWF 77,F |
1357 |
06A6: ANDWF 77,F |
1358 |
06A7: MOVF 77,W |
1358 |
06A7: MOVF 77,W |
1359 |
06A8: ADDWF 3A,W |
1359 |
06A8: ADDWF 42,W |
1360 |
06A9: MOVWF 38 |
1360 |
06A9: MOVWF 40 |
1361 |
06AA: MOVF 3B,W |
1361 |
06AA: MOVF 43,W |
1362 |
06AB: MOVWF 39 |
1362 |
06AB: MOVWF 41 |
1363 |
06AC: BTFSC 03.0 |
1363 |
06AC: BTFSC 03.0 |
1364 |
06AD: INCF 39,F |
1364 |
06AD: INCF 41,F |
1365 |
.................... return( -6.0 + 125.0*((float)data/0xFFFF)); |
1365 |
.................... return( -6.0 + 125.0*((float)data/0xFFFF)); |
1366 |
06AE: MOVF 39,W |
1366 |
06AE: MOVF 41,W |
1367 |
06AF: MOVWF 3B |
1367 |
06AF: MOVWF 4E |
1368 |
06B0: MOVF 38,W |
1368 |
06B0: MOVF 40,W |
1369 |
06B1: MOVWF 3A |
1369 |
06B1: MOVWF 4D |
1370 |
06B2: CALL 2CA |
1370 |
06B2: CALL 2CA |
1371 |
06B3: MOVF 77,W |
1371 |
06B3: MOVF 77,W |
1372 |
06B4: MOVWF 3A |
1372 |
06B4: MOVWF 42 |
1373 |
06B5: MOVF 78,W |
1373 |
06B5: MOVF 78,W |
1374 |
06B6: MOVWF 3B |
1374 |
06B6: MOVWF 43 |
1375 |
06B7: MOVF 79,W |
1375 |
06B7: MOVF 79,W |
1376 |
06B8: MOVWF 3C |
1376 |
06B8: MOVWF 44 |
1377 |
06B9: MOVF 7A,W |
1377 |
06B9: MOVF 7A,W |
1378 |
06BA: MOVWF 3D |
1378 |
06BA: MOVWF 45 |
1379 |
06BB: MOVWF 41 |
1379 |
06BB: MOVWF 54 |
1380 |
06BC: MOVF 79,W |
1380 |
06BC: MOVF 79,W |
1381 |
06BD: MOVWF 40 |
1381 |
06BD: MOVWF 53 |
1382 |
06BE: MOVF 78,W |
1382 |
06BE: MOVF 78,W |
1383 |
06BF: MOVWF 3F |
1383 |
06BF: MOVWF 52 |
1384 |
06C0: MOVF 77,W |
1384 |
06C0: MOVF 77,W |
1385 |
06C1: MOVWF 3E |
1385 |
06C1: MOVWF 51 |
1386 |
06C2: CLRF 45 |
1386 |
06C2: CLRF 58 |
1387 |
06C3: MOVLW FF |
1387 |
06C3: MOVLW FF |
1388 |
06C4: MOVWF 44 |
1388 |
06C4: MOVWF 57 |
1389 |
06C5: MOVLW 7F |
1389 |
06C5: MOVLW 7F |
1390 |
06C6: MOVWF 43 |
1390 |
06C6: MOVWF 56 |
1391 |
06C7: MOVLW 8E |
1391 |
06C7: MOVLW 8E |
1392 |
06C8: MOVWF 42 |
1392 |
06C8: MOVWF 55 |
1393 |
06C9: CALL 2E7 |
1393 |
06C9: CALL 2E7 |
1394 |
06CA: CLRF 45 |
1394 |
06CA: CLRF 4D |
1395 |
06CB: CLRF 44 |
1395 |
06CB: CLRF 4C |
1396 |
06CC: MOVLW 7A |
1396 |
06CC: MOVLW 7A |
1397 |
06CD: MOVWF 43 |
1397 |
06CD: MOVWF 4B |
1398 |
06CE: MOVLW 85 |
1398 |
06CE: MOVLW 85 |
1399 |
06CF: MOVWF 42 |
1399 |
06CF: MOVWF 4A |
1400 |
06D0: MOVF 7A,W |
1400 |
06D0: MOVF 7A,W |
1401 |
06D1: MOVWF 49 |
1401 |
06D1: MOVWF 51 |
1402 |
06D2: MOVF 79,W |
1402 |
06D2: MOVF 79,W |
1403 |
06D3: MOVWF 48 |
1403 |
06D3: MOVWF 50 |
1404 |
06D4: MOVF 78,W |
1404 |
06D4: MOVF 78,W |
1405 |
06D5: MOVWF 47 |
1405 |
06D5: MOVWF 4F |
1406 |
06D6: MOVF 77,W |
1406 |
06D6: MOVF 77,W |
1407 |
06D7: MOVWF 46 |
1407 |
06D7: MOVWF 4E |
1408 |
06D8: CALL 3B1 |
1408 |
06D8: CALL 3B1 |
1409 |
06D9: BCF 03.1 |
1409 |
06D9: BCF 03.1 |
1410 |
06DA: CLRF 3D |
1410 |
06DA: CLRF 56 |
1411 |
06DB: CLRF 3C |
1411 |
06DB: CLRF 55 |
1412 |
06DC: MOVLW C0 |
1412 |
06DC: MOVLW C0 |
1413 |
06DD: MOVWF 3B |
1413 |
06DD: MOVWF 54 |
1414 |
06DE: MOVLW 81 |
1414 |
06DE: MOVLW 81 |
1415 |
06DF: MOVWF 3A |
1415 |
06DF: MOVWF 53 |
1416 |
06E0: MOVF 7A,W |
1416 |
06E0: MOVF 7A,W |
1417 |
06E1: MOVWF 41 |
1417 |
06E1: MOVWF 5A |
1418 |
06E2: MOVF 79,W |
1418 |
06E2: MOVF 79,W |
1419 |
06E3: MOVWF 40 |
1419 |
06E3: MOVWF 59 |
1420 |
06E4: MOVF 78,W |
1420 |
06E4: MOVF 78,W |
1421 |
06E5: MOVWF 3F |
1421 |
06E5: MOVWF 58 |
1422 |
06E6: MOVF 77,W |
1422 |
06E6: MOVF 77,W |
1423 |
06E7: MOVWF 3E |
1423 |
06E7: MOVWF 57 |
1424 |
06E8: CALL 426 |
1424 |
06E8: CALL 426 |
1425 |
.................... } |
1425 |
.................... } |
1426 |
06E9: BSF 0A.3 |
1426 |
06E9: BSF 0A.3 |
1427 |
06EA: BCF 0A.4 |
1427 |
06EA: BCF 0A.4 |
1428 |
06EB: GOTO 396 (RETURN) |
1428 |
06EB: GOTO 5C4 (RETURN) |
1429 |
.................... |
1429 |
.................... |
1430 |
.................... |
1430 |
.................... |
1431 |
.................... |
1431 |
.................... |
1432 |
.................... |
1432 |
.................... |
1433 |
.................... #include "../LTS01.h" |
1433 |
.................... #include "../LTS01.h" |
Line 1469... |
Line 1469... |
1469 |
0702: BSF 03.5 |
1469 |
0702: BSF 03.5 |
1470 |
0703: MOVWF 07 |
1470 |
0703: MOVWF 07 |
1471 |
.................... I2C_Write(LTS01A_address); |
1471 |
.................... I2C_Write(LTS01A_address); |
1472 |
0704: MOVLW 90 |
1472 |
0704: MOVLW 90 |
1473 |
0705: BCF 03.5 |
1473 |
0705: BCF 03.5 |
1474 |
0706: MOVWF 3B |
1474 |
0706: MOVWF 4E |
1475 |
0707: CALL 078 |
1475 |
0707: CALL 078 |
1476 |
.................... I2C_write(0x00); |
1476 |
.................... I2C_write(0x00); |
1477 |
0708: CLRF 3B |
1477 |
0708: CLRF 4E |
1478 |
0709: CALL 078 |
1478 |
0709: CALL 078 |
1479 |
.................... i2c_stop(); |
1479 |
.................... i2c_stop(); |
1480 |
070A: BCF 20.4 |
1480 |
070A: BCF 20.4 |
1481 |
070B: MOVF 20,W |
1481 |
070B: MOVF 20,W |
1482 |
070C: BSF 03.5 |
1482 |
070C: BSF 03.5 |
Line 1525... |
Line 1525... |
1525 |
0736: BSF 03.5 |
1525 |
0736: BSF 03.5 |
1526 |
0737: MOVWF 07 |
1526 |
0737: MOVWF 07 |
1527 |
.................... I2C_Write(LTS01A_address+1); |
1527 |
.................... I2C_Write(LTS01A_address+1); |
1528 |
0738: MOVLW 91 |
1528 |
0738: MOVLW 91 |
1529 |
0739: BCF 03.5 |
1529 |
0739: BCF 03.5 |
1530 |
073A: MOVWF 3B |
1530 |
073A: MOVWF 4E |
1531 |
073B: CALL 078 |
1531 |
073B: CALL 078 |
1532 |
.................... MSB=i2c_read(1); |
1532 |
.................... MSB=i2c_read(1); |
1533 |
073C: MOVLW 01 |
1533 |
073C: MOVLW 01 |
1534 |
073D: MOVWF 77 |
1534 |
073D: MOVWF 77 |
1535 |
073E: CALL 285 |
1535 |
073E: CALL 285 |
1536 |
073F: MOVF 78,W |
1536 |
073F: MOVF 78,W |
1537 |
0740: MOVWF 35 |
1537 |
0740: MOVWF 3D |
1538 |
.................... LSB=i2c_read(0); |
1538 |
.................... LSB=i2c_read(0); |
1539 |
0741: CLRF 77 |
1539 |
0741: CLRF 77 |
1540 |
0742: CALL 285 |
1540 |
0742: CALL 285 |
1541 |
0743: MOVF 78,W |
1541 |
0743: MOVF 78,W |
1542 |
0744: MOVWF 36 |
1542 |
0744: MOVWF 3E |
1543 |
.................... i2c_stop(); |
1543 |
.................... i2c_stop(); |
1544 |
0745: BCF 20.4 |
1544 |
0745: BCF 20.4 |
1545 |
0746: MOVF 20,W |
1545 |
0746: MOVF 20,W |
1546 |
0747: BSF 03.5 |
1546 |
0747: BSF 03.5 |
1547 |
0748: MOVWF 07 |
1547 |
0748: MOVWF 07 |
Line 1563... |
Line 1563... |
1563 |
0758: MOVWF 07 |
1563 |
0758: MOVWF 07 |
1564 |
0759: NOP |
1564 |
0759: NOP |
1565 |
.................... |
1565 |
.................... |
1566 |
.................... data = MAKE16(MSB,LSB); |
1566 |
.................... data = MAKE16(MSB,LSB); |
1567 |
075A: BCF 03.5 |
1567 |
075A: BCF 03.5 |
1568 |
075B: MOVF 35,W |
1568 |
075B: MOVF 3D,W |
1569 |
075C: MOVWF 38 |
1569 |
075C: MOVWF 40 |
1570 |
075D: MOVF 36,W |
1570 |
075D: MOVF 3E,W |
1571 |
075E: MOVWF 37 |
1571 |
075E: MOVWF 3F |
1572 |
.................... |
1572 |
.................... |
1573 |
.................... return (data * 0.00390625 ); |
1573 |
.................... return (data * 0.00390625 ); |
1574 |
075F: MOVF 38,W |
1574 |
075F: MOVF 40,W |
1575 |
0760: MOVWF 3A |
1575 |
0760: MOVWF 42 |
1576 |
0761: MOVF 37,W |
1576 |
0761: MOVF 3F,W |
1577 |
0762: MOVWF 39 |
1577 |
0762: MOVWF 41 |
1578 |
0763: MOVF 3A,W |
1578 |
0763: MOVF 42,W |
1579 |
0764: MOVWF 3C |
1579 |
0764: MOVWF 44 |
1580 |
0765: MOVF 39,W |
1580 |
0765: MOVF 41,W |
1581 |
0766: MOVWF 3B |
1581 |
0766: MOVWF 43 |
1582 |
* |
1582 |
* |
1583 |
078B: MOVF 7A,W |
1583 |
078B: MOVF 7A,W |
1584 |
078C: MOVWF 45 |
1584 |
078C: MOVWF 4D |
1585 |
078D: MOVF 79,W |
1585 |
078D: MOVF 79,W |
1586 |
078E: MOVWF 44 |
1586 |
078E: MOVWF 4C |
1587 |
078F: MOVF 78,W |
1587 |
078F: MOVF 78,W |
1588 |
0790: MOVWF 43 |
1588 |
0790: MOVWF 4B |
1589 |
0791: MOVF 77,W |
1589 |
0791: MOVF 77,W |
1590 |
0792: MOVWF 42 |
1590 |
0792: MOVWF 4A |
1591 |
0793: CLRF 49 |
1591 |
0793: CLRF 51 |
1592 |
0794: CLRF 48 |
1592 |
0794: CLRF 50 |
1593 |
0795: CLRF 47 |
1593 |
0795: CLRF 4F |
1594 |
0796: MOVLW 77 |
1594 |
0796: MOVLW 77 |
1595 |
0797: MOVWF 46 |
1595 |
0797: MOVWF 4E |
1596 |
0798: CALL 3B1 |
1596 |
0798: CALL 3B1 |
1597 |
.................... |
1597 |
.................... |
1598 |
.................... } |
1598 |
.................... } |
1599 |
0799: BSF 0A.3 |
1599 |
0799: BSF 0A.3 |
1600 |
079A: BCF 0A.4 |
1600 |
079A: BCF 0A.4 |
1601 |
079B: GOTO 3A1 (RETURN) |
1601 |
079B: GOTO 5CF (RETURN) |
1602 |
.................... |
1602 |
.................... |
1603 |
.................... |
1603 |
.................... |
1604 |
.................... |
1604 |
.................... |
1605 |
.................... #include "./HMC5883L.h" |
1605 |
.................... #include "./HMC5883L.h" |
1606 |
.................... // i2c slave addresses |
1606 |
.................... // i2c slave addresses |
Line 1658... |
Line 1658... |
1658 |
00D8: BSF 03.5 |
1658 |
00D8: BSF 03.5 |
1659 |
00D9: MOVWF 07 |
1659 |
00D9: MOVWF 07 |
1660 |
.................... i2c_write(HMC5883L_WRT_ADDR); |
1660 |
.................... i2c_write(HMC5883L_WRT_ADDR); |
1661 |
00DA: MOVLW 3C |
1661 |
00DA: MOVLW 3C |
1662 |
00DB: BCF 03.5 |
1662 |
00DB: BCF 03.5 |
1663 |
00DC: MOVWF 3B |
1663 |
00DC: MOVWF 4E |
1664 |
00DD: CALL 078 |
1664 |
00DD: CALL 078 |
1665 |
.................... i2c_write(reg); |
1665 |
.................... i2c_write(reg); |
1666 |
00DE: MOVF 35,W |
1666 |
00DE: MOVF 3D,W |
1667 |
00DF: MOVWF 3B |
1667 |
00DF: MOVWF 4E |
1668 |
00E0: CALL 078 |
1668 |
00E0: CALL 078 |
1669 |
.................... i2c_write(data); |
1669 |
.................... i2c_write(data); |
1670 |
00E1: MOVF 36,W |
1670 |
00E1: MOVF 3E,W |
1671 |
00E2: MOVWF 3B |
1671 |
00E2: MOVWF 4E |
1672 |
00E3: CALL 078 |
1672 |
00E3: CALL 078 |
1673 |
.................... i2c_stop(); |
1673 |
.................... i2c_stop(); |
1674 |
00E4: BCF 20.4 |
1674 |
00E4: BCF 20.4 |
1675 |
00E5: MOVF 20,W |
1675 |
00E5: MOVF 20,W |
1676 |
00E6: BSF 03.5 |
1676 |
00E6: BSF 03.5 |
Line 1722... |
Line 1722... |
1722 |
.................... |
1722 |
.................... |
1723 |
.................... // This global structure holds the values read |
1723 |
.................... // This global structure holds the values read |
1724 |
.................... // from the HMC5883L x,y,z registers. |
1724 |
.................... // from the HMC5883L x,y,z registers. |
1725 |
.................... hmc5883l_result compass = {0,0,0}; |
1725 |
.................... hmc5883l_result compass = {0,0,0}; |
1726 |
* |
1726 |
* |
1727 |
0ADB: CLRF 21 |
1727 |
0D09: CLRF 21 |
1728 |
0ADC: CLRF 22 |
1728 |
0D0A: CLRF 22 |
1729 |
0ADD: CLRF 23 |
1729 |
0D0B: CLRF 23 |
1730 |
0ADE: CLRF 24 |
1730 |
0D0C: CLRF 24 |
1731 |
0ADF: CLRF 25 |
1731 |
0D0D: CLRF 25 |
1732 |
0AE0: CLRF 26 |
1732 |
0D0E: CLRF 26 |
1733 |
.................... |
1733 |
.................... |
1734 |
.................... //------------------------------ |
1734 |
.................... //------------------------------ |
1735 |
.................... void hmc5883l_read_data(void) |
1735 |
.................... void hmc5883l_read_data(void) |
1736 |
.................... { |
1736 |
.................... { |
1737 |
.................... unsigned int8 x_lsb; |
1737 |
.................... unsigned int8 x_lsb; |
Line 1770... |
Line 1770... |
1770 |
0816: BSF 03.5 |
1770 |
0816: BSF 03.5 |
1771 |
0817: MOVWF 07 |
1771 |
0817: MOVWF 07 |
1772 |
.................... i2c_write(HMC5883L_WRT_ADDR); |
1772 |
.................... i2c_write(HMC5883L_WRT_ADDR); |
1773 |
0818: MOVLW 3C |
1773 |
0818: MOVLW 3C |
1774 |
0819: BCF 03.5 |
1774 |
0819: BCF 03.5 |
1775 |
081A: MOVWF 3B |
1775 |
081A: MOVWF 4E |
1776 |
081B: BCF 0A.3 |
1776 |
081B: BCF 0A.3 |
1777 |
081C: CALL 078 |
1777 |
081C: CALL 078 |
1778 |
081D: BSF 0A.3 |
1778 |
081D: BSF 0A.3 |
1779 |
.................... i2c_write(HMC5883L_X_MSB_REG); // Point to X-msb register |
1779 |
.................... i2c_write(HMC5883L_X_MSB_REG); // Point to X-msb register |
1780 |
081E: MOVLW 03 |
1780 |
081E: MOVLW 03 |
1781 |
081F: MOVWF 3B |
1781 |
081F: MOVWF 4E |
1782 |
0820: BCF 0A.3 |
1782 |
0820: BCF 0A.3 |
1783 |
0821: CALL 078 |
1783 |
0821: CALL 078 |
1784 |
0822: BSF 0A.3 |
1784 |
0822: BSF 0A.3 |
1785 |
.................... i2c_start(); |
1785 |
.................... i2c_start(); |
1786 |
0823: BSF 20.4 |
1786 |
0823: BSF 20.4 |
Line 1810... |
Line 1810... |
1810 |
083B: BSF 03.5 |
1810 |
083B: BSF 03.5 |
1811 |
083C: MOVWF 07 |
1811 |
083C: MOVWF 07 |
1812 |
.................... i2c_write(HMC5883L_READ_ADDR); |
1812 |
.................... i2c_write(HMC5883L_READ_ADDR); |
1813 |
083D: MOVLW 3D |
1813 |
083D: MOVLW 3D |
1814 |
083E: BCF 03.5 |
1814 |
083E: BCF 03.5 |
1815 |
083F: MOVWF 3B |
1815 |
083F: MOVWF 4E |
1816 |
0840: BCF 0A.3 |
1816 |
0840: BCF 0A.3 |
1817 |
0841: CALL 078 |
1817 |
0841: CALL 078 |
1818 |
0842: BSF 0A.3 |
1818 |
0842: BSF 0A.3 |
1819 |
.................... |
1819 |
.................... |
1820 |
.................... x_msb = i2c_read(); |
1820 |
.................... x_msb = i2c_read(); |
Line 1822... |
Line 1822... |
1822 |
0844: MOVWF 77 |
1822 |
0844: MOVWF 77 |
1823 |
0845: BCF 0A.3 |
1823 |
0845: BCF 0A.3 |
1824 |
0846: CALL 285 |
1824 |
0846: CALL 285 |
1825 |
0847: BSF 0A.3 |
1825 |
0847: BSF 0A.3 |
1826 |
0848: MOVF 78,W |
1826 |
0848: MOVF 78,W |
1827 |
0849: MOVWF 36 |
1827 |
0849: MOVWF 3E |
1828 |
.................... x_lsb = i2c_read(); |
1828 |
.................... x_lsb = i2c_read(); |
1829 |
084A: MOVLW 01 |
1829 |
084A: MOVLW 01 |
1830 |
084B: MOVWF 77 |
1830 |
084B: MOVWF 77 |
1831 |
084C: BCF 0A.3 |
1831 |
084C: BCF 0A.3 |
1832 |
084D: CALL 285 |
1832 |
084D: CALL 285 |
1833 |
084E: BSF 0A.3 |
1833 |
084E: BSF 0A.3 |
1834 |
084F: MOVF 78,W |
1834 |
084F: MOVF 78,W |
1835 |
0850: MOVWF 35 |
1835 |
0850: MOVWF 3D |
1836 |
.................... |
1836 |
.................... |
1837 |
.................... z_msb = i2c_read(); |
1837 |
.................... z_msb = i2c_read(); |
1838 |
0851: MOVLW 01 |
1838 |
0851: MOVLW 01 |
1839 |
0852: MOVWF 77 |
1839 |
0852: MOVWF 77 |
1840 |
0853: BCF 0A.3 |
1840 |
0853: BCF 0A.3 |
1841 |
0854: CALL 285 |
1841 |
0854: CALL 285 |
1842 |
0855: BSF 0A.3 |
1842 |
0855: BSF 0A.3 |
1843 |
0856: MOVF 78,W |
1843 |
0856: MOVF 78,W |
1844 |
0857: MOVWF 3A |
1844 |
0857: MOVWF 42 |
1845 |
.................... z_lsb = i2c_read(); |
1845 |
.................... z_lsb = i2c_read(); |
1846 |
0858: MOVLW 01 |
1846 |
0858: MOVLW 01 |
1847 |
0859: MOVWF 77 |
1847 |
0859: MOVWF 77 |
1848 |
085A: BCF 0A.3 |
1848 |
085A: BCF 0A.3 |
1849 |
085B: CALL 285 |
1849 |
085B: CALL 285 |
1850 |
085C: BSF 0A.3 |
1850 |
085C: BSF 0A.3 |
1851 |
085D: MOVF 78,W |
1851 |
085D: MOVF 78,W |
1852 |
085E: MOVWF 39 |
1852 |
085E: MOVWF 41 |
1853 |
.................... |
1853 |
.................... |
1854 |
.................... y_msb = i2c_read(); |
1854 |
.................... y_msb = i2c_read(); |
1855 |
085F: MOVLW 01 |
1855 |
085F: MOVLW 01 |
1856 |
0860: MOVWF 77 |
1856 |
0860: MOVWF 77 |
1857 |
0861: BCF 0A.3 |
1857 |
0861: BCF 0A.3 |
1858 |
0862: CALL 285 |
1858 |
0862: CALL 285 |
1859 |
0863: BSF 0A.3 |
1859 |
0863: BSF 0A.3 |
1860 |
0864: MOVF 78,W |
1860 |
0864: MOVF 78,W |
1861 |
0865: MOVWF 38 |
1861 |
0865: MOVWF 40 |
1862 |
.................... y_lsb = i2c_read(0); // do a NACK on last read |
1862 |
.................... y_lsb = i2c_read(0); // do a NACK on last read |
1863 |
0866: CLRF 77 |
1863 |
0866: CLRF 77 |
1864 |
0867: BCF 0A.3 |
1864 |
0867: BCF 0A.3 |
1865 |
0868: CALL 285 |
1865 |
0868: CALL 285 |
1866 |
0869: BSF 0A.3 |
1866 |
0869: BSF 0A.3 |
1867 |
086A: MOVF 78,W |
1867 |
086A: MOVF 78,W |
1868 |
086B: MOVWF 37 |
1868 |
086B: MOVWF 3F |
1869 |
.................... |
1869 |
.................... |
1870 |
.................... i2c_stop(); |
1870 |
.................... i2c_stop(); |
1871 |
086C: BCF 20.4 |
1871 |
086C: BCF 20.4 |
1872 |
086D: MOVF 20,W |
1872 |
086D: MOVF 20,W |
1873 |
086E: BSF 03.5 |
1873 |
086E: BSF 03.5 |
Line 1891... |
Line 1891... |
1891 |
0880: NOP |
1891 |
0880: NOP |
1892 |
.................... |
1892 |
.................... |
1893 |
.................... // Combine high and low bytes into 16-bit values. |
1893 |
.................... // Combine high and low bytes into 16-bit values. |
1894 |
.................... compass.x = make16(x_msb, x_lsb); |
1894 |
.................... compass.x = make16(x_msb, x_lsb); |
1895 |
0881: BCF 03.5 |
1895 |
0881: BCF 03.5 |
1896 |
0882: MOVF 36,W |
1896 |
0882: MOVF 3E,W |
1897 |
0883: MOVWF 22 |
1897 |
0883: MOVWF 22 |
1898 |
0884: MOVF 35,W |
1898 |
0884: MOVF 3D,W |
1899 |
0885: MOVWF 21 |
1899 |
0885: MOVWF 21 |
1900 |
.................... compass.y = make16(y_msb, y_lsb); |
1900 |
.................... compass.y = make16(y_msb, y_lsb); |
1901 |
0886: MOVF 38,W |
1901 |
0886: MOVF 40,W |
1902 |
0887: MOVWF 24 |
1902 |
0887: MOVWF 24 |
1903 |
0888: MOVF 37,W |
1903 |
0888: MOVF 3F,W |
1904 |
0889: MOVWF 23 |
1904 |
0889: MOVWF 23 |
1905 |
.................... compass.z = make16(z_msb, z_lsb); |
1905 |
.................... compass.z = make16(z_msb, z_lsb); |
1906 |
088A: MOVF 3A,W |
1906 |
088A: MOVF 42,W |
1907 |
088B: MOVWF 26 |
1907 |
088B: MOVWF 26 |
1908 |
088C: MOVF 39,W |
1908 |
088C: MOVF 41,W |
1909 |
088D: MOVWF 25 |
1909 |
088D: MOVWF 25 |
1910 |
.................... } |
1910 |
.................... } |
1911 |
088E: BSF 0A.3 |
1911 |
088E: BSF 0A.3 |
1912 |
088F: BCF 0A.4 |
1912 |
088F: BCF 0A.4 |
1913 |
0890: GOTO 3AB (RETURN) |
1913 |
0890: GOTO 5D9 (RETURN) |
1914 |
.................... |
1914 |
.................... |
1915 |
.................... |
1915 |
.................... |
1916 |
.................... |
1916 |
.................... |
1917 |
.................... |
1917 |
.................... |
1918 |
.................... #include <math.h> |
1918 |
.................... #include <math.h> |
Line 4087... |
Line 4087... |
4087 |
.................... #endif |
4087 |
.................... #endif |
4088 |
.................... |
4088 |
.................... |
4089 |
.................... #endif |
4089 |
.................... #endif |
4090 |
.................... |
4090 |
.................... |
4091 |
.................... |
4091 |
.................... |
- |
|
4092 |
.................... #define MPL3115_ADDR_R 0xC1 //addresa pro cteni |
- |
|
4093 |
.................... #define MPL3115_ADDR_W 0xC0 |
- |
|
4094 |
.................... |
- |
|
4095 |
.................... #include "../MPL3115.h" |
- |
|
4096 |
.................... //microchip pic library for Freescale MPL3115 I2C barometer sensor |
- |
|
4097 |
.................... |
- |
|
4098 |
.................... /*void mpl3115_setA (void) //setup sensor for altitude measurement |
- |
|
4099 |
.................... void mpl3115_setP (void) //setup sensor for preasure measurement |
- |
|
4100 |
.................... float mpl3115_T (void) //temperature in Celsius degrees |
- |
|
4101 |
.................... float mpl3115_A (void) //altitude in metres |
- |
|
4102 |
.................... float mpl3115_P (void) //preassure in pascals |
- |
|
4103 |
.................... */ |
- |
|
4104 |
.................... |
- |
|
4105 |
.................... #include "MPL3115.c" |
- |
|
4106 |
.................... void mpl3115_setA (void) //setup for altitude measurement |
- |
|
4107 |
.................... { |
- |
|
4108 |
.................... |
- |
|
4109 |
.................... |
- |
|
4110 |
.................... i2c_start(); //STANDBY mode |
- |
|
4111 |
.................... I2C_Write(MPL3115_ADDR_W); |
- |
|
4112 |
.................... I2C_write(0x26); |
- |
|
4113 |
.................... I2C_write(0xB8); |
- |
|
4114 |
.................... i2c_stop(); |
- |
|
4115 |
.................... |
- |
|
4116 |
.................... i2c_start(); //PT_DATA_CFG set |
- |
|
4117 |
.................... I2C_Write(MPL3115_ADDR_W); |
- |
|
4118 |
.................... I2C_write(0x13); |
- |
|
4119 |
.................... I2C_write(0x07); //hodnota |
- |
|
4120 |
.................... i2c_stop(); |
- |
|
4121 |
.................... |
- |
|
4122 |
.................... i2c_start(); //ACTIVE mode |
- |
|
4123 |
.................... I2C_Write(MPL3115_ADDR_W); |
- |
|
4124 |
.................... I2C_write(0x26); |
- |
|
4125 |
.................... I2C_write(0xB9); |
- |
|
4126 |
.................... i2c_stop(); |
- |
|
4127 |
.................... } |
- |
|
4128 |
.................... |
- |
|
4129 |
.................... void mpl3115_setP (void) //nastavenà pro tlak |
- |
|
4130 |
.................... { |
- |
|
4131 |
.................... |
- |
|
4132 |
.................... |
- |
|
4133 |
.................... i2c_start(); //STANDBY mode |
- |
|
4134 |
* |
- |
|
4135 |
09AD: BSF 20.4 |
- |
|
4136 |
09AE: MOVF 20,W |
- |
|
4137 |
09AF: BSF 03.5 |
- |
|
4138 |
09B0: MOVWF 07 |
- |
|
4139 |
09B1: NOP |
- |
|
4140 |
09B2: BCF 03.5 |
- |
|
4141 |
09B3: BSF 20.3 |
- |
|
4142 |
09B4: MOVF 20,W |
- |
|
4143 |
09B5: BSF 03.5 |
- |
|
4144 |
09B6: MOVWF 07 |
- |
|
4145 |
09B7: NOP |
- |
|
4146 |
09B8: BCF 03.5 |
- |
|
4147 |
09B9: BCF 07.4 |
- |
|
4148 |
09BA: BCF 20.4 |
- |
|
4149 |
09BB: MOVF 20,W |
- |
|
4150 |
09BC: BSF 03.5 |
- |
|
4151 |
09BD: MOVWF 07 |
- |
|
4152 |
09BE: NOP |
- |
|
4153 |
09BF: BCF 03.5 |
- |
|
4154 |
09C0: BCF 07.3 |
- |
|
4155 |
09C1: BCF 20.3 |
- |
|
4156 |
09C2: MOVF 20,W |
- |
|
4157 |
09C3: BSF 03.5 |
- |
|
4158 |
09C4: MOVWF 07 |
- |
|
4159 |
.................... I2C_Write(MPL3115_ADDR_W); |
- |
|
4160 |
09C5: MOVLW C0 |
- |
|
4161 |
09C6: BCF 03.5 |
- |
|
4162 |
09C7: MOVWF 4E |
- |
|
4163 |
09C8: BCF 0A.3 |
- |
|
4164 |
09C9: CALL 078 |
- |
|
4165 |
09CA: BSF 0A.3 |
- |
|
4166 |
.................... I2C_write(0x26); |
- |
|
4167 |
09CB: MOVLW 26 |
- |
|
4168 |
09CC: MOVWF 4E |
- |
|
4169 |
09CD: BCF 0A.3 |
- |
|
4170 |
09CE: CALL 078 |
- |
|
4171 |
09CF: BSF 0A.3 |
- |
|
4172 |
.................... I2C_write(0xB8); |
- |
|
4173 |
09D0: MOVLW B8 |
- |
|
4174 |
09D1: MOVWF 4E |
- |
|
4175 |
09D2: BCF 0A.3 |
- |
|
4176 |
09D3: CALL 078 |
- |
|
4177 |
09D4: BSF 0A.3 |
- |
|
4178 |
.................... i2c_stop(); |
- |
|
4179 |
09D5: BCF 20.4 |
- |
|
4180 |
09D6: MOVF 20,W |
- |
|
4181 |
09D7: BSF 03.5 |
- |
|
4182 |
09D8: MOVWF 07 |
- |
|
4183 |
09D9: NOP |
- |
|
4184 |
09DA: BCF 03.5 |
- |
|
4185 |
09DB: BSF 20.3 |
- |
|
4186 |
09DC: MOVF 20,W |
- |
|
4187 |
09DD: BSF 03.5 |
- |
|
4188 |
09DE: MOVWF 07 |
- |
|
4189 |
09DF: BCF 03.5 |
- |
|
4190 |
09E0: BTFSS 07.3 |
- |
|
4191 |
09E1: GOTO 1E0 |
- |
|
4192 |
09E2: NOP |
- |
|
4193 |
09E3: GOTO 1E4 |
- |
|
4194 |
09E4: NOP |
- |
|
4195 |
09E5: BSF 20.4 |
- |
|
4196 |
09E6: MOVF 20,W |
- |
|
4197 |
09E7: BSF 03.5 |
- |
|
4198 |
09E8: MOVWF 07 |
- |
|
4199 |
09E9: NOP |
- |
|
4200 |
.................... |
- |
|
4201 |
.................... i2c_start(); //PT_DATA_CFG set |
- |
|
4202 |
09EA: BCF 03.5 |
- |
|
4203 |
09EB: BSF 20.4 |
- |
|
4204 |
09EC: MOVF 20,W |
- |
|
4205 |
09ED: BSF 03.5 |
- |
|
4206 |
09EE: MOVWF 07 |
- |
|
4207 |
09EF: NOP |
- |
|
4208 |
09F0: BCF 03.5 |
- |
|
4209 |
09F1: BSF 20.3 |
- |
|
4210 |
09F2: MOVF 20,W |
- |
|
4211 |
09F3: BSF 03.5 |
- |
|
4212 |
09F4: MOVWF 07 |
- |
|
4213 |
09F5: NOP |
- |
|
4214 |
09F6: BCF 03.5 |
- |
|
4215 |
09F7: BCF 07.4 |
- |
|
4216 |
09F8: BCF 20.4 |
- |
|
4217 |
09F9: MOVF 20,W |
- |
|
4218 |
09FA: BSF 03.5 |
- |
|
4219 |
09FB: MOVWF 07 |
- |
|
4220 |
09FC: NOP |
- |
|
4221 |
09FD: BCF 03.5 |
- |
|
4222 |
09FE: BCF 07.3 |
- |
|
4223 |
09FF: BCF 20.3 |
- |
|
4224 |
0A00: MOVF 20,W |
- |
|
4225 |
0A01: BSF 03.5 |
- |
|
4226 |
0A02: MOVWF 07 |
- |
|
4227 |
.................... I2C_Write(MPL3115_ADDR_W); |
- |
|
4228 |
0A03: MOVLW C0 |
- |
|
4229 |
0A04: BCF 03.5 |
- |
|
4230 |
0A05: MOVWF 4E |
- |
|
4231 |
0A06: BCF 0A.3 |
- |
|
4232 |
0A07: CALL 078 |
- |
|
4233 |
0A08: BSF 0A.3 |
- |
|
4234 |
.................... I2C_write(0x13); |
- |
|
4235 |
0A09: MOVLW 13 |
- |
|
4236 |
0A0A: MOVWF 4E |
- |
|
4237 |
0A0B: BCF 0A.3 |
- |
|
4238 |
0A0C: CALL 078 |
- |
|
4239 |
0A0D: BSF 0A.3 |
- |
|
4240 |
.................... I2C_write(0x07); //hodnota |
- |
|
4241 |
0A0E: MOVLW 07 |
- |
|
4242 |
0A0F: MOVWF 4E |
- |
|
4243 |
0A10: BCF 0A.3 |
- |
|
4244 |
0A11: CALL 078 |
- |
|
4245 |
0A12: BSF 0A.3 |
- |
|
4246 |
.................... i2c_stop(); |
- |
|
4247 |
0A13: BCF 20.4 |
- |
|
4248 |
0A14: MOVF 20,W |
- |
|
4249 |
0A15: BSF 03.5 |
- |
|
4250 |
0A16: MOVWF 07 |
- |
|
4251 |
0A17: NOP |
- |
|
4252 |
0A18: BCF 03.5 |
- |
|
4253 |
0A19: BSF 20.3 |
- |
|
4254 |
0A1A: MOVF 20,W |
- |
|
4255 |
0A1B: BSF 03.5 |
- |
|
4256 |
0A1C: MOVWF 07 |
- |
|
4257 |
0A1D: BCF 03.5 |
- |
|
4258 |
0A1E: BTFSS 07.3 |
- |
|
4259 |
0A1F: GOTO 21E |
- |
|
4260 |
0A20: NOP |
- |
|
4261 |
0A21: GOTO 222 |
- |
|
4262 |
0A22: NOP |
- |
|
4263 |
0A23: BSF 20.4 |
- |
|
4264 |
0A24: MOVF 20,W |
- |
|
4265 |
0A25: BSF 03.5 |
- |
|
4266 |
0A26: MOVWF 07 |
- |
|
4267 |
0A27: NOP |
- |
|
4268 |
.................... |
- |
|
4269 |
.................... i2c_start(); //ACTIVE mode |
- |
|
4270 |
0A28: BCF 03.5 |
- |
|
4271 |
0A29: BSF 20.4 |
- |
|
4272 |
0A2A: MOVF 20,W |
- |
|
4273 |
0A2B: BSF 03.5 |
- |
|
4274 |
0A2C: MOVWF 07 |
- |
|
4275 |
0A2D: NOP |
- |
|
4276 |
0A2E: BCF 03.5 |
- |
|
4277 |
0A2F: BSF 20.3 |
- |
|
4278 |
0A30: MOVF 20,W |
- |
|
4279 |
0A31: BSF 03.5 |
- |
|
4280 |
0A32: MOVWF 07 |
- |
|
4281 |
0A33: NOP |
- |
|
4282 |
0A34: BCF 03.5 |
- |
|
4283 |
0A35: BCF 07.4 |
- |
|
4284 |
0A36: BCF 20.4 |
- |
|
4285 |
0A37: MOVF 20,W |
- |
|
4286 |
0A38: BSF 03.5 |
- |
|
4287 |
0A39: MOVWF 07 |
- |
|
4288 |
0A3A: NOP |
- |
|
4289 |
0A3B: BCF 03.5 |
- |
|
4290 |
0A3C: BCF 07.3 |
- |
|
4291 |
0A3D: BCF 20.3 |
- |
|
4292 |
0A3E: MOVF 20,W |
- |
|
4293 |
0A3F: BSF 03.5 |
- |
|
4294 |
0A40: MOVWF 07 |
- |
|
4295 |
.................... I2C_Write(MPL3115_ADDR_W); |
- |
|
4296 |
0A41: MOVLW C0 |
- |
|
4297 |
0A42: BCF 03.5 |
- |
|
4298 |
0A43: MOVWF 4E |
- |
|
4299 |
0A44: BCF 0A.3 |
- |
|
4300 |
0A45: CALL 078 |
- |
|
4301 |
0A46: BSF 0A.3 |
- |
|
4302 |
.................... I2C_write(0x26); |
- |
|
4303 |
0A47: MOVLW 26 |
- |
|
4304 |
0A48: MOVWF 4E |
- |
|
4305 |
0A49: BCF 0A.3 |
- |
|
4306 |
0A4A: CALL 078 |
- |
|
4307 |
0A4B: BSF 0A.3 |
- |
|
4308 |
.................... I2C_write(0x39); |
- |
|
4309 |
0A4C: MOVLW 39 |
- |
|
4310 |
0A4D: MOVWF 4E |
- |
|
4311 |
0A4E: BCF 0A.3 |
- |
|
4312 |
0A4F: CALL 078 |
- |
|
4313 |
0A50: BSF 0A.3 |
- |
|
4314 |
.................... i2c_stop(); |
- |
|
4315 |
0A51: BCF 20.4 |
- |
|
4316 |
0A52: MOVF 20,W |
- |
|
4317 |
0A53: BSF 03.5 |
- |
|
4318 |
0A54: MOVWF 07 |
- |
|
4319 |
0A55: NOP |
- |
|
4320 |
0A56: BCF 03.5 |
- |
|
4321 |
0A57: BSF 20.3 |
- |
|
4322 |
0A58: MOVF 20,W |
- |
|
4323 |
0A59: BSF 03.5 |
- |
|
4324 |
0A5A: MOVWF 07 |
- |
|
4325 |
0A5B: BCF 03.5 |
- |
|
4326 |
0A5C: BTFSS 07.3 |
- |
|
4327 |
0A5D: GOTO 25C |
- |
|
4328 |
0A5E: NOP |
- |
|
4329 |
0A5F: GOTO 260 |
- |
|
4330 |
0A60: NOP |
- |
|
4331 |
0A61: BSF 20.4 |
- |
|
4332 |
0A62: MOVF 20,W |
- |
|
4333 |
0A63: BSF 03.5 |
- |
|
4334 |
0A64: MOVWF 07 |
- |
|
4335 |
0A65: NOP |
- |
|
4336 |
.................... } |
- |
|
4337 |
0A66: BCF 03.5 |
- |
|
4338 |
0A67: BSF 0A.3 |
- |
|
4339 |
0A68: BCF 0A.4 |
- |
|
4340 |
0A69: GOTO 5EC (RETURN) |
- |
|
4341 |
.................... |
- |
|
4342 |
.................... |
- |
|
4343 |
.................... byte mpl3115_read (byte reg) |
- |
|
4344 |
.................... { |
- |
|
4345 |
.................... byte i; |
- |
|
4346 |
.................... |
- |
|
4347 |
.................... i2c_start(); |
- |
|
4348 |
* |
- |
|
4349 |
079C: BSF 20.4 |
- |
|
4350 |
079D: MOVF 20,W |
- |
|
4351 |
079E: BSF 03.5 |
- |
|
4352 |
079F: MOVWF 07 |
- |
|
4353 |
07A0: NOP |
- |
|
4354 |
07A1: BCF 03.5 |
- |
|
4355 |
07A2: BSF 20.3 |
- |
|
4356 |
07A3: MOVF 20,W |
- |
|
4357 |
07A4: BSF 03.5 |
- |
|
4358 |
07A5: MOVWF 07 |
- |
|
4359 |
07A6: NOP |
- |
|
4360 |
07A7: BCF 03.5 |
- |
|
4361 |
07A8: BCF 07.4 |
- |
|
4362 |
07A9: BCF 20.4 |
- |
|
4363 |
07AA: MOVF 20,W |
- |
|
4364 |
07AB: BSF 03.5 |
- |
|
4365 |
07AC: MOVWF 07 |
- |
|
4366 |
07AD: NOP |
- |
|
4367 |
07AE: BCF 03.5 |
- |
|
4368 |
07AF: BCF 07.3 |
- |
|
4369 |
07B0: BCF 20.3 |
- |
|
4370 |
07B1: MOVF 20,W |
- |
|
4371 |
07B2: BSF 03.5 |
- |
|
4372 |
07B3: MOVWF 07 |
- |
|
4373 |
.................... I2C_Write(MPL3115_ADDR_W); |
- |
|
4374 |
07B4: MOVLW C0 |
- |
|
4375 |
07B5: BCF 03.5 |
- |
|
4376 |
07B6: MOVWF 4E |
- |
|
4377 |
07B7: CALL 078 |
- |
|
4378 |
.................... I2C_write(reg); |
- |
|
4379 |
07B8: MOVF 4C,W |
- |
|
4380 |
07B9: MOVWF 4E |
- |
|
4381 |
07BA: CALL 078 |
- |
|
4382 |
.................... i2c_start(); |
- |
|
4383 |
07BB: BSF 20.4 |
- |
|
4384 |
07BC: MOVF 20,W |
- |
|
4385 |
07BD: BSF 03.5 |
- |
|
4386 |
07BE: MOVWF 07 |
- |
|
4387 |
07BF: NOP |
- |
|
4388 |
07C0: BCF 03.5 |
- |
|
4389 |
07C1: BSF 20.3 |
- |
|
4390 |
07C2: MOVF 20,W |
- |
|
4391 |
07C3: BSF 03.5 |
- |
|
4392 |
07C4: MOVWF 07 |
- |
|
4393 |
07C5: NOP |
- |
|
4394 |
07C6: BCF 03.5 |
- |
|
4395 |
07C7: BTFSS 07.3 |
- |
|
4396 |
07C8: GOTO 7C7 |
- |
|
4397 |
07C9: BCF 07.4 |
- |
|
4398 |
07CA: BCF 20.4 |
- |
|
4399 |
07CB: MOVF 20,W |
- |
|
4400 |
07CC: BSF 03.5 |
- |
|
4401 |
07CD: MOVWF 07 |
- |
|
4402 |
07CE: NOP |
- |
|
4403 |
07CF: BCF 03.5 |
- |
|
4404 |
07D0: BCF 07.3 |
- |
|
4405 |
07D1: BCF 20.3 |
- |
|
4406 |
07D2: MOVF 20,W |
- |
|
4407 |
07D3: BSF 03.5 |
- |
|
4408 |
07D4: MOVWF 07 |
- |
|
4409 |
.................... I2C_Write(MPL3115_ADDR_R); |
- |
|
4410 |
07D5: MOVLW C1 |
- |
|
4411 |
07D6: BCF 03.5 |
- |
|
4412 |
07D7: MOVWF 4E |
- |
|
4413 |
07D8: CALL 078 |
- |
|
4414 |
.................... i=i2c_read(0); |
- |
|
4415 |
07D9: CLRF 77 |
- |
|
4416 |
07DA: CALL 285 |
- |
|
4417 |
07DB: MOVF 78,W |
- |
|
4418 |
07DC: MOVWF 4D |
- |
|
4419 |
.................... i2c_stop(); |
- |
|
4420 |
07DD: BCF 20.4 |
- |
|
4421 |
07DE: MOVF 20,W |
- |
|
4422 |
07DF: BSF 03.5 |
- |
|
4423 |
07E0: MOVWF 07 |
- |
|
4424 |
07E1: NOP |
- |
|
4425 |
07E2: BCF 03.5 |
- |
|
4426 |
07E3: BSF 20.3 |
- |
|
4427 |
07E4: MOVF 20,W |
- |
|
4428 |
07E5: BSF 03.5 |
- |
|
4429 |
07E6: MOVWF 07 |
- |
|
4430 |
07E7: BCF 03.5 |
- |
|
4431 |
07E8: BTFSS 07.3 |
- |
|
4432 |
07E9: GOTO 7E8 |
- |
|
4433 |
07EA: NOP |
- |
|
4434 |
07EB: GOTO 7EC |
- |
|
4435 |
07EC: NOP |
- |
|
4436 |
07ED: BSF 20.4 |
- |
|
4437 |
07EE: MOVF 20,W |
- |
|
4438 |
07EF: BSF 03.5 |
- |
|
4439 |
07F0: MOVWF 07 |
- |
|
4440 |
07F1: NOP |
- |
|
4441 |
.................... |
- |
|
4442 |
.................... return i; |
- |
|
4443 |
07F2: BCF 03.5 |
- |
|
4444 |
07F3: MOVF 4D,W |
- |
|
4445 |
07F4: MOVWF 78 |
- |
|
4446 |
.................... } |
- |
|
4447 |
07F5: RETURN |
- |
|
4448 |
.................... |
- |
|
4449 |
.................... |
- |
|
4450 |
.................... float mpl3115_T (void) //teplota ve stupnich |
- |
|
4451 |
.................... { |
- |
|
4452 |
.................... int m; |
- |
|
4453 |
.................... float l, t; |
- |
|
4454 |
.................... |
- |
|
4455 |
.................... m = mpl3115_read (0x04); |
- |
|
4456 |
* |
- |
|
4457 |
0891: MOVLW 04 |
- |
|
4458 |
0892: MOVWF 4C |
- |
|
4459 |
0893: BCF 0A.3 |
- |
|
4460 |
0894: CALL 79C |
- |
|
4461 |
0895: BSF 0A.3 |
- |
|
4462 |
0896: MOVF 78,W |
- |
|
4463 |
0897: MOVWF 3D |
- |
|
4464 |
.................... l = (float)(mpl3115_read(0x05)>>4)/16.0; |
- |
|
4465 |
0898: MOVLW 05 |
- |
|
4466 |
0899: MOVWF 4C |
- |
|
4467 |
089A: BCF 0A.3 |
- |
|
4468 |
089B: CALL 79C |
- |
|
4469 |
089C: BSF 0A.3 |
- |
|
4470 |
089D: SWAPF 78,W |
- |
|
4471 |
089E: MOVWF 77 |
- |
|
4472 |
089F: MOVLW 0F |
- |
|
4473 |
08A0: ANDWF 77,F |
- |
|
4474 |
08A1: MOVF 77,W |
- |
|
4475 |
08A2: CLRF 4E |
- |
|
4476 |
08A3: MOVWF 4D |
- |
|
4477 |
08A4: BCF 0A.3 |
- |
|
4478 |
08A5: CALL 2CA |
- |
|
4479 |
08A6: BSF 0A.3 |
- |
|
4480 |
08A7: MOVF 77,W |
- |
|
4481 |
08A8: MOVWF 46 |
- |
|
4482 |
08A9: MOVF 78,W |
- |
|
4483 |
08AA: MOVWF 47 |
- |
|
4484 |
08AB: MOVF 79,W |
- |
|
4485 |
08AC: MOVWF 48 |
- |
|
4486 |
08AD: MOVF 7A,W |
- |
|
4487 |
08AE: MOVWF 49 |
- |
|
4488 |
08AF: MOVWF 54 |
- |
|
4489 |
08B0: MOVF 48,W |
- |
|
4490 |
08B1: MOVWF 53 |
- |
|
4491 |
08B2: MOVF 47,W |
- |
|
4492 |
08B3: MOVWF 52 |
- |
|
4493 |
08B4: MOVF 46,W |
- |
|
4494 |
08B5: MOVWF 51 |
- |
|
4495 |
08B6: CLRF 58 |
- |
|
4496 |
08B7: CLRF 57 |
- |
|
4497 |
08B8: CLRF 56 |
- |
|
4498 |
08B9: MOVLW 83 |
- |
|
4499 |
08BA: MOVWF 55 |
- |
|
4500 |
08BB: BCF 0A.3 |
- |
|
4501 |
08BC: CALL 2E7 |
- |
|
4502 |
08BD: BSF 0A.3 |
- |
|
4503 |
08BE: MOVF 7A,W |
- |
|
4504 |
08BF: MOVWF 41 |
- |
|
4505 |
08C0: MOVF 79,W |
- |
|
4506 |
08C1: MOVWF 40 |
- |
|
4507 |
08C2: MOVF 78,W |
- |
|
4508 |
08C3: MOVWF 3F |
- |
|
4509 |
08C4: MOVF 77,W |
- |
|
4510 |
08C5: MOVWF 3E |
- |
|
4511 |
.................... t = (float)(M + L); |
- |
|
4512 |
08C6: CLRF 4E |
- |
|
4513 |
08C7: MOVF 3D,W |
- |
|
4514 |
08C8: MOVWF 4D |
- |
|
4515 |
08C9: BCF 0A.3 |
- |
|
4516 |
08CA: CALL 2CA |
- |
|
4517 |
08CB: BSF 0A.3 |
- |
|
4518 |
08CC: BCF 03.1 |
- |
|
4519 |
08CD: MOVF 7A,W |
- |
|
4520 |
08CE: MOVWF 56 |
- |
|
4521 |
08CF: MOVF 79,W |
- |
|
4522 |
08D0: MOVWF 55 |
- |
|
4523 |
08D1: MOVF 78,W |
- |
|
4524 |
08D2: MOVWF 54 |
- |
|
4525 |
08D3: MOVF 77,W |
- |
|
4526 |
08D4: MOVWF 53 |
- |
|
4527 |
08D5: MOVF 41,W |
- |
|
4528 |
08D6: MOVWF 5A |
- |
|
4529 |
08D7: MOVF 40,W |
- |
|
4530 |
08D8: MOVWF 59 |
- |
|
4531 |
08D9: MOVF 3F,W |
- |
|
4532 |
08DA: MOVWF 58 |
- |
|
4533 |
08DB: MOVF 3E,W |
- |
|
4534 |
08DC: MOVWF 57 |
- |
|
4535 |
08DD: BCF 0A.3 |
- |
|
4536 |
08DE: CALL 426 |
- |
|
4537 |
08DF: BSF 0A.3 |
- |
|
4538 |
08E0: MOVF 7A,W |
- |
|
4539 |
08E1: MOVWF 45 |
- |
|
4540 |
08E2: MOVF 79,W |
- |
|
4541 |
08E3: MOVWF 44 |
- |
|
4542 |
08E4: MOVF 78,W |
- |
|
4543 |
08E5: MOVWF 43 |
- |
|
4544 |
08E6: MOVF 77,W |
- |
|
4545 |
08E7: MOVWF 42 |
- |
|
4546 |
.................... return t; |
- |
|
4547 |
08E8: MOVF 42,W |
- |
|
4548 |
08E9: MOVWF 77 |
- |
|
4549 |
08EA: MOVF 43,W |
- |
|
4550 |
08EB: MOVWF 78 |
- |
|
4551 |
08EC: MOVF 44,W |
- |
|
4552 |
08ED: MOVWF 79 |
- |
|
4553 |
08EE: MOVF 45,W |
- |
|
4554 |
08EF: MOVWF 7A |
- |
|
4555 |
.................... } |
- |
|
4556 |
08F0: BSF 0A.3 |
- |
|
4557 |
08F1: BCF 0A.4 |
- |
|
4558 |
08F2: GOTO 5DA (RETURN) |
- |
|
4559 |
.................... |
- |
|
4560 |
.................... float mpl3115_A (void) //vyska v m |
- |
|
4561 |
.................... { |
- |
|
4562 |
.................... |
- |
|
4563 |
.................... int16 m, c; |
- |
|
4564 |
.................... float l, a; |
- |
|
4565 |
.................... |
- |
|
4566 |
.................... m = mpl3115_read (0x01); |
- |
|
4567 |
.................... c = mpl3115_read (0x02); |
- |
|
4568 |
.................... l = (float)(mpl3115_read(0x03)>>4)/16.0; |
- |
|
4569 |
.................... a = (float)((m << 8)|c) + l; |
- |
|
4570 |
.................... return a; |
- |
|
4571 |
.................... } |
- |
|
4572 |
.................... |
- |
|
4573 |
.................... |
- |
|
4574 |
.................... float mpl3115_P (void) //tlak v Pa |
- |
|
4575 |
.................... { |
- |
|
4576 |
.................... unsigned int32 m; |
- |
|
4577 |
.................... unsigned int16 c; |
- |
|
4578 |
.................... unsigned int l; |
- |
|
4579 |
.................... float p, l1; |
- |
|
4580 |
.................... |
- |
|
4581 |
.................... m = mpl3115_read (0x01); |
- |
|
4582 |
08F3: MOVLW 01 |
- |
|
4583 |
08F4: MOVWF 4C |
- |
|
4584 |
08F5: BCF 0A.3 |
- |
|
4585 |
08F6: CALL 79C |
- |
|
4586 |
08F7: BSF 0A.3 |
- |
|
4587 |
08F8: CLRF 40 |
- |
|
4588 |
08F9: CLRF 3F |
- |
|
4589 |
08FA: CLRF 3E |
- |
|
4590 |
08FB: MOVF 78,W |
- |
|
4591 |
08FC: MOVWF 3D |
- |
|
4592 |
.................... c = mpl3115_read (0x02); |
- |
|
4593 |
08FD: MOVLW 02 |
- |
|
4594 |
08FE: MOVWF 4C |
- |
|
4595 |
08FF: BCF 0A.3 |
- |
|
4596 |
0900: CALL 79C |
- |
|
4597 |
0901: BSF 0A.3 |
- |
|
4598 |
0902: CLRF 42 |
- |
|
4599 |
0903: MOVF 78,W |
- |
|
4600 |
0904: MOVWF 41 |
- |
|
4601 |
.................... l = mpl3115_read(0x03); |
- |
|
4602 |
0905: MOVLW 03 |
- |
|
4603 |
0906: MOVWF 4C |
- |
|
4604 |
0907: BCF 0A.3 |
- |
|
4605 |
0908: CALL 79C |
- |
|
4606 |
0909: BSF 0A.3 |
- |
|
4607 |
090A: MOVF 78,W |
- |
|
4608 |
090B: MOVWF 43 |
- |
|
4609 |
.................... |
- |
|
4610 |
.................... l1= (float)(l>>4)/4.0; |
- |
|
4611 |
090C: SWAPF 43,W |
- |
|
4612 |
090D: MOVWF 77 |
- |
|
4613 |
090E: MOVLW 0F |
- |
|
4614 |
090F: ANDWF 77,F |
- |
|
4615 |
0910: MOVF 77,W |
- |
|
4616 |
0911: CLRF 4E |
- |
|
4617 |
0912: MOVWF 4D |
- |
|
4618 |
0913: BCF 0A.3 |
- |
|
4619 |
0914: CALL 2CA |
- |
|
4620 |
0915: BSF 0A.3 |
- |
|
4621 |
0916: MOVF 77,W |
- |
|
4622 |
0917: MOVWF 4D |
- |
|
4623 |
0918: MOVF 78,W |
- |
|
4624 |
0919: MOVWF 4E |
- |
|
4625 |
091A: MOVF 79,W |
- |
|
4626 |
091B: MOVWF 4F |
- |
|
4627 |
091C: MOVF 7A,W |
- |
|
4628 |
091D: MOVWF 50 |
- |
|
4629 |
091E: MOVWF 54 |
- |
|
4630 |
091F: MOVF 79,W |
- |
|
4631 |
0920: MOVWF 53 |
- |
|
4632 |
0921: MOVF 78,W |
- |
|
4633 |
0922: MOVWF 52 |
- |
|
4634 |
0923: MOVF 77,W |
- |
|
4635 |
0924: MOVWF 51 |
- |
|
4636 |
0925: CLRF 58 |
- |
|
4637 |
0926: CLRF 57 |
- |
|
4638 |
0927: CLRF 56 |
- |
|
4639 |
0928: MOVLW 81 |
- |
|
4640 |
0929: MOVWF 55 |
- |
|
4641 |
092A: BCF 0A.3 |
- |
|
4642 |
092B: CALL 2E7 |
- |
|
4643 |
092C: BSF 0A.3 |
- |
|
4644 |
092D: MOVF 7A,W |
- |
|
4645 |
092E: MOVWF 4B |
- |
|
4646 |
092F: MOVF 79,W |
- |
|
4647 |
0930: MOVWF 4A |
- |
|
4648 |
0931: MOVF 78,W |
- |
|
4649 |
0932: MOVWF 49 |
- |
|
4650 |
0933: MOVF 77,W |
- |
|
4651 |
0934: MOVWF 48 |
- |
|
4652 |
.................... p = (float)((m << 10)|(c<<2)|(l>>6)) + l1; |
- |
|
4653 |
0935: CLRF 4D |
- |
|
4654 |
0936: RLF 3D,W |
- |
|
4655 |
0937: MOVWF 4E |
- |
|
4656 |
0938: RLF 3E,W |
- |
|
4657 |
0939: MOVWF 4F |
- |
|
4658 |
093A: RLF 3F,W |
- |
|
4659 |
093B: MOVWF 50 |
- |
|
4660 |
093C: RLF 4E,F |
- |
|
4661 |
093D: RLF 4F,F |
- |
|
4662 |
093E: RLF 50,F |
- |
|
4663 |
093F: MOVLW FC |
- |
|
4664 |
0940: ANDWF 4E,F |
- |
|
4665 |
0941: RLF 41,W |
- |
|
4666 |
0942: MOVWF 79 |
- |
|
4667 |
0943: RLF 42,W |
- |
|
4668 |
0944: MOVWF 7A |
- |
|
4669 |
0945: RLF 79,F |
- |
|
4670 |
0946: RLF 7A,F |
- |
|
4671 |
0947: MOVLW FC |
- |
|
4672 |
0948: ANDWF 79,F |
- |
|
4673 |
0949: MOVF 79,W |
- |
|
4674 |
094A: IORWF 4D,F |
- |
|
4675 |
094B: MOVF 7A,W |
- |
|
4676 |
094C: IORWF 4E,F |
- |
|
4677 |
094D: SWAPF 43,W |
- |
|
4678 |
094E: MOVWF 77 |
- |
|
4679 |
094F: RRF 77,F |
- |
|
4680 |
0950: RRF 77,F |
- |
|
4681 |
0951: MOVLW 03 |
- |
|
4682 |
0952: ANDWF 77,F |
- |
|
4683 |
0953: MOVF 77,W |
- |
|
4684 |
0954: IORWF 4D,W |
- |
|
4685 |
0955: MOVWF 77 |
- |
|
4686 |
0956: MOVF 4E,W |
- |
|
4687 |
0957: MOVWF 78 |
- |
|
4688 |
0958: MOVF 4F,W |
- |
|
4689 |
0959: MOVWF 79 |
- |
|
4690 |
095A: MOVF 50,W |
- |
|
4691 |
095B: MOVWF 7A |
- |
|
4692 |
095C: MOVF 7A,W |
- |
|
4693 |
095D: MOVWF 56 |
- |
|
4694 |
095E: MOVF 79,W |
- |
|
4695 |
095F: MOVWF 55 |
- |
|
4696 |
0960: MOVF 78,W |
- |
|
4697 |
0961: MOVWF 54 |
- |
|
4698 |
0962: MOVF 77,W |
- |
|
4699 |
0963: MOVWF 53 |
- |
|
4700 |
* |
- |
|
4701 |
097E: MOVF 77,W |
- |
|
4702 |
097F: MOVWF 4D |
- |
|
4703 |
0980: MOVF 78,W |
- |
|
4704 |
0981: MOVWF 4E |
- |
|
4705 |
0982: MOVF 79,W |
- |
|
4706 |
0983: MOVWF 4F |
- |
|
4707 |
0984: MOVF 7A,W |
- |
|
4708 |
0985: MOVWF 50 |
- |
|
4709 |
0986: BCF 03.1 |
- |
|
4710 |
0987: MOVF 7A,W |
- |
|
4711 |
0988: MOVWF 56 |
- |
|
4712 |
0989: MOVF 79,W |
- |
|
4713 |
098A: MOVWF 55 |
- |
|
4714 |
098B: MOVF 78,W |
- |
|
4715 |
098C: MOVWF 54 |
- |
|
4716 |
098D: MOVF 77,W |
- |
|
4717 |
098E: MOVWF 53 |
- |
|
4718 |
098F: MOVF 4B,W |
- |
|
4719 |
0990: MOVWF 5A |
- |
|
4720 |
0991: MOVF 4A,W |
- |
|
4721 |
0992: MOVWF 59 |
- |
|
4722 |
0993: MOVF 49,W |
- |
|
4723 |
0994: MOVWF 58 |
- |
|
4724 |
0995: MOVF 48,W |
- |
|
4725 |
0996: MOVWF 57 |
- |
|
4726 |
0997: BCF 0A.3 |
- |
|
4727 |
0998: CALL 426 |
- |
|
4728 |
0999: BSF 0A.3 |
- |
|
4729 |
099A: MOVF 7A,W |
- |
|
4730 |
099B: MOVWF 47 |
- |
|
4731 |
099C: MOVF 79,W |
- |
|
4732 |
099D: MOVWF 46 |
- |
|
4733 |
099E: MOVF 78,W |
- |
|
4734 |
099F: MOVWF 45 |
- |
|
4735 |
09A0: MOVF 77,W |
- |
|
4736 |
09A1: MOVWF 44 |
- |
|
4737 |
.................... |
- |
|
4738 |
.................... return p; |
- |
|
4739 |
09A2: MOVF 44,W |
- |
|
4740 |
09A3: MOVWF 77 |
- |
|
4741 |
09A4: MOVF 45,W |
- |
|
4742 |
09A5: MOVWF 78 |
- |
|
4743 |
09A6: MOVF 46,W |
- |
|
4744 |
09A7: MOVWF 79 |
- |
|
4745 |
09A8: MOVF 47,W |
- |
|
4746 |
09A9: MOVWF 7A |
- |
|
4747 |
.................... } |
- |
|
4748 |
09AA: BSF 0A.3 |
- |
|
4749 |
09AB: BCF 0A.4 |
- |
|
4750 |
09AC: GOTO 5E3 (RETURN) |
- |
|
4751 |
.................... |
- |
|
4752 |
.................... |
- |
|
4753 |
.................... |
- |
|
4754 |
.................... |
- |
|
4755 |
.................... |
4092 |
.................... |
4756 |
.................... |
4093 |
.................... void main() |
4757 |
.................... void main() |
4094 |
.................... { |
4758 |
.................... { |
4095 |
* |
4759 |
* |
4096 |
0AB7: CLRF 04 |
4760 |
0CE5: CLRF 04 |
4097 |
0AB8: BCF 03.7 |
4761 |
0CE6: BCF 03.7 |
4098 |
0AB9: MOVLW 1F |
4762 |
0CE7: MOVLW 1F |
4099 |
0ABA: ANDWF 03,F |
4763 |
0CE8: ANDWF 03,F |
4100 |
0ABB: MOVLW 71 |
4764 |
0CE9: MOVLW 71 |
4101 |
0ABC: BSF 03.5 |
4765 |
0CEA: BSF 03.5 |
4102 |
0ABD: MOVWF 0F |
4766 |
0CEB: MOVWF 0F |
4103 |
0ABE: MOVF 0F,W |
4767 |
0CEC: MOVF 0F,W |
4104 |
0ABF: BSF 03.6 |
4768 |
0CED: BSF 03.6 |
4105 |
0AC0: BCF 07.3 |
4769 |
0CEE: BCF 07.3 |
4106 |
0AC1: MOVLW 0C |
4770 |
0CEF: MOVLW 0C |
4107 |
0AC2: BCF 03.6 |
4771 |
0CF0: BCF 03.6 |
4108 |
0AC3: MOVWF 19 |
4772 |
0CF1: MOVWF 19 |
4109 |
0AC4: MOVLW A2 |
4773 |
0CF2: MOVLW A2 |
4110 |
0AC5: MOVWF 18 |
4774 |
0CF3: MOVWF 18 |
4111 |
0AC6: MOVLW 90 |
4775 |
0CF4: MOVLW 90 |
4112 |
0AC7: BCF 03.5 |
4776 |
0CF5: BCF 03.5 |
4113 |
0AC8: MOVWF 18 |
4777 |
0CF6: MOVWF 18 |
4114 |
0AC9: BSF 03.5 |
4778 |
0CF7: BSF 03.5 |
4115 |
0ACA: BSF 03.6 |
4779 |
0CF8: BSF 03.6 |
4116 |
0ACB: MOVF 09,W |
4780 |
0CF9: MOVF 09,W |
4117 |
0ACC: ANDLW C0 |
4781 |
0CFA: ANDLW C0 |
4118 |
0ACD: MOVWF 09 |
4782 |
0CFB: MOVWF 09 |
4119 |
0ACE: BCF 03.6 |
4783 |
0CFC: BCF 03.6 |
4120 |
0ACF: BCF 1F.4 |
4784 |
0CFD: BCF 1F.4 |
4121 |
0AD0: BCF 1F.5 |
4785 |
0CFE: BCF 1F.5 |
4122 |
0AD1: MOVLW 00 |
4786 |
0CFF: MOVLW 00 |
4123 |
0AD2: BSF 03.6 |
4787 |
0D00: BSF 03.6 |
4124 |
0AD3: MOVWF 08 |
4788 |
0D01: MOVWF 08 |
4125 |
0AD4: BCF 03.5 |
4789 |
0D02: BCF 03.5 |
4126 |
0AD5: CLRF 07 |
4790 |
0D03: CLRF 07 |
4127 |
0AD6: CLRF 08 |
4791 |
0D04: CLRF 08 |
4128 |
0AD7: CLRF 09 |
4792 |
0D05: CLRF 09 |
4129 |
* |
4793 |
* |
4130 |
0AE1: CLRF 34 |
4794 |
0D0F: CLRF 3C |
4131 |
0AE2: CLRF 33 |
4795 |
0D10: CLRF 3B |
4132 |
.................... float temp1, temp2, humidity; |
4796 |
.................... float temp1, temp2, temp3, humidity, preasure; |
4133 |
.................... int16 i=0; |
4797 |
.................... int16 i=0; |
4134 |
.................... |
4798 |
.................... |
4135 |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
4799 |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
4136 |
0AE3: BSF 03.5 |
4800 |
0D11: BSF 03.5 |
4137 |
0AE4: BSF 03.6 |
4801 |
0D12: BSF 03.6 |
4138 |
0AE5: MOVF 09,W |
4802 |
0D13: MOVF 09,W |
4139 |
0AE6: ANDLW C0 |
4803 |
0D14: ANDLW C0 |
4140 |
0AE7: MOVWF 09 |
4804 |
0D15: MOVWF 09 |
4141 |
0AE8: BCF 03.6 |
4805 |
0D16: BCF 03.6 |
4142 |
0AE9: BCF 1F.4 |
4806 |
0D17: BCF 1F.4 |
4143 |
0AEA: BCF 1F.5 |
4807 |
0D18: BCF 1F.5 |
4144 |
0AEB: MOVLW 00 |
4808 |
0D19: MOVLW 00 |
4145 |
0AEC: BSF 03.6 |
4809 |
0D1A: BSF 03.6 |
4146 |
0AED: MOVWF 08 |
4810 |
0D1B: MOVWF 08 |
4147 |
.................... setup_adc(ADC_CLOCK_DIV_2); |
4811 |
.................... setup_adc(ADC_CLOCK_DIV_2); |
4148 |
0AEE: BCF 03.5 |
4812 |
0D1C: BCF 03.5 |
4149 |
0AEF: BCF 03.6 |
4813 |
0D1D: BCF 03.6 |
4150 |
0AF0: BCF 1F.6 |
4814 |
0D1E: BCF 1F.6 |
4151 |
0AF1: BCF 1F.7 |
4815 |
0D1F: BCF 1F.7 |
4152 |
0AF2: BSF 03.5 |
4816 |
0D20: BSF 03.5 |
4153 |
0AF3: BSF 1F.7 |
4817 |
0D21: BSF 1F.7 |
4154 |
0AF4: BCF 03.5 |
4818 |
0D22: BCF 03.5 |
4155 |
0AF5: BSF 1F.0 |
4819 |
0D23: BSF 1F.0 |
4156 |
.................... setup_spi(SPI_SS_DISABLED); |
4820 |
.................... setup_spi(SPI_SS_DISABLED); |
4157 |
0AF6: BCF 14.5 |
4821 |
0D24: BCF 14.5 |
4158 |
0AF7: BCF 20.5 |
4822 |
0D25: BCF 20.5 |
4159 |
0AF8: MOVF 20,W |
4823 |
0D26: MOVF 20,W |
4160 |
0AF9: BSF 03.5 |
4824 |
0D27: BSF 03.5 |
4161 |
0AFA: MOVWF 07 |
4825 |
0D28: MOVWF 07 |
4162 |
0AFB: BCF 03.5 |
4826 |
0D29: BCF 03.5 |
4163 |
0AFC: BSF 20.4 |
4827 |
0D2A: BSF 20.4 |
4164 |
0AFD: MOVF 20,W |
4828 |
0D2B: MOVF 20,W |
4165 |
0AFE: BSF 03.5 |
4829 |
0D2C: BSF 03.5 |
4166 |
0AFF: MOVWF 07 |
4830 |
0D2D: MOVWF 07 |
4167 |
0B00: BCF 03.5 |
4831 |
0D2E: BCF 03.5 |
4168 |
0B01: BCF 20.3 |
4832 |
0D2F: BCF 20.3 |
4169 |
0B02: MOVF 20,W |
4833 |
0D30: MOVF 20,W |
4170 |
0B03: BSF 03.5 |
4834 |
0D31: BSF 03.5 |
4171 |
0B04: MOVWF 07 |
4835 |
0D32: MOVWF 07 |
4172 |
0B05: MOVLW 01 |
4836 |
0D33: MOVLW 01 |
4173 |
0B06: BCF 03.5 |
4837 |
0D34: BCF 03.5 |
4174 |
0B07: MOVWF 14 |
4838 |
0D35: MOVWF 14 |
4175 |
0B08: MOVLW 00 |
4839 |
0D36: MOVLW 00 |
4176 |
0B09: BSF 03.5 |
4840 |
0D37: BSF 03.5 |
4177 |
0B0A: MOVWF 14 |
4841 |
0D38: MOVWF 14 |
4178 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
4842 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
4179 |
0B0B: MOVF 01,W |
4843 |
0D39: MOVF 01,W |
4180 |
0B0C: ANDLW C7 |
4844 |
0D3A: ANDLW C7 |
4181 |
0B0D: IORLW 08 |
4845 |
0D3B: IORLW 08 |
4182 |
0B0E: MOVWF 01 |
4846 |
0D3C: MOVWF 01 |
4183 |
.................... setup_timer_1(T1_DISABLED); |
4847 |
.................... setup_timer_1(T1_DISABLED); |
4184 |
0B0F: BCF 03.5 |
4848 |
0D3D: BCF 03.5 |
4185 |
0B10: CLRF 10 |
4849 |
0D3E: CLRF 10 |
4186 |
.................... setup_timer_2(T2_DISABLED,0,1); |
4850 |
.................... setup_timer_2(T2_DISABLED,0,1); |
4187 |
0B11: MOVLW 00 |
4851 |
0D3F: MOVLW 00 |
4188 |
0B12: MOVWF 78 |
4852 |
0D40: MOVWF 78 |
4189 |
0B13: MOVWF 12 |
4853 |
0D41: MOVWF 12 |
4190 |
0B14: MOVLW 00 |
4854 |
0D42: MOVLW 00 |
4191 |
0B15: BSF 03.5 |
4855 |
0D43: BSF 03.5 |
4192 |
0B16: MOVWF 12 |
4856 |
0D44: MOVWF 12 |
4193 |
.................... setup_ccp1(CCP_OFF); |
4857 |
.................... setup_ccp1(CCP_OFF); |
4194 |
0B17: BCF 03.5 |
4858 |
0D45: BCF 03.5 |
4195 |
0B18: BSF 20.2 |
4859 |
0D46: BSF 20.2 |
4196 |
0B19: MOVF 20,W |
4860 |
0D47: MOVF 20,W |
4197 |
0B1A: BSF 03.5 |
4861 |
0D48: BSF 03.5 |
4198 |
0B1B: MOVWF 07 |
4862 |
0D49: MOVWF 07 |
4199 |
0B1C: BCF 03.5 |
4863 |
0D4A: BCF 03.5 |
4200 |
0B1D: CLRF 17 |
4864 |
0D4B: CLRF 17 |
4201 |
0B1E: BSF 03.5 |
4865 |
0D4C: BSF 03.5 |
4202 |
0B1F: CLRF 1B |
4866 |
0D4D: CLRF 1B |
4203 |
0B20: CLRF 1C |
4867 |
0D4E: CLRF 1C |
4204 |
0B21: MOVLW 01 |
4868 |
0D4F: MOVLW 01 |
4205 |
0B22: MOVWF 1D |
4869 |
0D50: MOVWF 1D |
4206 |
.................... setup_comparator(NC_NC_NC_NC); // This device COMP currently not supported by the PICWizard |
4870 |
.................... setup_comparator(NC_NC_NC_NC); // This device COMP currently not supported by the PICWizard |
4207 |
0B23: BCF 03.5 |
4871 |
0D51: BCF 03.5 |
4208 |
0B24: BSF 03.6 |
4872 |
0D52: BSF 03.6 |
4209 |
0B25: CLRF 07 |
4873 |
0D53: CLRF 07 |
4210 |
0B26: CLRF 08 |
4874 |
0D54: CLRF 08 |
4211 |
0B27: CLRF 09 |
4875 |
0D55: CLRF 09 |
4212 |
.................... setup_oscillator(OSC_8MHZ); |
4876 |
.................... setup_oscillator(OSC_8MHZ); |
4213 |
0B28: MOVLW 71 |
4877 |
0D56: MOVLW 71 |
4214 |
0B29: BSF 03.5 |
4878 |
0D57: BSF 03.5 |
4215 |
0B2A: BCF 03.6 |
4879 |
0D58: BCF 03.6 |
4216 |
0B2B: MOVWF 0F |
4880 |
0D59: MOVWF 0F |
4217 |
0B2C: MOVF 0F,W |
4881 |
0D5A: MOVF 0F,W |
4218 |
.................... |
4882 |
.................... |
4219 |
.................... |
4883 |
.................... |
4220 |
.................... printf("GeoMet01A\r\n"); |
4884 |
.................... printf("GeoMet01A\r\n"); |
4221 |
0B2D: MOVLW 0C |
4885 |
0D5B: MOVLW 0C |
4222 |
0B2E: BCF 03.5 |
4886 |
0D5C: BCF 03.5 |
4223 |
0B2F: BSF 03.6 |
4887 |
0D5D: BSF 03.6 |
4224 |
0B30: MOVWF 0D |
4888 |
0D5E: MOVWF 0D |
4225 |
0B31: MOVLW 00 |
4889 |
0D5F: MOVLW 00 |
4226 |
0B32: MOVWF 0F |
4890 |
0D60: MOVWF 0F |
4227 |
0B33: BCF 0A.3 |
4891 |
0D61: BCF 0A.3 |
4228 |
0B34: BCF 03.6 |
4892 |
0D62: BCF 03.6 |
4229 |
0B35: CALL 030 |
4893 |
0D63: CALL 030 |
4230 |
0B36: BSF 0A.3 |
4894 |
0D64: BSF 0A.3 |
4231 |
.................... printf("(c) Kaklik 2013\r\n"); |
4895 |
.................... printf("(c) Kaklik 2013\r\n"); |
4232 |
0B37: MOVLW 12 |
4896 |
0D65: MOVLW 12 |
4233 |
0B38: BSF 03.6 |
4897 |
0D66: BSF 03.6 |
4234 |
0B39: MOVWF 0D |
4898 |
0D67: MOVWF 0D |
4235 |
0B3A: MOVLW 00 |
4899 |
0D68: MOVLW 00 |
4236 |
0B3B: MOVWF 0F |
4900 |
0D69: MOVWF 0F |
4237 |
0B3C: BCF 0A.3 |
4901 |
0D6A: BCF 0A.3 |
4238 |
0B3D: BCF 03.6 |
4902 |
0D6B: BCF 03.6 |
4239 |
0B3E: CALL 030 |
4903 |
0D6C: CALL 030 |
4240 |
0B3F: BSF 0A.3 |
4904 |
0D6D: BSF 0A.3 |
4241 |
.................... printf("www.mlab.cz\r\n"); |
4905 |
.................... printf("www.mlab.cz\r\n"); |
4242 |
0B40: MOVLW 1B |
4906 |
0D6E: MOVLW 1B |
4243 |
0B41: BSF 03.6 |
4907 |
0D6F: BSF 03.6 |
4244 |
0B42: MOVWF 0D |
4908 |
0D70: MOVWF 0D |
4245 |
0B43: MOVLW 00 |
4909 |
0D71: MOVLW 00 |
4246 |
0B44: MOVWF 0F |
4910 |
0D72: MOVWF 0F |
4247 |
0B45: BCF 0A.3 |
4911 |
0D73: BCF 0A.3 |
4248 |
0B46: BCF 03.6 |
4912 |
0D74: BCF 03.6 |
4249 |
0B47: CALL 030 |
4913 |
0D75: CALL 030 |
4250 |
0B48: BSF 0A.3 |
4914 |
0D76: BSF 0A.3 |
4251 |
.................... |
4915 |
.................... |
4252 |
.................... // Init the HMC5883L. Set Mode register for |
4916 |
.................... // Init the HMC5883L. Set Mode register for |
4253 |
.................... // continuous measurements. |
4917 |
.................... // continuous measurements. |
4254 |
.................... hmc5883l_write_reg(HMC5883L_CFG_A_REG, 0x18); // no average, maximal update range |
4918 |
.................... hmc5883l_write_reg(HMC5883L_CFG_A_REG, 0x18); // no average, maximal update range |
4255 |
0B49: CLRF 35 |
4919 |
0D77: CLRF 3D |
4256 |
0B4A: MOVLW 18 |
4920 |
0D78: MOVLW 18 |
4257 |
0B4B: MOVWF 36 |
4921 |
0D79: MOVWF 3E |
4258 |
0B4C: BCF 0A.3 |
4922 |
0D7A: BCF 0A.3 |
4259 |
0B4D: CALL 0C2 |
4923 |
0D7B: CALL 0C2 |
4260 |
0B4E: BSF 0A.3 |
4924 |
0D7C: BSF 0A.3 |
4261 |
.................... hmc5883l_write_reg(HMC5883L_CFG_B_REG, 0x00); // minimal range |
4925 |
.................... hmc5883l_write_reg(HMC5883L_CFG_B_REG, 0x00); // minimal range |
4262 |
0B4F: MOVLW 01 |
4926 |
0D7D: MOVLW 01 |
4263 |
0B50: MOVWF 35 |
4927 |
0D7E: MOVWF 3D |
4264 |
0B51: CLRF 36 |
4928 |
0D7F: CLRF 3E |
4265 |
0B52: BCF 0A.3 |
4929 |
0D80: BCF 0A.3 |
4266 |
0B53: CALL 0C2 |
4930 |
0D81: CALL 0C2 |
4267 |
0B54: BSF 0A.3 |
4931 |
0D82: BSF 0A.3 |
4268 |
.................... hmc5883l_write_reg(HMC5883L_MODE_REG, 0x00); |
4932 |
.................... hmc5883l_write_reg(HMC5883L_MODE_REG, 0x00); |
4269 |
0B55: MOVLW 02 |
4933 |
0D83: MOVLW 02 |
4270 |
0B56: MOVWF 35 |
4934 |
0D84: MOVWF 3D |
4271 |
0B57: CLRF 36 |
4935 |
0D85: CLRF 3E |
4272 |
0B58: BCF 0A.3 |
4936 |
0D86: BCF 0A.3 |
4273 |
0B59: CALL 0C2 |
4937 |
0D87: CALL 0C2 |
4274 |
0B5A: BSF 0A.3 |
4938 |
0D88: BSF 0A.3 |
4275 |
.................... |
4939 |
.................... |
4276 |
.................... lcd_init(); |
4940 |
.................... lcd_init(); |
4277 |
0B5B: BCF 0A.3 |
4941 |
0D89: BCF 0A.3 |
4278 |
0B5C: CALL 1C8 |
4942 |
0D8A: CALL 1C8 |
4279 |
0B5D: BSF 0A.3 |
4943 |
0D8B: BSF 0A.3 |
4280 |
.................... lcd_putc("(c) Kaklik 2013"); |
4944 |
.................... lcd_putc("(c) Kaklik 2013"); |
4281 |
0B5E: MOVLW 22 |
4945 |
0D8C: MOVLW 22 |
4282 |
0B5F: BSF 03.6 |
4946 |
0D8D: BSF 03.6 |
4283 |
0B60: MOVWF 0D |
4947 |
0D8E: MOVWF 0D |
4284 |
0B61: MOVLW 00 |
4948 |
0D8F: MOVLW 00 |
4285 |
0B62: MOVWF 0F |
4949 |
0D90: MOVWF 0F |
4286 |
0B63: BCF 0A.3 |
4950 |
0D91: BCF 0A.3 |
4287 |
0B64: BCF 03.6 |
4951 |
0D92: BCF 03.6 |
4288 |
0B65: CALL 23F |
4952 |
0D93: CALL 23F |
4289 |
0B66: BSF 0A.3 |
4953 |
0D94: BSF 0A.3 |
4290 |
.................... lcd_gotoxy(3,2); |
4954 |
.................... lcd_gotoxy(3,2); |
4291 |
0B67: MOVLW 03 |
4955 |
0D95: MOVLW 03 |
4292 |
0B68: MOVWF 43 |
4956 |
0D96: MOVWF 4B |
4293 |
0B69: MOVLW 02 |
4957 |
0D97: MOVLW 02 |
4294 |
0B6A: MOVWF 44 |
4958 |
0D98: MOVWF 4C |
4295 |
0B6B: BCF 0A.3 |
4959 |
0D99: BCF 0A.3 |
4296 |
0B6C: CALL 200 |
4960 |
0D9A: CALL 200 |
4297 |
0B6D: BSF 0A.3 |
4961 |
0D9B: BSF 0A.3 |
4298 |
.................... lcd_putc("www.mlab.cz"); |
4962 |
.................... lcd_putc("www.mlab.cz"); |
4299 |
0B6E: MOVLW 2A |
4963 |
0D9C: MOVLW 2A |
4300 |
0B6F: BSF 03.6 |
4964 |
0D9D: BSF 03.6 |
4301 |
0B70: MOVWF 0D |
4965 |
0D9E: MOVWF 0D |
4302 |
0B71: MOVLW 00 |
4966 |
0D9F: MOVLW 00 |
4303 |
0B72: MOVWF 0F |
4967 |
0DA0: MOVWF 0F |
4304 |
0B73: BCF 0A.3 |
4968 |
0DA1: BCF 0A.3 |
4305 |
0B74: BCF 03.6 |
4969 |
0DA2: BCF 03.6 |
4306 |
0B75: CALL 23F |
4970 |
0DA3: CALL 23F |
4307 |
0B76: BSF 0A.3 |
4971 |
0DA4: BSF 0A.3 |
4308 |
.................... Delay_ms(2000); |
4972 |
.................... Delay_ms(2000); |
4309 |
0B77: MOVLW 08 |
4973 |
0DA5: MOVLW 08 |
4310 |
0B78: MOVWF 35 |
4974 |
0DA6: MOVWF 3D |
4311 |
0B79: MOVLW FA |
4975 |
0DA7: MOVLW FA |
4312 |
0B7A: MOVWF 43 |
4976 |
0DA8: MOVWF 4B |
4313 |
0B7B: BCF 0A.3 |
4977 |
0DA9: BCF 0A.3 |
4314 |
0B7C: CALL 0FB |
4978 |
0DAA: CALL 0FB |
4315 |
0B7D: BSF 0A.3 |
4979 |
0DAB: BSF 0A.3 |
4316 |
0B7E: DECFSZ 35,F |
4980 |
0DAC: DECFSZ 3D,F |
4317 |
0B7F: GOTO 379 |
4981 |
0DAD: GOTO 5A7 |
4318 |
.................... lcd_init(); |
4982 |
.................... lcd_init(); |
4319 |
0B80: BCF 0A.3 |
4983 |
0DAE: BCF 0A.3 |
4320 |
0B81: CALL 1C8 |
4984 |
0DAF: CALL 1C8 |
4321 |
0B82: BSF 0A.3 |
4985 |
0DB0: BSF 0A.3 |
4322 |
.................... |
4986 |
.................... |
4323 |
.................... while (TRUE) |
4987 |
.................... while (TRUE) |
4324 |
.................... { |
4988 |
.................... { |
4325 |
.................... lcd_gotoxy(1,1); |
4989 |
.................... lcd_gotoxy(1,1); |
4326 |
0B83: MOVLW 01 |
4990 |
0DB1: MOVLW 01 |
4327 |
0B84: MOVWF 43 |
4991 |
0DB2: MOVWF 4B |
4328 |
0B85: MOVWF 44 |
4992 |
0DB3: MOVWF 4C |
4329 |
0B86: BCF 0A.3 |
4993 |
0DB4: BCF 0A.3 |
4330 |
0B87: CALL 200 |
4994 |
0DB5: CALL 200 |
4331 |
0B88: BSF 0A.3 |
4995 |
0DB6: BSF 0A.3 |
4332 |
.................... temp1 = SHT25_get_temp(); |
4996 |
.................... temp1 = SHT25_get_temp(); |
4333 |
0B89: BCF 0A.3 |
4997 |
0DB7: BCF 0A.3 |
4334 |
0B8A: GOTO 567 |
4998 |
0DB8: GOTO 567 |
4335 |
0B8B: BSF 0A.3 |
4999 |
0DB9: BSF 0A.3 |
4336 |
0B8C: MOVF 7A,W |
5000 |
0DBA: MOVF 7A,W |
4337 |
0B8D: MOVWF 2A |
5001 |
0DBB: MOVWF 2A |
4338 |
0B8E: MOVF 79,W |
5002 |
0DBC: MOVF 79,W |
4339 |
0B8F: MOVWF 29 |
5003 |
0DBD: MOVWF 29 |
4340 |
0B90: MOVF 78,W |
5004 |
0DBE: MOVF 78,W |
4341 |
0B91: MOVWF 28 |
5005 |
0DBF: MOVWF 28 |
4342 |
0B92: MOVF 77,W |
5006 |
0DC0: MOVF 77,W |
4343 |
0B93: MOVWF 27 |
5007 |
0DC1: MOVWF 27 |
4344 |
.................... humidity = SHT25_get_hum(); |
5008 |
.................... humidity = SHT25_get_hum(); |
4345 |
0B94: BCF 0A.3 |
5009 |
0DC2: BCF 0A.3 |
4346 |
0B95: GOTO 636 |
5010 |
0DC3: GOTO 636 |
4347 |
0B96: BSF 0A.3 |
5011 |
0DC4: BSF 0A.3 |
4348 |
0B97: MOVF 7A,W |
5012 |
0DC5: MOVF 7A,W |
4349 |
0B98: MOVWF 32 |
5013 |
0DC6: MOVWF 36 |
4350 |
0B99: MOVF 79,W |
5014 |
0DC7: MOVF 79,W |
4351 |
0B9A: MOVWF 31 |
5015 |
0DC8: MOVWF 35 |
4352 |
0B9B: MOVF 78,W |
5016 |
0DC9: MOVF 78,W |
4353 |
0B9C: MOVWF 30 |
5017 |
0DCA: MOVWF 34 |
4354 |
0B9D: MOVF 77,W |
5018 |
0DCB: MOVF 77,W |
4355 |
0B9E: MOVWF 2F |
5019 |
0DCC: MOVWF 33 |
4356 |
.................... temp2= LTS01_get_temp(); |
5020 |
.................... temp2= LTS01_get_temp(); |
4357 |
0B9F: BCF 0A.3 |
5021 |
0DCD: BCF 0A.3 |
4358 |
0BA0: GOTO 6EC |
5022 |
0DCE: GOTO 6EC |
4359 |
0BA1: BSF 0A.3 |
5023 |
0DCF: BSF 0A.3 |
4360 |
0BA2: MOVF 7A,W |
5024 |
0DD0: MOVF 7A,W |
4361 |
0BA3: MOVWF 2E |
5025 |
0DD1: MOVWF 2E |
4362 |
0BA4: MOVF 79,W |
5026 |
0DD2: MOVF 79,W |
4363 |
0BA5: MOVWF 2D |
5027 |
0DD3: MOVWF 2D |
4364 |
0BA6: MOVF 78,W |
5028 |
0DD4: MOVF 78,W |
4365 |
0BA7: MOVWF 2C |
5029 |
0DD5: MOVWF 2C |
4366 |
0BA8: MOVF 77,W |
5030 |
0DD6: MOVF 77,W |
4367 |
0BA9: MOVWF 2B |
5031 |
0DD7: MOVWF 2B |
4368 |
.................... hmc5883l_read_data(); |
5032 |
.................... hmc5883l_read_data(); |
4369 |
0BAA: GOTO 000 |
5033 |
0DD8: GOTO 000 |
4370 |
.................... |
5034 |
.................... |
4371 |
.................... printf(lcd_putc,"%f C %f \%%",temp1, humidity); |
5035 |
.................... temp3=mpl3115_T(); |
- |
|
5036 |
0DD9: GOTO 091 |
- |
|
5037 |
0DDA: MOVF 7A,W |
4372 |
0BAB: MOVLW 89 |
5038 |
0DDB: MOVWF 32 |
- |
|
5039 |
0DDC: MOVF 79,W |
- |
|
5040 |
0DDD: MOVWF 31 |
- |
|
5041 |
0DDE: MOVF 78,W |
- |
|
5042 |
0DDF: MOVWF 30 |
- |
|
5043 |
0DE0: MOVF 77,W |
4373 |
0BAC: MOVWF 04 |
5044 |
0DE1: MOVWF 2F |
- |
|
5045 |
.................... preasure=mpl3115_P(); |
- |
|
5046 |
0DE2: GOTO 0F3 |
4374 |
0BAD: MOVF 2A,W |
5047 |
0DE3: MOVF 7A,W |
4375 |
0BAE: MOVWF 38 |
5048 |
0DE4: MOVWF 3A |
4376 |
0BAF: MOVF 29,W |
5049 |
0DE5: MOVF 79,W |
4377 |
0BB0: MOVWF 37 |
5050 |
0DE6: MOVWF 39 |
4378 |
0BB1: MOVF 28,W |
5051 |
0DE7: MOVF 78,W |
4379 |
0BB2: MOVWF 36 |
5052 |
0DE8: MOVWF 38 |
4380 |
0BB3: MOVF 27,W |
5053 |
0DE9: MOVF 77,W |
4381 |
0BB4: MOVWF 35 |
5054 |
0DEA: MOVWF 37 |
- |
|
5055 |
.................... mpl3115_setP(); //nastaveni pro tlak a teplotu |
- |
|
5056 |
0DEB: GOTO 1AD |
- |
|
5057 |
.................... |
- |
|
5058 |
.................... printf(lcd_putc,"%2.2f%cC %2.2f\%%",temp1, 0xb2, humidity); |
4382 |
0BB5: MOVLW 02 |
5059 |
0DEC: MOVLW 89 |
4383 |
0BB6: MOVWF 39 |
5060 |
0DED: MOVWF 04 |
4384 |
0BB7: CALL 091 |
5061 |
0DEE: MOVF 2A,W |
4385 |
0BB8: MOVLW 20 |
5062 |
0DEF: MOVWF 40 |
- |
|
5063 |
0DF0: MOVF 29,W |
- |
|
5064 |
0DF1: MOVWF 3F |
- |
|
5065 |
0DF2: MOVF 28,W |
4386 |
0BB9: MOVWF 42 |
5066 |
0DF3: MOVWF 3E |
4387 |
0BBA: BCF 0A.3 |
5067 |
0DF4: MOVF 27,W |
- |
|
5068 |
0DF5: MOVWF 3D |
4388 |
0BBB: CALL 212 |
5069 |
0DF6: MOVLW 02 |
- |
|
5070 |
0DF7: MOVWF 41 |
4389 |
0BBC: BSF 0A.3 |
5071 |
0DF8: CALL 2CB |
4390 |
0BBD: MOVLW 43 |
5072 |
0DF9: MOVLW B2 |
4391 |
0BBE: MOVWF 42 |
5073 |
0DFA: MOVWF 4A |
4392 |
0BBF: BCF 0A.3 |
5074 |
0DFB: BCF 0A.3 |
4393 |
0BC0: CALL 212 |
5075 |
0DFC: CALL 212 |
4394 |
0BC1: BSF 0A.3 |
5076 |
0DFD: BSF 0A.3 |
4395 |
0BC2: MOVLW 20 |
5077 |
0DFE: MOVLW 43 |
4396 |
0BC3: MOVWF 42 |
5078 |
0DFF: MOVWF 4A |
4397 |
0BC4: BCF 0A.3 |
5079 |
0E00: BCF 0A.3 |
4398 |
0BC5: CALL 212 |
5080 |
0E01: CALL 212 |
4399 |
0BC6: BSF 0A.3 |
5081 |
0E02: BSF 0A.3 |
4400 |
0BC7: MOVLW 89 |
5082 |
0E03: MOVLW 20 |
4401 |
0BC8: MOVWF 04 |
5083 |
0E04: MOVWF 4A |
- |
|
5084 |
0E05: BCF 0A.3 |
4402 |
0BC9: MOVF 32,W |
5085 |
0E06: CALL 212 |
4403 |
0BCA: MOVWF 38 |
5086 |
0E07: BSF 0A.3 |
4404 |
0BCB: MOVF 31,W |
5087 |
0E08: MOVLW 89 |
4405 |
0BCC: MOVWF 37 |
5088 |
0E09: MOVWF 04 |
4406 |
0BCD: MOVF 30,W |
5089 |
0E0A: MOVF 36,W |
4407 |
0BCE: MOVWF 36 |
5090 |
0E0B: MOVWF 40 |
4408 |
0BCF: MOVF 2F,W |
5091 |
0E0C: MOVF 35,W |
4409 |
0BD0: MOVWF 35 |
5092 |
0E0D: MOVWF 3F |
4410 |
0BD1: MOVLW 02 |
5093 |
0E0E: MOVF 34,W |
4411 |
0BD2: MOVWF 39 |
5094 |
0E0F: MOVWF 3E |
4412 |
0BD3: CALL 091 |
5095 |
0E10: MOVF 33,W |
4413 |
0BD4: MOVLW 20 |
5096 |
0E11: MOVWF 3D |
4414 |
0BD5: MOVWF 42 |
5097 |
0E12: MOVLW 02 |
4415 |
0BD6: BCF 0A.3 |
5098 |
0E13: MOVWF 41 |
4416 |
0BD7: CALL 212 |
5099 |
0E14: CALL 2CB |
4417 |
0BD8: BSF 0A.3 |
- |
|
4418 |
0BD9: MOVLW 25 |
5100 |
0E15: MOVLW 25 |
4419 |
0BDA: MOVWF 42 |
5101 |
0E16: MOVWF 4A |
4420 |
0BDB: BCF 0A.3 |
5102 |
0E17: BCF 0A.3 |
4421 |
0BDC: CALL 212 |
5103 |
0E18: CALL 212 |
4422 |
0BDD: BSF 0A.3 |
5104 |
0E19: BSF 0A.3 |
4423 |
.................... lcd_gotoxy(1,2); |
5105 |
.................... lcd_gotoxy(1,2); |
4424 |
0BDE: MOVLW 01 |
5106 |
0E1A: MOVLW 01 |
4425 |
0BDF: MOVWF 43 |
5107 |
0E1B: MOVWF 4B |
4426 |
0BE0: MOVLW 02 |
5108 |
0E1C: MOVLW 02 |
4427 |
0BE1: MOVWF 44 |
5109 |
0E1D: MOVWF 4C |
4428 |
0BE2: BCF 0A.3 |
5110 |
0E1E: BCF 0A.3 |
4429 |
0BE3: CALL 200 |
5111 |
0E1F: CALL 200 |
4430 |
0BE4: BSF 0A.3 |
5112 |
0E20: BSF 0A.3 |
4431 |
.................... printf(lcd_putc," %f C",temp2); |
5113 |
.................... printf(lcd_putc,"%2.2f%cC %6.0fPa ",temp2, 0xb2, preasure); |
4432 |
0BE5: MOVLW 20 |
5114 |
0E21: MOVLW 89 |
4433 |
0BE6: MOVWF 42 |
5115 |
0E22: MOVWF 04 |
4434 |
0BE7: BCF 0A.3 |
5116 |
0E23: MOVF 2E,W |
4435 |
0BE8: CALL 212 |
5117 |
0E24: MOVWF 40 |
4436 |
0BE9: BSF 0A.3 |
5118 |
0E25: MOVF 2D,W |
4437 |
0BEA: MOVLW 89 |
5119 |
0E26: MOVWF 3F |
4438 |
0BEB: MOVWF 04 |
5120 |
0E27: MOVF 2C,W |
4439 |
0BEC: MOVF 2E,W |
5121 |
0E28: MOVWF 3E |
4440 |
0BED: MOVWF 38 |
5122 |
0E29: MOVF 2B,W |
4441 |
0BEE: MOVF 2D,W |
5123 |
0E2A: MOVWF 3D |
4442 |
0BEF: MOVWF 37 |
5124 |
0E2B: MOVLW 02 |
4443 |
0BF0: MOVF 2C,W |
5125 |
0E2C: MOVWF 41 |
4444 |
0BF1: MOVWF 36 |
5126 |
0E2D: CALL 2CB |
4445 |
0BF2: MOVF 2B,W |
5127 |
0E2E: MOVLW B2 |
4446 |
0BF3: MOVWF 35 |
5128 |
0E2F: MOVWF 4A |
4447 |
0BF4: MOVLW 02 |
5129 |
0E30: BCF 0A.3 |
4448 |
0BF5: MOVWF 39 |
5130 |
0E31: CALL 212 |
4449 |
0BF6: CALL 091 |
5131 |
0E32: BSF 0A.3 |
4450 |
0BF7: MOVLW 20 |
5132 |
0E33: MOVLW 43 |
4451 |
0BF8: MOVWF 42 |
5133 |
0E34: MOVWF 4A |
4452 |
0BF9: BCF 0A.3 |
5134 |
0E35: BCF 0A.3 |
4453 |
0BFA: CALL 212 |
5135 |
0E36: CALL 212 |
4454 |
0BFB: BSF 0A.3 |
5136 |
0E37: BSF 0A.3 |
4455 |
0BFC: MOVLW 43 |
5137 |
0E38: MOVLW 20 |
4456 |
0BFD: MOVWF 42 |
5138 |
0E39: MOVWF 4A |
4457 |
0BFE: BCF 0A.3 |
5139 |
0E3A: BCF 0A.3 |
4458 |
0BFF: CALL 212 |
5140 |
0E3B: CALL 212 |
4459 |
0C00: BSF 0A.3 |
5141 |
0E3C: BSF 0A.3 |
4460 |
.................... printf("%ld %f %f %f ",i, temp1, humidity, temp2); |
5142 |
0E3D: MOVLW 05 |
4461 |
0C01: MOVLW 10 |
5143 |
0E3E: MOVWF 04 |
4462 |
0C02: MOVWF 04 |
5144 |
0E3F: MOVF 3A,W |
4463 |
0C03: MOVF 34,W |
5145 |
0E40: MOVWF 40 |
4464 |
0C04: MOVWF 36 |
5146 |
0E41: MOVF 39,W |
4465 |
0C05: MOVF 33,W |
5147 |
0E42: MOVWF 3F |
4466 |
0C06: MOVWF 35 |
5148 |
0E43: MOVF 38,W |
4467 |
0C07: CALL 16B |
5149 |
0E44: MOVWF 3E |
4468 |
0C08: MOVLW 20 |
5150 |
0E45: MOVF 37,W |
4469 |
0C09: BTFSS 0C.4 |
5151 |
0E46: MOVWF 3D |
4470 |
0C0A: GOTO 409 |
5152 |
0E47: CLRF 41 |
4471 |
0C0B: MOVWF 19 |
5153 |
0E48: CALL 2CB |
4472 |
0C0C: MOVLW 89 |
5154 |
0E49: MOVLW 50 |
4473 |
0C0D: MOVWF 04 |
5155 |
0E4A: MOVWF 4A |
4474 |
0C0E: MOVF 2A,W |
5156 |
0E4B: BCF 0A.3 |
4475 |
0C0F: MOVWF 38 |
5157 |
0E4C: CALL 212 |
4476 |
0C10: MOVF 29,W |
5158 |
0E4D: BSF 0A.3 |
4477 |
0C11: MOVWF 37 |
5159 |
0E4E: MOVLW 61 |
4478 |
0C12: MOVF 28,W |
5160 |
0E4F: MOVWF 4A |
4479 |
0C13: MOVWF 36 |
5161 |
0E50: BCF 0A.3 |
4480 |
0C14: MOVF 27,W |
5162 |
0E51: CALL 212 |
4481 |
0C15: MOVWF 35 |
5163 |
0E52: BSF 0A.3 |
4482 |
0C16: MOVLW 02 |
5164 |
0E53: MOVLW 20 |
4483 |
0C17: MOVWF 39 |
5165 |
0E54: MOVWF 4A |
4484 |
0C18: CALL 1E1 |
5166 |
0E55: BCF 0A.3 |
4485 |
0C19: MOVLW 20 |
5167 |
0E56: CALL 212 |
4486 |
0C1A: BTFSS 0C.4 |
5168 |
0E57: BSF 0A.3 |
4487 |
0C1B: GOTO 41A |
5169 |
.................... |
4488 |
0C1C: MOVWF 19 |
5170 |
.................... printf("%ld %f %f %f %6.2f %3.2f %Ld %Ld %Ld \n\r",i, temp1, humidity, temp2, preasure, temp3, compass.x, compass.y, compass.z); |
4489 |
0C1D: MOVLW 89 |
5171 |
0E58: MOVLW 10 |
4490 |
0C1E: MOVWF 04 |
5172 |
0E59: MOVWF 04 |
4491 |
0C1F: MOVF 32,W |
5173 |
0E5A: MOVF 3C,W |
4492 |
0C20: MOVWF 38 |
5174 |
0E5B: MOVWF 3E |
4493 |
0C21: MOVF 31,W |
5175 |
0E5C: MOVF 3B,W |
4494 |
0C22: MOVWF 37 |
5176 |
0E5D: MOVWF 3D |
4495 |
0C23: MOVF 30,W |
5177 |
0E5E: CALL 39F |
4496 |
0C24: MOVWF 36 |
5178 |
0E5F: MOVLW 20 |
4497 |
0C25: MOVF 2F,W |
5179 |
0E60: BTFSS 0C.4 |
4498 |
0C26: MOVWF 35 |
5180 |
0E61: GOTO 660 |
4499 |
0C27: MOVLW 02 |
5181 |
0E62: MOVWF 19 |
4500 |
0C28: MOVWF 39 |
5182 |
0E63: MOVLW 89 |
4501 |
0C29: CALL 1E1 |
5183 |
0E64: MOVWF 04 |
4502 |
0C2A: MOVLW 20 |
5184 |
0E65: MOVF 2A,W |
4503 |
0C2B: BTFSS 0C.4 |
5185 |
0E66: MOVWF 40 |
4504 |
0C2C: GOTO 42B |
5186 |
0E67: MOVF 29,W |
4505 |
0C2D: MOVWF 19 |
5187 |
0E68: MOVWF 3F |
4506 |
0C2E: MOVLW 89 |
5188 |
0E69: MOVF 28,W |
4507 |
0C2F: MOVWF 04 |
5189 |
0E6A: MOVWF 3E |
4508 |
0C30: MOVF 2E,W |
5190 |
0E6B: MOVF 27,W |
4509 |
0C31: MOVWF 38 |
5191 |
0E6C: MOVWF 3D |
4510 |
0C32: MOVF 2D,W |
5192 |
0E6D: MOVLW 02 |
4511 |
0C33: MOVWF 37 |
5193 |
0E6E: MOVWF 41 |
4512 |
0C34: MOVF 2C,W |
5194 |
0E6F: CALL 415 |
4513 |
0C35: MOVWF 36 |
5195 |
0E70: MOVLW 20 |
4514 |
0C36: MOVF 2B,W |
5196 |
0E71: BTFSS 0C.4 |
4515 |
0C37: MOVWF 35 |
5197 |
0E72: GOTO 671 |
4516 |
0C38: MOVLW 02 |
5198 |
0E73: MOVWF 19 |
4517 |
0C39: MOVWF 39 |
5199 |
0E74: MOVLW 89 |
4518 |
0C3A: CALL 1E1 |
5200 |
0E75: MOVWF 04 |
4519 |
0C3B: MOVLW 20 |
5201 |
0E76: MOVF 36,W |
4520 |
0C3C: BTFSS 0C.4 |
5202 |
0E77: MOVWF 40 |
4521 |
0C3D: GOTO 43C |
5203 |
0E78: MOVF 35,W |
4522 |
0C3E: MOVWF 19 |
5204 |
0E79: MOVWF 3F |
4523 |
.................... printf("%Ld %Ld %Ld \n\r", compass.x, compass.y, compass.z); |
5205 |
0E7A: MOVF 34,W |
4524 |
0C3F: MOVLW 10 |
5206 |
0E7B: MOVWF 3E |
4525 |
0C40: MOVWF 04 |
5207 |
0E7C: MOVF 33,W |
4526 |
0C41: MOVF 22,W |
5208 |
0E7D: MOVWF 3D |
4527 |
0C42: MOVWF 36 |
5209 |
0E7E: MOVLW 02 |
4528 |
0C43: MOVF 21,W |
5210 |
0E7F: MOVWF 41 |
4529 |
0C44: MOVWF 35 |
5211 |
0E80: CALL 415 |
4530 |
0C45: CALL 16B |
5212 |
0E81: MOVLW 20 |
4531 |
0C46: MOVLW 20 |
5213 |
0E82: BTFSS 0C.4 |
4532 |
0C47: BTFSS 0C.4 |
5214 |
0E83: GOTO 682 |
4533 |
0C48: GOTO 447 |
5215 |
0E84: MOVWF 19 |
4534 |
0C49: MOVWF 19 |
5216 |
0E85: MOVLW 89 |
4535 |
0C4A: MOVLW 10 |
5217 |
0E86: MOVWF 04 |
4536 |
0C4B: MOVWF 04 |
5218 |
0E87: MOVF 2E,W |
4537 |
0C4C: MOVF 24,W |
5219 |
0E88: MOVWF 40 |
4538 |
0C4D: MOVWF 36 |
5220 |
0E89: MOVF 2D,W |
4539 |
0C4E: MOVF 23,W |
5221 |
0E8A: MOVWF 3F |
4540 |
0C4F: MOVWF 35 |
5222 |
0E8B: MOVF 2C,W |
4541 |
0C50: CALL 16B |
5223 |
0E8C: MOVWF 3E |
4542 |
0C51: MOVLW 20 |
5224 |
0E8D: MOVF 2B,W |
4543 |
0C52: BTFSS 0C.4 |
5225 |
0E8E: MOVWF 3D |
4544 |
0C53: GOTO 452 |
5226 |
0E8F: MOVLW 02 |
4545 |
0C54: MOVWF 19 |
5227 |
0E90: MOVWF 41 |
4546 |
0C55: MOVLW 10 |
5228 |
0E91: CALL 415 |
4547 |
0C56: MOVWF 04 |
5229 |
0E92: MOVLW 20 |
4548 |
0C57: MOVF 26,W |
5230 |
0E93: BTFSS 0C.4 |
4549 |
0C58: MOVWF 36 |
5231 |
0E94: GOTO 693 |
4550 |
0C59: MOVF 25,W |
5232 |
0E95: MOVWF 19 |
4551 |
0C5A: MOVWF 35 |
5233 |
0E96: MOVLW 05 |
4552 |
0C5B: CALL 16B |
5234 |
0E97: MOVWF 04 |
4553 |
0C5C: MOVLW 20 |
5235 |
0E98: MOVF 3A,W |
4554 |
0C5D: BTFSS 0C.4 |
5236 |
0E99: MOVWF 40 |
4555 |
0C5E: GOTO 45D |
5237 |
0E9A: MOVF 39,W |
4556 |
0C5F: MOVWF 19 |
5238 |
0E9B: MOVWF 3F |
4557 |
0C60: MOVLW 0A |
5239 |
0E9C: MOVF 38,W |
4558 |
0C61: BTFSS 0C.4 |
5240 |
0E9D: MOVWF 3E |
4559 |
0C62: GOTO 461 |
5241 |
0E9E: MOVF 37,W |
4560 |
0C63: MOVWF 19 |
5242 |
0E9F: MOVWF 3D |
4561 |
0C64: MOVLW 0D |
5243 |
0EA0: MOVLW 02 |
4562 |
0C65: BTFSS 0C.4 |
5244 |
0EA1: MOVWF 41 |
4563 |
0C66: GOTO 465 |
5245 |
0EA2: CALL 415 |
4564 |
0C67: MOVWF 19 |
5246 |
0EA3: MOVLW 20 |
- |
|
5247 |
0EA4: BTFSS 0C.4 |
- |
|
5248 |
0EA5: GOTO 6A4 |
- |
|
5249 |
0EA6: MOVWF 19 |
- |
|
5250 |
0EA7: MOVLW 02 |
- |
|
5251 |
0EA8: MOVWF 04 |
- |
|
5252 |
0EA9: MOVF 32,W |
- |
|
5253 |
0EAA: MOVWF 40 |
- |
|
5254 |
0EAB: MOVF 31,W |
- |
|
5255 |
0EAC: MOVWF 3F |
- |
|
5256 |
0EAD: MOVF 30,W |
- |
|
5257 |
0EAE: MOVWF 3E |
- |
|
5258 |
0EAF: MOVF 2F,W |
- |
|
5259 |
0EB0: MOVWF 3D |
- |
|
5260 |
0EB1: MOVLW 02 |
- |
|
5261 |
0EB2: MOVWF 41 |
- |
|
5262 |
0EB3: CALL 415 |
- |
|
5263 |
0EB4: MOVLW 20 |
- |
|
5264 |
0EB5: BTFSS 0C.4 |
- |
|
5265 |
0EB6: GOTO 6B5 |
- |
|
5266 |
0EB7: MOVWF 19 |
- |
|
5267 |
0EB8: MOVLW 10 |
- |
|
5268 |
0EB9: MOVWF 04 |
- |
|
5269 |
0EBA: MOVF 22,W |
- |
|
5270 |
0EBB: MOVWF 3E |
- |
|
5271 |
0EBC: MOVF 21,W |
- |
|
5272 |
0EBD: MOVWF 3D |
- |
|
5273 |
0EBE: CALL 39F |
- |
|
5274 |
0EBF: MOVLW 20 |
- |
|
5275 |
0EC0: BTFSS 0C.4 |
- |
|
5276 |
0EC1: GOTO 6C0 |
- |
|
5277 |
0EC2: MOVWF 19 |
- |
|
5278 |
0EC3: MOVLW 10 |
- |
|
5279 |
0EC4: MOVWF 04 |
- |
|
5280 |
0EC5: MOVF 24,W |
- |
|
5281 |
0EC6: MOVWF 3E |
- |
|
5282 |
0EC7: MOVF 23,W |
- |
|
5283 |
0EC8: MOVWF 3D |
- |
|
5284 |
0EC9: CALL 39F |
- |
|
5285 |
0ECA: MOVLW 20 |
- |
|
5286 |
0ECB: BTFSS 0C.4 |
- |
|
5287 |
0ECC: GOTO 6CB |
- |
|
5288 |
0ECD: MOVWF 19 |
- |
|
5289 |
0ECE: MOVLW 10 |
- |
|
5290 |
0ECF: MOVWF 04 |
- |
|
5291 |
0ED0: MOVF 26,W |
- |
|
5292 |
0ED1: MOVWF 3E |
- |
|
5293 |
0ED2: MOVF 25,W |
- |
|
5294 |
0ED3: MOVWF 3D |
- |
|
5295 |
0ED4: CALL 39F |
- |
|
5296 |
0ED5: MOVLW 20 |
- |
|
5297 |
0ED6: BTFSS 0C.4 |
- |
|
5298 |
0ED7: GOTO 6D6 |
- |
|
5299 |
0ED8: MOVWF 19 |
- |
|
5300 |
0ED9: MOVLW 0A |
- |
|
5301 |
0EDA: BTFSS 0C.4 |
- |
|
5302 |
0EDB: GOTO 6DA |
- |
|
5303 |
0EDC: MOVWF 19 |
- |
|
5304 |
0EDD: MOVLW 0D |
- |
|
5305 |
0EDE: BTFSS 0C.4 |
- |
|
5306 |
0EDF: GOTO 6DE |
- |
|
5307 |
0EE0: MOVWF 19 |
4565 |
.................... i++; |
5308 |
.................... i++; |
4566 |
0C68: INCF 33,F |
5309 |
0EE1: INCF 3B,F |
4567 |
0C69: BTFSC 03.2 |
5310 |
0EE2: BTFSC 03.2 |
4568 |
0C6A: INCF 34,F |
5311 |
0EE3: INCF 3C,F |
- |
|
5312 |
.................... |
4569 |
.................... Delay_ms(100); |
5313 |
.................... Delay_ms(100); |
4570 |
0C6B: MOVLW 64 |
5314 |
0EE4: MOVLW 64 |
4571 |
0C6C: MOVWF 43 |
5315 |
0EE5: MOVWF 4B |
4572 |
0C6D: BCF 0A.3 |
5316 |
0EE6: BCF 0A.3 |
4573 |
0C6E: CALL 0FB |
5317 |
0EE7: CALL 0FB |
4574 |
0C6F: BSF 0A.3 |
5318 |
0EE8: BSF 0A.3 |
4575 |
.................... } |
5319 |
.................... } |
4576 |
0C70: GOTO 383 |
5320 |
0EE9: GOTO 5B1 |
4577 |
.................... |
5321 |
.................... |
4578 |
.................... } |
5322 |
.................... } |
4579 |
0C71: SLEEP |
5323 |
0EEA: SLEEP |
4580 |
|
5324 |
|
4581 |
Configuration Fuses: |
5325 |
Configuration Fuses: |
4582 |
Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG |
5326 |
Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG |
4583 |
Word 2: 3FFF NOWRT BORV40 |
5327 |
Word 2: 3FFF NOWRT BORV40 |