CCS PCM C Compiler, Version 4.106, 47914               07-V-13 01:35

               Filename: Z:\home\kaklik\svnMLAB\Modules\Sensors\ALTIMET01A\SW\MPL3115\PIC16F887\main.lst

               ROM used: 2238 words (27%)
                         Largest free fragment is 2048
               RAM used: 18 (5%) at main() level
                         55 (15%) worst case
               Stack:    3 locations

*
0000:  MOVLW  08
0001:  MOVWF  0A
0002:  GOTO   000
0003:  NOP
.................... //Jan Chroust 15.4.2013 
....................  
....................  
.................... #include "main.h" 
.................... #include <16F887.h> 
.................... //////// Standard Header file for the PIC16F887 device //////////////// 
.................... #device PIC16F887 
.................... #list 
....................  
.................... #device adc=8 
....................  
.................... #FUSES NOWDT                       //No Watch Dog Timer 
.................... #FUSES INTRC                       //Internal RC Osc 
.................... #FUSES NOPUT                       //No Power Up Timer 
.................... #FUSES MCLR                        //Master Clear pin enabled 
.................... #FUSES NOPROTECT                   //Code not protected from reading 
.................... #FUSES NOCPD                       //No EE protection 
.................... #FUSES NOBROWNOUT                  //No brownout reset 
.................... #FUSES IESO                        //Internal External Switch Over mode enabled 
.................... #FUSES FCMEN                       //Fail-safe clock monitor enabled 
.................... #FUSES NOLVP                       //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O 
.................... #FUSES NODEBUG                     //No Debug mode for ICD 
.................... #FUSES NOWRT                       //Program memory not write protected 
.................... #FUSES BORV40                      //Brownout reset at 4.0V 
....................  
.................... #use delay(clock=8000000) 
*
014A:  MOVLW  2E
014B:  MOVWF  04
014C:  BCF    03.7
014D:  MOVF   00,W
014E:  BTFSC  03.2
014F:  GOTO   15D
0150:  MOVLW  02
0151:  MOVWF  78
0152:  CLRF   77
0153:  DECFSZ 77,F
0154:  GOTO   153
0155:  DECFSZ 78,F
0156:  GOTO   152
0157:  MOVLW  97
0158:  MOVWF  77
0159:  DECFSZ 77,F
015A:  GOTO   159
015B:  DECFSZ 00,F
015C:  GOTO   150
015D:  RETURN
....................  
....................  
....................  
.................... #define EEPROM_SDA  PIN_B0 
.................... #define EEPROM_SCL  PIN_B1 
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL) 
*
00A5:  MOVLW  08
00A6:  MOVWF  78
00A7:  NOP
00A8:  BCF    06.1
00A9:  BSF    03.5
00AA:  BCF    06.1
00AB:  NOP
00AC:  BCF    03.5
00AD:  RLF    3E,F
00AE:  BCF    06.0
00AF:  BTFSS  03.0
00B0:  GOTO   0B4
00B1:  BSF    03.5
00B2:  BSF    06.0
00B3:  BCF    03.5
00B4:  BTFSC  03.0
00B5:  GOTO   0B9
00B6:  BSF    03.5
00B7:  BCF    06.0
00B8:  BCF    03.5
00B9:  BSF    03.5
00BA:  BSF    06.1
00BB:  BCF    03.5
00BC:  BTFSS  06.1
00BD:  GOTO   0BC
00BE:  DECFSZ 78,F
00BF:  GOTO   0A7
00C0:  NOP
00C1:  BCF    06.1
00C2:  BSF    03.5
00C3:  BCF    06.1
00C4:  NOP
00C5:  BSF    06.0
00C6:  NOP
00C7:  NOP
00C8:  BSF    06.1
00C9:  BCF    03.5
00CA:  BTFSS  06.1
00CB:  GOTO   0CA
00CC:  CLRF   78
00CD:  NOP
00CE:  BTFSC  06.0
00CF:  BSF    78.0
00D0:  BCF    06.1
00D1:  BSF    03.5
00D2:  BCF    06.1
00D3:  BCF    03.5
00D4:  BCF    06.0
00D5:  BSF    03.5
00D6:  BCF    06.0
00D7:  BCF    03.5
00D8:  RETURN
*
0188:  MOVLW  08
0189:  MOVWF  3F
018A:  MOVF   77,W
018B:  MOVWF  40
018C:  BSF    03.5
018D:  BSF    06.0
018E:  NOP
018F:  BSF    06.1
0190:  BCF    03.5
0191:  BTFSS  06.1
0192:  GOTO   191
0193:  BTFSC  06.0
0194:  BSF    03.0
0195:  BTFSS  06.0
0196:  BCF    03.0
0197:  RLF    78,F
0198:  NOP
0199:  BSF    03.5
019A:  BCF    06.1
019B:  BCF    03.5
019C:  BCF    06.1
019D:  DECFSZ 3F,F
019E:  GOTO   18C
019F:  BSF    03.5
01A0:  BSF    06.0
01A1:  NOP
01A2:  BCF    03.5
01A3:  BCF    06.0
01A4:  MOVF   40,W
01A5:  BTFSC  03.2
01A6:  GOTO   1AA
01A7:  BSF    03.5
01A8:  BCF    06.0
01A9:  BCF    03.5
01AA:  NOP
01AB:  BSF    03.5
01AC:  BSF    06.1
01AD:  BCF    03.5
01AE:  BTFSS  06.1
01AF:  GOTO   1AE
01B0:  NOP
01B1:  BCF    06.1
01B2:  BSF    03.5
01B3:  BCF    06.1
01B4:  NOP
01B5:  BCF    03.5
01B6:  BCF    06.0
01B7:  BSF    03.5
01B8:  BCF    06.0
.................... #use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B2,bits=8) //rcv TXD xmit RXD 
*
003B:  BSF    03.5
003C:  BCF    06.3
003D:  BCF    03.5
003E:  BCF    06.3
003F:  MOVLW  08
0040:  MOVWF  78
0041:  GOTO   042
0042:  NOP
0043:  BSF    78.7
0044:  GOTO   053
0045:  BCF    78.7
0046:  RRF    3A,F
0047:  BTFSC  03.0
0048:  BSF    06.3
0049:  BTFSS  03.0
004A:  BCF    06.3
004B:  BSF    78.6
004C:  GOTO   053
004D:  BCF    78.6
004E:  DECFSZ 78,F
004F:  GOTO   046
0050:  GOTO   051
0051:  NOP
0052:  BSF    06.3
0053:  MOVLW  3F
0054:  MOVWF  04
0055:  DECFSZ 04,F
0056:  GOTO   055
0057:  NOP
0058:  BTFSC  78.7
0059:  GOTO   045
005A:  BTFSC  78.6
005B:  GOTO   04D
005C:  RETURN
....................  
.................... #define MPL3115_ADDR_R  0xC1 //addresa pro cteni 
.................... #define MPL3115_ADDR_W  0xC0 
....................  
....................  
.................... void mpl3115_setA (void) //nastavení pro výšku 
....................  { 
....................  
....................       
....................    i2c_start(); //STANDBY mode 
*
04F9:  BSF    03.5
04FA:  BSF    06.0
04FB:  NOP
04FC:  BSF    06.1
04FD:  NOP
04FE:  BCF    03.5
04FF:  BCF    06.0
0500:  BSF    03.5
0501:  BCF    06.0
0502:  NOP
0503:  BCF    03.5
0504:  BCF    06.1
0505:  BSF    03.5
0506:  BCF    06.1
....................    I2C_Write(MPL3115_ADDR_W); 
0507:  MOVLW  C0
0508:  BCF    03.5
0509:  MOVWF  3E
050A:  CALL   0A5
....................    I2C_write(0x26);   
050B:  MOVLW  26
050C:  MOVWF  3E
050D:  CALL   0A5
....................    I2C_write(0xB8); 
050E:  MOVLW  B8
050F:  MOVWF  3E
0510:  CALL   0A5
....................    i2c_stop(); 
0511:  BSF    03.5
0512:  BCF    06.0
0513:  NOP
0514:  BSF    06.1
0515:  BCF    03.5
0516:  BTFSS  06.1
0517:  GOTO   516
0518:  NOP
0519:  GOTO   51A
051A:  NOP
051B:  BSF    03.5
051C:  BSF    06.0
051D:  NOP
....................     
....................    i2c_start(); //PT_DATA_CFG set 
051E:  BSF    06.0
051F:  NOP
0520:  BSF    06.1
0521:  NOP
0522:  BCF    03.5
0523:  BCF    06.0
0524:  BSF    03.5
0525:  BCF    06.0
0526:  NOP
0527:  BCF    03.5
0528:  BCF    06.1
0529:  BSF    03.5
052A:  BCF    06.1
....................    I2C_Write(MPL3115_ADDR_W); 
052B:  MOVLW  C0
052C:  BCF    03.5
052D:  MOVWF  3E
052E:  CALL   0A5
....................    I2C_write(0x13);   
052F:  MOVLW  13
0530:  MOVWF  3E
0531:  CALL   0A5
....................    I2C_write(0x07); //hodnota 
0532:  MOVLW  07
0533:  MOVWF  3E
0534:  CALL   0A5
....................    i2c_stop(); 
0535:  BSF    03.5
0536:  BCF    06.0
0537:  NOP
0538:  BSF    06.1
0539:  BCF    03.5
053A:  BTFSS  06.1
053B:  GOTO   53A
053C:  NOP
053D:  GOTO   53E
053E:  NOP
053F:  BSF    03.5
0540:  BSF    06.0
0541:  NOP
....................     
....................    i2c_start();   //ACTIVE mode 
0542:  BSF    06.0
0543:  NOP
0544:  BSF    06.1
0545:  NOP
0546:  BCF    03.5
0547:  BCF    06.0
0548:  BSF    03.5
0549:  BCF    06.0
054A:  NOP
054B:  BCF    03.5
054C:  BCF    06.1
054D:  BSF    03.5
054E:  BCF    06.1
....................    I2C_Write(MPL3115_ADDR_W); 
054F:  MOVLW  C0
0550:  BCF    03.5
0551:  MOVWF  3E
0552:  CALL   0A5
....................    I2C_write(0x26);   
0553:  MOVLW  26
0554:  MOVWF  3E
0555:  CALL   0A5
....................    I2C_write(0xB9); 
0556:  MOVLW  B9
0557:  MOVWF  3E
0558:  CALL   0A5
....................    i2c_stop(); 
0559:  BSF    03.5
055A:  BCF    06.0
055B:  NOP
055C:  BSF    06.1
055D:  BCF    03.5
055E:  BTFSS  06.1
055F:  GOTO   55E
0560:  NOP
0561:  GOTO   562
0562:  NOP
0563:  BSF    03.5
0564:  BSF    06.0
0565:  NOP
....................   } 
0566:  BCF    03.5
0567:  BSF    0A.3
0568:  BCF    0A.4
0569:  GOTO   046 (RETURN)
....................    
.................... void mpl3115_setP (void) //nastavení pro tlak 
....................  { 
....................  
....................       
....................    i2c_start(); //STANDBY mode 
*
00D9:  BSF    03.5
00DA:  BSF    06.0
00DB:  NOP
00DC:  BSF    06.1
00DD:  NOP
00DE:  BCF    03.5
00DF:  BCF    06.0
00E0:  BSF    03.5
00E1:  BCF    06.0
00E2:  NOP
00E3:  BCF    03.5
00E4:  BCF    06.1
00E5:  BSF    03.5
00E6:  BCF    06.1
....................    I2C_Write(MPL3115_ADDR_W); 
00E7:  MOVLW  C0
00E8:  BCF    03.5
00E9:  MOVWF  3E
00EA:  CALL   0A5
....................    I2C_write(0x26);   
00EB:  MOVLW  26
00EC:  MOVWF  3E
00ED:  CALL   0A5
....................    I2C_write(0xB8); 
00EE:  MOVLW  B8
00EF:  MOVWF  3E
00F0:  CALL   0A5
....................    i2c_stop(); 
00F1:  BSF    03.5
00F2:  BCF    06.0
00F3:  NOP
00F4:  BSF    06.1
00F5:  BCF    03.5
00F6:  BTFSS  06.1
00F7:  GOTO   0F6
00F8:  NOP
00F9:  GOTO   0FA
00FA:  NOP
00FB:  BSF    03.5
00FC:  BSF    06.0
00FD:  NOP
....................     
....................    i2c_start(); //PT_DATA_CFG set 
00FE:  BSF    06.0
00FF:  NOP
0100:  BSF    06.1
0101:  NOP
0102:  BCF    03.5
0103:  BCF    06.0
0104:  BSF    03.5
0105:  BCF    06.0
0106:  NOP
0107:  BCF    03.5
0108:  BCF    06.1
0109:  BSF    03.5
010A:  BCF    06.1
....................    I2C_Write(MPL3115_ADDR_W); 
010B:  MOVLW  C0
010C:  BCF    03.5
010D:  MOVWF  3E
010E:  CALL   0A5
....................    I2C_write(0x13);   
010F:  MOVLW  13
0110:  MOVWF  3E
0111:  CALL   0A5
....................    I2C_write(0x07); //hodnota 
0112:  MOVLW  07
0113:  MOVWF  3E
0114:  CALL   0A5
....................    i2c_stop(); 
0115:  BSF    03.5
0116:  BCF    06.0
0117:  NOP
0118:  BSF    06.1
0119:  BCF    03.5
011A:  BTFSS  06.1
011B:  GOTO   11A
011C:  NOP
011D:  GOTO   11E
011E:  NOP
011F:  BSF    03.5
0120:  BSF    06.0
0121:  NOP
....................     
....................    i2c_start();   //ACTIVE mode 
0122:  BSF    06.0
0123:  NOP
0124:  BSF    06.1
0125:  NOP
0126:  BCF    03.5
0127:  BCF    06.0
0128:  BSF    03.5
0129:  BCF    06.0
012A:  NOP
012B:  BCF    03.5
012C:  BCF    06.1
012D:  BSF    03.5
012E:  BCF    06.1
....................    I2C_Write(MPL3115_ADDR_W); 
012F:  MOVLW  C0
0130:  BCF    03.5
0131:  MOVWF  3E
0132:  CALL   0A5
....................    I2C_write(0x26);   
0133:  MOVLW  26
0134:  MOVWF  3E
0135:  CALL   0A5
....................    I2C_write(0x39); 
0136:  MOVLW  39
0137:  MOVWF  3E
0138:  CALL   0A5
....................    i2c_stop(); 
0139:  BSF    03.5
013A:  BCF    06.0
013B:  NOP
013C:  BSF    06.1
013D:  BCF    03.5
013E:  BTFSS  06.1
013F:  GOTO   13E
0140:  NOP
0141:  GOTO   142
0142:  NOP
0143:  BSF    03.5
0144:  BSF    06.0
0145:  NOP
....................   } 
0146:  BCF    03.5
0147:  BSF    0A.3
0148:  BCF    0A.4
0149:  GOTO   024 (RETURN)
....................  
....................  
.................... byte mpl3115_read (byte reg) 
....................  { 
....................    byte i; 
....................       
....................    i2c_start();  
*
015E:  BSF    03.5
015F:  BSF    06.0
0160:  NOP
0161:  BSF    06.1
0162:  NOP
0163:  BCF    03.5
0164:  BCF    06.0
0165:  BSF    03.5
0166:  BCF    06.0
0167:  NOP
0168:  BCF    03.5
0169:  BCF    06.1
016A:  BSF    03.5
016B:  BCF    06.1
....................    I2C_Write(MPL3115_ADDR_W); 
016C:  MOVLW  C0
016D:  BCF    03.5
016E:  MOVWF  3E
016F:  CALL   0A5
....................    I2C_write(reg);   
0170:  MOVF   3C,W
0171:  MOVWF  3E
0172:  CALL   0A5
....................    i2c_start();  
0173:  BSF    03.5
0174:  BSF    06.0
0175:  NOP
0176:  BSF    06.1
0177:  NOP
0178:  BCF    03.5
0179:  BTFSS  06.1
017A:  GOTO   179
017B:  BCF    06.0
017C:  BSF    03.5
017D:  BCF    06.0
017E:  NOP
017F:  BCF    03.5
0180:  BCF    06.1
0181:  BSF    03.5
0182:  BCF    06.1
....................    I2C_Write(MPL3115_ADDR_R); 
0183:  MOVLW  C1
0184:  BCF    03.5
0185:  MOVWF  3E
0186:  CALL   0A5
....................    i=i2c_read(0); 
0187:  CLRF   77
*
01B9:  MOVF   78,W
01BA:  BCF    03.5
01BB:  MOVWF  3D
....................    i2c_stop(); 
01BC:  BSF    03.5
01BD:  BCF    06.0
01BE:  NOP
01BF:  BSF    06.1
01C0:  BCF    03.5
01C1:  BTFSS  06.1
01C2:  GOTO   1C1
01C3:  NOP
01C4:  GOTO   1C5
01C5:  NOP
01C6:  BSF    03.5
01C7:  BSF    06.0
01C8:  NOP
....................     
....................    return i; 
01C9:  BCF    03.5
01CA:  MOVF   3D,W
01CB:  MOVWF  78
....................   } 
01CC:  RETURN
....................  
....................  
.................... float mpl3115_T (void) //teplota ve stupnich 
.................... { 
.................... int m; 
.................... float l, t; 
....................   
....................    m= mpl3115_read (0x04); 
*
03F5:  MOVLW  04
03F6:  MOVWF  3C
03F7:  CALL   15E
03F8:  MOVF   78,W
03F9:  MOVWF  2D
....................    l= (float)(mpl3115_read(0x05)>>4)/16.0; 
03FA:  MOVLW  05
03FB:  MOVWF  3C
03FC:  CALL   15E
03FD:  SWAPF  78,W
03FE:  MOVWF  77
03FF:  MOVLW  0F
0400:  ANDWF  77,F
0401:  MOVF   77,W
0402:  CLRF   3E
0403:  MOVWF  3D
0404:  CALL   1CD
0405:  MOVF   77,W
0406:  MOVWF  36
0407:  MOVF   78,W
0408:  MOVWF  37
0409:  MOVF   79,W
040A:  MOVWF  38
040B:  MOVF   7A,W
040C:  MOVWF  39
040D:  MOVWF  44
040E:  MOVF   79,W
040F:  MOVWF  43
0410:  MOVF   78,W
0411:  MOVWF  42
0412:  MOVF   77,W
0413:  MOVWF  41
0414:  CLRF   48
0415:  CLRF   47
0416:  CLRF   46
0417:  MOVLW  83
0418:  MOVWF  45
0419:  CALL   1EA
041A:  MOVF   7A,W
041B:  MOVWF  31
041C:  MOVF   79,W
041D:  MOVWF  30
041E:  MOVF   78,W
041F:  MOVWF  2F
0420:  MOVF   77,W
0421:  MOVWF  2E
....................    t = (float)(M + L);  
0422:  CLRF   3E
0423:  MOVF   2D,W
0424:  MOVWF  3D
0425:  CALL   1CD
0426:  BCF    03.1
0427:  MOVF   7A,W
0428:  MOVWF  46
0429:  MOVF   79,W
042A:  MOVWF  45
042B:  MOVF   78,W
042C:  MOVWF  44
042D:  MOVF   77,W
042E:  MOVWF  43
042F:  MOVF   31,W
0430:  MOVWF  4A
0431:  MOVF   30,W
0432:  MOVWF  49
0433:  MOVF   2F,W
0434:  MOVWF  48
0435:  MOVF   2E,W
0436:  MOVWF  47
0437:  CALL   2B4
0438:  MOVF   7A,W
0439:  MOVWF  35
043A:  MOVF   79,W
043B:  MOVWF  34
043C:  MOVF   78,W
043D:  MOVWF  33
043E:  MOVF   77,W
043F:  MOVWF  32
....................  return t; 
0440:  MOVF   32,W
0441:  MOVWF  77
0442:  MOVF   33,W
0443:  MOVWF  78
0444:  MOVF   34,W
0445:  MOVWF  79
0446:  MOVF   35,W
0447:  MOVWF  7A
.................... } 
0448:  BSF    0A.3
0449:  BCF    0A.4
044A:  GOTO   030 (RETURN)
....................  
.................... float mpl3115_A (void) //vyska v m 
.................... { 
....................  
.................... int16 m, c; 
.................... float l, a; 
....................   
.................... m= mpl3115_read (0x01); 
*
056A:  MOVLW  01
056B:  MOVWF  3C
056C:  CALL   15E
056D:  CLRF   2E
056E:  MOVF   78,W
056F:  MOVWF  2D
.................... c= mpl3115_read (0x02);   
0570:  MOVLW  02
0571:  MOVWF  3C
0572:  CALL   15E
0573:  CLRF   30
0574:  MOVF   78,W
0575:  MOVWF  2F
.................... l= (float)(mpl3115_read(0x03)>>4)/16.0; 
0576:  MOVLW  03
0577:  MOVWF  3C
0578:  CALL   15E
0579:  SWAPF  78,W
057A:  MOVWF  77
057B:  MOVLW  0F
057C:  ANDWF  77,F
057D:  MOVF   77,W
057E:  CLRF   3E
057F:  MOVWF  3D
0580:  CALL   1CD
0581:  MOVF   77,W
0582:  MOVWF  39
0583:  MOVF   78,W
0584:  MOVWF  3A
0585:  MOVF   79,W
0586:  MOVWF  3B
0587:  MOVF   7A,W
0588:  MOVWF  3C
0589:  MOVWF  44
058A:  MOVF   79,W
058B:  MOVWF  43
058C:  MOVF   78,W
058D:  MOVWF  42
058E:  MOVF   77,W
058F:  MOVWF  41
0590:  CLRF   48
0591:  CLRF   47
0592:  CLRF   46
0593:  MOVLW  83
0594:  MOVWF  45
0595:  CALL   1EA
0596:  MOVF   7A,W
0597:  MOVWF  34
0598:  MOVF   79,W
0599:  MOVWF  33
059A:  MOVF   78,W
059B:  MOVWF  32
059C:  MOVF   77,W
059D:  MOVWF  31
.................... a = (float)((m << 8)|c) + l; 
059E:  MOVF   2D,W
059F:  MOVWF  3B
05A0:  CLRF   3A
05A1:  MOVF   3A,W
05A2:  IORWF  2F,W
05A3:  MOVWF  77
05A4:  MOVF   2D,W
05A5:  IORWF  30,W
05A6:  MOVWF  7A
05A7:  MOVF   77,W
05A8:  MOVWF  3D
05A9:  MOVF   7A,W
05AA:  MOVWF  3E
05AB:  CALL   1CD
05AC:  MOVF   77,W
05AD:  MOVWF  3A
05AE:  MOVF   78,W
05AF:  MOVWF  3B
05B0:  MOVF   79,W
05B1:  MOVWF  3C
05B2:  MOVF   7A,W
05B3:  MOVWF  3D
05B4:  BCF    03.1
05B5:  MOVF   7A,W
05B6:  MOVWF  46
05B7:  MOVF   79,W
05B8:  MOVWF  45
05B9:  MOVF   78,W
05BA:  MOVWF  44
05BB:  MOVF   77,W
05BC:  MOVWF  43
05BD:  MOVF   34,W
05BE:  MOVWF  4A
05BF:  MOVF   33,W
05C0:  MOVWF  49
05C1:  MOVF   32,W
05C2:  MOVWF  48
05C3:  MOVF   31,W
05C4:  MOVWF  47
05C5:  CALL   2B4
05C6:  MOVF   7A,W
05C7:  MOVWF  38
05C8:  MOVF   79,W
05C9:  MOVWF  37
05CA:  MOVF   78,W
05CB:  MOVWF  36
05CC:  MOVF   77,W
05CD:  MOVWF  35
....................  return a; 
05CE:  MOVF   35,W
05CF:  MOVWF  77
05D0:  MOVF   36,W
05D1:  MOVWF  78
05D2:  MOVF   37,W
05D3:  MOVWF  79
05D4:  MOVF   38,W
05D5:  MOVWF  7A
.................... } 
05D6:  BSF    0A.3
05D7:  BCF    0A.4
05D8:  GOTO   052 (RETURN)
....................  
....................  
.................... float mpl3115_P (void) //tlak v Pa 
.................... { 
.................... unsigned int32  m; 
.................... unsigned int16 c; 
.................... unsigned int l; 
.................... float p, l1; 
....................   
.................... m= mpl3115_read (0x01); 
*
044B:  MOVLW  01
044C:  MOVWF  3C
044D:  CALL   15E
044E:  CLRF   30
044F:  CLRF   2F
0450:  CLRF   2E
0451:  MOVF   78,W
0452:  MOVWF  2D
.................... c= mpl3115_read (0x02);   
0453:  MOVLW  02
0454:  MOVWF  3C
0455:  CALL   15E
0456:  CLRF   32
0457:  MOVF   78,W
0458:  MOVWF  31
.................... l=mpl3115_read(0x03); 
0459:  MOVLW  03
045A:  MOVWF  3C
045B:  CALL   15E
045C:  MOVF   78,W
045D:  MOVWF  33
....................  
.................... l1= (float)(l>>4)/4.0; 
045E:  SWAPF  33,W
045F:  MOVWF  77
0460:  MOVLW  0F
0461:  ANDWF  77,F
0462:  MOVF   77,W
0463:  CLRF   3E
0464:  MOVWF  3D
0465:  CALL   1CD
0466:  MOVF   77,W
0467:  MOVWF  3D
0468:  MOVF   78,W
0469:  MOVWF  3E
046A:  MOVF   79,W
046B:  MOVWF  3F
046C:  MOVF   7A,W
046D:  MOVWF  40
046E:  MOVWF  44
046F:  MOVF   79,W
0470:  MOVWF  43
0471:  MOVF   78,W
0472:  MOVWF  42
0473:  MOVF   77,W
0474:  MOVWF  41
0475:  CLRF   48
0476:  CLRF   47
0477:  CLRF   46
0478:  MOVLW  81
0479:  MOVWF  45
047A:  CALL   1EA
047B:  MOVF   7A,W
047C:  MOVWF  3B
047D:  MOVF   79,W
047E:  MOVWF  3A
047F:  MOVF   78,W
0480:  MOVWF  39
0481:  MOVF   77,W
0482:  MOVWF  38
.................... p = (float)((m << 10)|(c<<2)|(l>>6)) + l1; 
0483:  CLRF   3D
0484:  RLF    2D,W
0485:  MOVWF  3E
0486:  RLF    2E,W
0487:  MOVWF  3F
0488:  RLF    2F,W
0489:  MOVWF  40
048A:  RLF    3E,F
048B:  RLF    3F,F
048C:  RLF    40,F
048D:  MOVLW  FC
048E:  ANDWF  3E,F
048F:  RLF    31,W
0490:  MOVWF  79
0491:  RLF    32,W
0492:  MOVWF  7A
0493:  RLF    79,F
0494:  RLF    7A,F
0495:  MOVLW  FC
0496:  ANDWF  79,F
0497:  MOVF   79,W
0498:  IORWF  3D,F
0499:  MOVF   7A,W
049A:  IORWF  3E,F
049B:  SWAPF  33,W
049C:  MOVWF  77
049D:  RRF    77,F
049E:  RRF    77,F
049F:  MOVLW  03
04A0:  ANDWF  77,F
04A1:  MOVF   77,W
04A2:  IORWF  3D,W
04A3:  MOVWF  77
04A4:  MOVF   3E,W
04A5:  MOVWF  78
04A6:  MOVF   3F,W
04A7:  MOVWF  79
04A8:  MOVF   40,W
04A9:  MOVWF  7A
04AA:  MOVF   7A,W
04AB:  MOVWF  46
04AC:  MOVF   79,W
04AD:  MOVWF  45
04AE:  MOVF   78,W
04AF:  MOVWF  44
04B0:  MOVF   77,W
04B1:  MOVWF  43
*
04CC:  MOVF   77,W
04CD:  MOVWF  3D
04CE:  MOVF   78,W
04CF:  MOVWF  3E
04D0:  MOVF   79,W
04D1:  MOVWF  3F
04D2:  MOVF   7A,W
04D3:  MOVWF  40
04D4:  BCF    03.1
04D5:  MOVF   7A,W
04D6:  MOVWF  46
04D7:  MOVF   79,W
04D8:  MOVWF  45
04D9:  MOVF   78,W
04DA:  MOVWF  44
04DB:  MOVF   77,W
04DC:  MOVWF  43
04DD:  MOVF   3B,W
04DE:  MOVWF  4A
04DF:  MOVF   3A,W
04E0:  MOVWF  49
04E1:  MOVF   39,W
04E2:  MOVWF  48
04E3:  MOVF   38,W
04E4:  MOVWF  47
04E5:  CALL   2B4
04E6:  MOVF   7A,W
04E7:  MOVWF  37
04E8:  MOVF   79,W
04E9:  MOVWF  36
04EA:  MOVF   78,W
04EB:  MOVWF  35
04EC:  MOVF   77,W
04ED:  MOVWF  34
....................  
....................  return p; 
04EE:  MOVF   34,W
04EF:  MOVWF  77
04F0:  MOVF   35,W
04F1:  MOVWF  78
04F2:  MOVF   36,W
04F3:  MOVWF  79
04F4:  MOVF   37,W
04F5:  MOVWF  7A
.................... } 
04F6:  BSF    0A.3
04F7:  BCF    0A.4
04F8:  GOTO   03B (RETURN)
....................  
.................... void main() 
....................  { 
*
0800:  CLRF   04
0801:  BCF    03.7
0802:  MOVLW  1F
0803:  ANDWF  03,F
0804:  MOVLW  71
0805:  BSF    03.5
0806:  MOVWF  0F
0807:  MOVF   0F,W
0808:  BCF    06.3
0809:  BCF    03.5
080A:  BSF    06.3
080B:  BSF    03.5
080C:  BSF    03.6
080D:  MOVF   09,W
080E:  ANDLW  C0
080F:  MOVWF  09
0810:  BCF    03.6
0811:  BCF    1F.4
0812:  BCF    1F.5
0813:  MOVLW  00
0814:  BSF    03.6
0815:  MOVWF  08
0816:  BCF    03.5
0817:  CLRF   07
0818:  CLRF   08
0819:  CLRF   09
....................  
....................    float p, t, a; 
....................  printf("Tlakomer nebo vyskomer \r\n",); 
081A:  MOVLW  04
081B:  MOVWF  0D
081C:  MOVLW  00
081D:  MOVWF  0F
081E:  BCF    0A.3
081F:  BCF    03.6
0820:  GOTO   05D
0821:  BSF    0A.3
....................   
....................  while(TRUE) 
....................  {  
....................    mpl3115_setP(); //nastaveni pro tlak a teplotu 
0822:  BCF    0A.3
0823:  GOTO   0D9
0824:  BSF    0A.3
....................    delay_ms (500); 
0825:  MOVLW  02
0826:  MOVWF  2D
0827:  MOVLW  FA
0828:  MOVWF  2E
0829:  BCF    0A.3
082A:  CALL   14A
082B:  BSF    0A.3
082C:  DECFSZ 2D,F
082D:  GOTO   027
....................    t=mpl3115_T(); 
082E:  BCF    0A.3
082F:  GOTO   3F5
0830:  BSF    0A.3
0831:  MOVF   7A,W
0832:  MOVWF  28
0833:  MOVF   79,W
0834:  MOVWF  27
0835:  MOVF   78,W
0836:  MOVWF  26
0837:  MOVF   77,W
0838:  MOVWF  25
....................    p=mpl3115_P(); 
0839:  BCF    0A.3
083A:  GOTO   44B
083B:  BSF    0A.3
083C:  MOVF   7A,W
083D:  MOVWF  24
083E:  MOVF   79,W
083F:  MOVWF  23
0840:  MOVF   78,W
0841:  MOVWF  22
0842:  MOVF   77,W
0843:  MOVWF  21
....................     
....................    mpl3115_setA(); //nastaveni pro vysku a teplotu 
0844:  BCF    0A.3
0845:  GOTO   4F9
0846:  BSF    0A.3
....................    delay_ms (500); 
0847:  MOVLW  02
0848:  MOVWF  2D
0849:  MOVLW  FA
084A:  MOVWF  2E
084B:  BCF    0A.3
084C:  CALL   14A
084D:  BSF    0A.3
084E:  DECFSZ 2D,F
084F:  GOTO   049
....................    a=mpl3115_A(); 
0850:  BCF    0A.3
0851:  GOTO   56A
0852:  BSF    0A.3
0853:  MOVF   7A,W
0854:  MOVWF  2C
0855:  MOVF   79,W
0856:  MOVWF  2B
0857:  MOVF   78,W
0858:  MOVWF  2A
0859:  MOVF   77,W
085A:  MOVWF  29
....................  
....................  
....................    printf("Teplota: %10.4f(stupne)\r\n", t); 
085B:  MOVLW  11
085C:  BSF    03.6
085D:  MOVWF  0D
085E:  MOVLW  00
085F:  MOVWF  0F
0860:  BCF    03.0
0861:  MOVLW  09
0862:  BCF    03.6
0863:  MOVWF  2D
0864:  BCF    0A.3
0865:  CALL   5D9
0866:  BSF    0A.3
0867:  MOVLW  09
0868:  MOVWF  04
0869:  MOVF   28,W
086A:  MOVWF  30
086B:  MOVF   27,W
086C:  MOVWF  2F
086D:  MOVF   26,W
086E:  MOVWF  2E
086F:  MOVF   25,W
0870:  MOVWF  2D
0871:  MOVLW  04
0872:  MOVWF  31
0873:  BCF    0A.3
0874:  CALL   66A
0875:  BSF    0A.3
0876:  MOVLW  18
0877:  BSF    03.6
0878:  MOVWF  0D
0879:  MOVLW  00
087A:  MOVWF  0F
087B:  BSF    03.0
087C:  MOVLW  0A
087D:  BCF    03.6
087E:  MOVWF  2D
087F:  BCF    0A.3
0880:  CALL   5D9
0881:  BSF    0A.3
....................    printf("Tlak: %10.4f(Pa)\r\n", p); 
0882:  MOVLW  1E
0883:  BSF    03.6
0884:  MOVWF  0D
0885:  MOVLW  00
0886:  MOVWF  0F
0887:  BCF    03.0
0888:  MOVLW  06
0889:  BCF    03.6
088A:  MOVWF  2D
088B:  BCF    0A.3
088C:  CALL   5D9
088D:  BSF    0A.3
088E:  MOVLW  09
088F:  MOVWF  04
0890:  MOVF   24,W
0891:  MOVWF  30
0892:  MOVF   23,W
0893:  MOVWF  2F
0894:  MOVF   22,W
0895:  MOVWF  2E
0896:  MOVF   21,W
0897:  MOVWF  2D
0898:  MOVLW  04
0899:  MOVWF  31
089A:  BCF    0A.3
089B:  CALL   66A
089C:  BSF    0A.3
089D:  MOVLW  24
089E:  BSF    03.6
089F:  MOVWF  0D
08A0:  MOVLW  00
08A1:  MOVWF  0F
08A2:  BCF    03.0
08A3:  MOVLW  06
08A4:  BCF    03.6
08A5:  MOVWF  2D
08A6:  BCF    0A.3
08A7:  CALL   5D9
08A8:  BSF    0A.3
....................    printf("Výška: %10.4f(m)\r\n", a); 
08A9:  MOVLW  28
08AA:  BSF    03.6
08AB:  MOVWF  0D
08AC:  MOVLW  00
08AD:  MOVWF  0F
08AE:  MOVLW  07
08AF:  BCF    03.6
08B0:  MOVWF  2D
08B1:  BCF    0A.3
08B2:  CALL   7C4
08B3:  BSF    0A.3
08B4:  MOVLW  09
08B5:  MOVWF  04
08B6:  MOVF   2C,W
08B7:  MOVWF  30
08B8:  MOVF   2B,W
08B9:  MOVWF  2F
08BA:  MOVF   2A,W
08BB:  MOVWF  2E
08BC:  MOVF   29,W
08BD:  MOVWF  2D
08BE:  MOVLW  04
08BF:  MOVWF  31
08C0:  BCF    0A.3
08C1:  CALL   66A
08C2:  BSF    0A.3
08C3:  MOVLW  35
08C4:  BSF    03.6
08C5:  MOVWF  0D
08C6:  MOVLW  00
08C7:  MOVWF  0F
08C8:  MOVLW  05
08C9:  BCF    03.6
08CA:  MOVWF  2D
08CB:  BCF    0A.3
08CC:  CALL   7C4
08CD:  BSF    0A.3
....................  
.................... delay_ms (1000); 
08CE:  MOVLW  04
08CF:  MOVWF  2D
08D0:  MOVLW  FA
08D1:  MOVWF  2E
08D2:  BCF    0A.3
08D3:  CALL   14A
08D4:  BSF    0A.3
08D5:  DECFSZ 2D,F
08D6:  GOTO   0D0
.................... } 
08D7:  GOTO   022
....................  
....................  
.................... } 
....................  
....................  
08D8:  SLEEP

Configuration Fuses:
   Word  1: 2CF5   INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
   Word  2: 3FFF   NOWRT BORV40