CCS PCM C Compiler, Version 4.106, 47914               30-4-13 23:25

               Filename: C:\Users\Honza\Documents\pic\I2C_baterka\main.lst

               ROM used: 1313 words (16%)
                         Largest free fragment is 2048
               RAM used: 7 (2%) at main() level
                         19 (5%) worst case
               Stack:    3 locations

*
0000:  MOVLW  03
0001:  MOVWF  0A
0002:  GOTO   3E1
0003:  NOP
.................... //#include "C:\Users\Honza\Documents\pic\I2C_magnetometr\main.h" 
.................... #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) 
*
03CB:  MOVLW  24
03CC:  MOVWF  04
03CD:  BCF    03.7
03CE:  MOVF   00,W
03CF:  BTFSC  03.2
03D0:  GOTO   3DE
03D1:  MOVLW  02
03D2:  MOVWF  78
03D3:  CLRF   77
03D4:  DECFSZ 77,F
03D5:  GOTO   3D4
03D6:  DECFSZ 78,F
03D7:  GOTO   3D3
03D8:  MOVLW  97
03D9:  MOVWF  77
03DA:  DECFSZ 77,F
03DB:  GOTO   3DA
03DC:  DECFSZ 00,F
03DD:  GOTO   3D1
03DE:  BCF    0A.3
03DF:  BCF    0A.4
03E0:  GOTO   51D (RETURN)
....................  
....................  
.................... #define EEPROM_SDA  PIN_C4 
.................... #define EEPROM_SCL  PIN_C3 
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL) 
*
00F7:  MOVLW  08
00F8:  MOVWF  78
00F9:  NOP
00FA:  BCF    07.3
00FB:  BCF    20.3
00FC:  MOVF   20,W
00FD:  BSF    03.5
00FE:  MOVWF  07
00FF:  NOP
0100:  BCF    03.5
0101:  RLF    2B,F
0102:  BCF    07.4
0103:  BTFSS  03.0
0104:  GOTO   10B
0105:  BSF    20.4
0106:  MOVF   20,W
0107:  BSF    03.5
0108:  MOVWF  07
0109:  GOTO   10F
010A:  BCF    03.5
010B:  BCF    20.4
010C:  MOVF   20,W
010D:  BSF    03.5
010E:  MOVWF  07
010F:  NOP
0110:  BCF    03.5
0111:  BSF    20.3
0112:  MOVF   20,W
0113:  BSF    03.5
0114:  MOVWF  07
0115:  BCF    03.5
0116:  BTFSS  07.3
0117:  GOTO   116
0118:  DECFSZ 78,F
0119:  GOTO   0F9
011A:  NOP
011B:  BCF    07.3
011C:  BCF    20.3
011D:  MOVF   20,W
011E:  BSF    03.5
011F:  MOVWF  07
0120:  NOP
0121:  BCF    03.5
0122:  BSF    20.4
0123:  MOVF   20,W
0124:  BSF    03.5
0125:  MOVWF  07
0126:  NOP
0127:  NOP
0128:  BCF    03.5
0129:  BSF    20.3
012A:  MOVF   20,W
012B:  BSF    03.5
012C:  MOVWF  07
012D:  BCF    03.5
012E:  BTFSS  07.3
012F:  GOTO   12E
0130:  CLRF   78
0131:  NOP
0132:  BTFSC  07.4
0133:  BSF    78.0
0134:  BCF    07.3
0135:  BCF    20.3
0136:  MOVF   20,W
0137:  BSF    03.5
0138:  MOVWF  07
0139:  BCF    03.5
013A:  BCF    07.4
013B:  BCF    20.4
013C:  MOVF   20,W
013D:  BSF    03.5
013E:  MOVWF  07
013F:  BCF    03.5
0140:  RETURN
0141:  MOVLW  08
0142:  MOVWF  2C
0143:  MOVF   77,W
0144:  MOVWF  2D
0145:  BSF    20.4
0146:  MOVF   20,W
0147:  BSF    03.5
0148:  MOVWF  07
0149:  NOP
014A:  BCF    03.5
014B:  BSF    20.3
014C:  MOVF   20,W
014D:  BSF    03.5
014E:  MOVWF  07
014F:  BCF    03.5
0150:  BTFSS  07.3
0151:  GOTO   150
0152:  BTFSC  07.4
0153:  BSF    03.0
0154:  BTFSS  07.4
0155:  BCF    03.0
0156:  RLF    78,F
0157:  NOP
0158:  BCF    20.3
0159:  MOVF   20,W
015A:  BSF    03.5
015B:  MOVWF  07
015C:  BCF    03.5
015D:  BCF    07.3
015E:  DECFSZ 2C,F
015F:  GOTO   145
0160:  BSF    20.4
0161:  MOVF   20,W
0162:  BSF    03.5
0163:  MOVWF  07
0164:  NOP
0165:  BCF    03.5
0166:  BCF    07.4
0167:  MOVF   2D,W
0168:  BTFSC  03.2
0169:  GOTO   16F
016A:  BCF    20.4
016B:  MOVF   20,W
016C:  BSF    03.5
016D:  MOVWF  07
016E:  BCF    03.5
016F:  NOP
0170:  BSF    20.3
0171:  MOVF   20,W
0172:  BSF    03.5
0173:  MOVWF  07
0174:  BCF    03.5
0175:  BTFSS  07.3
0176:  GOTO   175
0177:  NOP
0178:  BCF    07.3
0179:  BCF    20.3
017A:  MOVF   20,W
017B:  BSF    03.5
017C:  MOVWF  07
017D:  NOP
017E:  BCF    03.5
017F:  BCF    07.4
0180:  BCF    20.4
0181:  MOVF   20,W
0182:  BSF    03.5
0183:  MOVWF  07
0184:  BCF    03.5
0185:  RETURN
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD 
*
008D:  BCF    20.7
008E:  MOVF   20,W
008F:  BSF    03.5
0090:  MOVWF  07
0091:  BCF    03.5
0092:  BCF    07.7
0093:  MOVLW  08
0094:  MOVWF  78
0095:  GOTO   096
0096:  NOP
0097:  BSF    78.7
0098:  GOTO   0A7
0099:  BCF    78.7
009A:  RRF    2C,F
009B:  BTFSC  03.0
009C:  BSF    07.7
009D:  BTFSS  03.0
009E:  BCF    07.7
009F:  BSF    78.6
00A0:  GOTO   0A7
00A1:  BCF    78.6
00A2:  DECFSZ 78,F
00A3:  GOTO   09A
00A4:  GOTO   0A5
00A5:  NOP
00A6:  BSF    07.7
00A7:  MOVLW  3F
00A8:  MOVWF  04
00A9:  DECFSZ 04,F
00AA:  GOTO   0A9
00AB:  NOP
00AC:  BTFSC  78.7
00AD:  GOTO   099
00AE:  BTFSC  78.6
00AF:  GOTO   0A1
00B0:  RETURN
.................... #include "BQ34Z100.h" 
.................... #define BAT_ADDR_R  0xAB //addresa pro cteni 
.................... #define BAT_ADDR_W  0xAA 
....................  
....................  
....................  
....................  
....................  
.................... #include "BQ34Z100.c" 
.................... int16 cteniBAT(byte lsb, byte msb) 
....................  {  
*
0186:  CLRF   28
0187:  CLRF   27
....................  int16 data = 0; 
....................  unsigned int8 h, l; 
....................    i2c_start(); 
0188:  BSF    20.4
0189:  MOVF   20,W
018A:  BSF    03.5
018B:  MOVWF  07
018C:  NOP
018D:  BCF    03.5
018E:  BSF    20.3
018F:  MOVF   20,W
0190:  BSF    03.5
0191:  MOVWF  07
0192:  NOP
0193:  BCF    03.5
0194:  BCF    07.4
0195:  BCF    20.4
0196:  MOVF   20,W
0197:  BSF    03.5
0198:  MOVWF  07
0199:  NOP
019A:  BCF    03.5
019B:  BCF    07.3
019C:  BCF    20.3
019D:  MOVF   20,W
019E:  BSF    03.5
019F:  MOVWF  07
....................    I2C_Write(BAT_ADDR_W); 
01A0:  MOVLW  AA
01A1:  BCF    03.5
01A2:  MOVWF  2B
01A3:  CALL   0F7
....................    I2C_write(lsb); 
01A4:  MOVF   25,W
01A5:  MOVWF  2B
01A6:  CALL   0F7
....................    
....................    i2c_start(); 
01A7:  BSF    20.4
01A8:  MOVF   20,W
01A9:  BSF    03.5
01AA:  MOVWF  07
01AB:  NOP
01AC:  BCF    03.5
01AD:  BSF    20.3
01AE:  MOVF   20,W
01AF:  BSF    03.5
01B0:  MOVWF  07
01B1:  NOP
01B2:  BCF    03.5
01B3:  BTFSS  07.3
01B4:  GOTO   1B3
01B5:  BCF    07.4
01B6:  BCF    20.4
01B7:  MOVF   20,W
01B8:  BSF    03.5
01B9:  MOVWF  07
01BA:  NOP
01BB:  BCF    03.5
01BC:  BCF    07.3
01BD:  BCF    20.3
01BE:  MOVF   20,W
01BF:  BSF    03.5
01C0:  MOVWF  07
....................    I2C_Write(BAT_ADDR_R); 
01C1:  MOVLW  AB
01C2:  BCF    03.5
01C3:  MOVWF  2B
01C4:  CALL   0F7
....................    l=i2c_read(0); 
01C5:  CLRF   77
01C6:  CALL   141
01C7:  MOVF   78,W
01C8:  MOVWF  2A
....................    i2c_stop(); 
01C9:  BCF    20.4
01CA:  MOVF   20,W
01CB:  BSF    03.5
01CC:  MOVWF  07
01CD:  NOP
01CE:  BCF    03.5
01CF:  BSF    20.3
01D0:  MOVF   20,W
01D1:  BSF    03.5
01D2:  MOVWF  07
01D3:  BCF    03.5
01D4:  BTFSS  07.3
01D5:  GOTO   1D4
01D6:  NOP
01D7:  GOTO   1D8
01D8:  NOP
01D9:  BSF    20.4
01DA:  MOVF   20,W
01DB:  BSF    03.5
01DC:  MOVWF  07
01DD:  NOP
....................     
....................    i2c_start(); 
01DE:  BCF    03.5
01DF:  BSF    20.4
01E0:  MOVF   20,W
01E1:  BSF    03.5
01E2:  MOVWF  07
01E3:  NOP
01E4:  BCF    03.5
01E5:  BSF    20.3
01E6:  MOVF   20,W
01E7:  BSF    03.5
01E8:  MOVWF  07
01E9:  NOP
01EA:  BCF    03.5
01EB:  BCF    07.4
01EC:  BCF    20.4
01ED:  MOVF   20,W
01EE:  BSF    03.5
01EF:  MOVWF  07
01F0:  NOP
01F1:  BCF    03.5
01F2:  BCF    07.3
01F3:  BCF    20.3
01F4:  MOVF   20,W
01F5:  BSF    03.5
01F6:  MOVWF  07
....................    I2C_Write(BAT_ADDR_W); 
01F7:  MOVLW  AA
01F8:  BCF    03.5
01F9:  MOVWF  2B
01FA:  CALL   0F7
....................    I2C_write(msb); 
01FB:  MOVF   26,W
01FC:  MOVWF  2B
01FD:  CALL   0F7
....................    i2c_start(); 
01FE:  BSF    20.4
01FF:  MOVF   20,W
0200:  BSF    03.5
0201:  MOVWF  07
0202:  NOP
0203:  BCF    03.5
0204:  BSF    20.3
0205:  MOVF   20,W
0206:  BSF    03.5
0207:  MOVWF  07
0208:  NOP
0209:  BCF    03.5
020A:  BTFSS  07.3
020B:  GOTO   20A
020C:  BCF    07.4
020D:  BCF    20.4
020E:  MOVF   20,W
020F:  BSF    03.5
0210:  MOVWF  07
0211:  NOP
0212:  BCF    03.5
0213:  BCF    07.3
0214:  BCF    20.3
0215:  MOVF   20,W
0216:  BSF    03.5
0217:  MOVWF  07
....................    I2C_Write(BAT_ADDR_R); 
0218:  MOVLW  AB
0219:  BCF    03.5
021A:  MOVWF  2B
021B:  CALL   0F7
....................    h=i2c_read(0); 
021C:  CLRF   77
021D:  CALL   141
021E:  MOVF   78,W
021F:  MOVWF  29
....................    i2c_stop(); 
0220:  BCF    20.4
0221:  MOVF   20,W
0222:  BSF    03.5
0223:  MOVWF  07
0224:  NOP
0225:  BCF    03.5
0226:  BSF    20.3
0227:  MOVF   20,W
0228:  BSF    03.5
0229:  MOVWF  07
022A:  BCF    03.5
022B:  BTFSS  07.3
022C:  GOTO   22B
022D:  NOP
022E:  GOTO   22F
022F:  NOP
0230:  BSF    20.4
0231:  MOVF   20,W
0232:  BSF    03.5
0233:  MOVWF  07
0234:  NOP
....................     
....................    return data = (((unsigned int16) h << 8) + l ); 
0235:  BCF    03.5
0236:  CLRF   2C
0237:  MOVF   29,W
0238:  MOVWF  2B
0239:  MOVWF  2C
023A:  CLRF   2B
023B:  MOVF   2A,W
023C:  ADDWF  2B,W
023D:  MOVWF  27
023E:  MOVF   2C,W
023F:  MOVWF  28
0240:  BTFSC  03.0
0241:  INCF   28,F
0242:  MOVF   27,W
0243:  MOVWF  78
0244:  MOVF   28,W
0245:  MOVWF  79
....................    }  
0246:  RETURN
....................      
.................... int16 batintT(void) //teplota baterie (pri vyrobnim nastaveni, je mozne zmenit na teplotu v IO 
.................... {  
0247:  MOVLW  0C
0248:  MOVWF  25
0249:  MOVLW  0D
024A:  MOVWF  26
024B:  CALL   186
024C:  MOVF   79,W
024D:  MOVWF  24
024E:  MOVF   78,W
024F:  MOVWF  23
.................... int16 data = cteniBAT(0x0C, 0x0D); 
.................... data = (data/10)-273; 
0250:  MOVF   24,W
0251:  MOVWF  26
0252:  MOVF   23,W
0253:  MOVWF  25
0254:  CLRF   28
0255:  MOVLW  0A
0256:  MOVWF  27
*
027B:  MOVLW  11
027C:  SUBWF  78,W
027D:  MOVWF  23
027E:  MOVF   79,W
027F:  MOVWF  24
0280:  MOVLW  01
0281:  BTFSS  03.0
0282:  MOVLW  02
0283:  SUBWF  24,F
.................... return data; 
0284:  MOVF   23,W
0285:  MOVWF  78
0286:  MOVF   24,W
0287:  MOVWF  79
....................  
.................... }    
0288:  BCF    0A.3
0289:  BCF    0A.4
028A:  GOTO   455 (RETURN)
....................  
.................... int16 batNAP(void) //napeti baterie 
.................... {  
*
032C:  MOVLW  08
032D:  MOVWF  25
032E:  MOVLW  09
032F:  MOVWF  26
0330:  CALL   186
0331:  MOVF   79,W
0332:  MOVWF  24
0333:  MOVF   78,W
0334:  MOVWF  23
.................... int16 data = cteniBAT(0x08, 0x09); 
.................... return data; 
0335:  MOVF   23,W
0336:  MOVWF  78
0337:  MOVF   24,W
0338:  MOVWF  79
....................  
.................... } 
0339:  BCF    0A.3
033A:  BCF    0A.4
033B:  GOTO   473 (RETURN)
....................  
.................... int16 batPROUD(void) //proud z nebo do baterie 
.................... {  
*
038B:  MOVLW  0A
038C:  MOVWF  25
038D:  MOVLW  0B
038E:  MOVWF  26
038F:  CALL   186
0390:  MOVF   79,W
0391:  MOVWF  24
0392:  MOVF   78,W
0393:  MOVWF  23
.................... int16 data = cteniBAT(0x0A, 0x0B); 
.................... return data; 
0394:  MOVF   23,W
0395:  MOVWF  78
0396:  MOVF   24,W
0397:  MOVWF  79
....................  
.................... } 
0398:  BCF    0A.3
0399:  BCF    0A.4
039A:  GOTO   493 (RETURN)
....................  
.................... int16 batKAPAKT(void) //zbyvajici kapacita 
.................... {  
039B:  MOVLW  04
039C:  MOVWF  25
039D:  MOVLW  05
039E:  MOVWF  26
039F:  CALL   186
03A0:  MOVF   79,W
03A1:  MOVWF  24
03A2:  MOVF   78,W
03A3:  MOVWF  23
.................... int16 data = cteniBAT(0x04, 0x05); 
.................... return data; 
03A4:  MOVF   23,W
03A5:  MOVWF  78
03A6:  MOVF   24,W
03A7:  MOVWF  79
....................  
.................... } 
03A8:  BCF    0A.3
03A9:  BCF    0A.4
03AA:  GOTO   4B3 (RETURN)
.................... int16 batKAPMAX(void) //max. kapacita 
.................... {  
03AB:  MOVLW  06
03AC:  MOVWF  25
03AD:  MOVLW  07
03AE:  MOVWF  26
03AF:  CALL   186
03B0:  MOVF   79,W
03B1:  MOVWF  24
03B2:  MOVF   78,W
03B3:  MOVWF  23
.................... int16 data = cteniBAT(0x06, 0x07); 
.................... return data; 
03B4:  MOVF   23,W
03B5:  MOVWF  78
03B6:  MOVF   24,W
03B7:  MOVWF  79
....................  
.................... } 
03B8:  BCF    0A.3
03B9:  BCF    0A.4
03BA:  GOTO   4D3 (RETURN)
....................  
.................... int16 batSTAV(void) //zbytek energie v baterii v % 
.................... {  
03BB:  MOVLW  02
03BC:  MOVWF  25
03BD:  MOVLW  03
03BE:  MOVWF  26
03BF:  CALL   186
03C0:  MOVF   79,W
03C1:  MOVWF  24
03C2:  MOVF   78,W
03C3:  MOVWF  23
.................... int16 data = cteniBAT(0x02, 0x03); 
.................... return data; 
03C4:  MOVF   23,W
03C5:  MOVWF  78
03C6:  MOVF   24,W
03C7:  MOVWF  79
....................  
.................... } 
03C8:  BCF    0A.3
03C9:  BCF    0A.4
03CA:  GOTO   4F3 (RETURN)
....................  
....................  
....................  
....................  
....................  
.................... void main() 
.................... { 
*
03E1:  CLRF   04
03E2:  BCF    03.7
03E3:  MOVLW  1F
03E4:  ANDWF  03,F
03E5:  MOVLW  71
03E6:  BSF    03.5
03E7:  MOVWF  0F
03E8:  MOVF   0F,W
03E9:  BCF    03.5
03EA:  BCF    20.7
03EB:  MOVF   20,W
03EC:  BSF    03.5
03ED:  MOVWF  07
03EE:  BCF    03.5
03EF:  BSF    07.7
03F0:  BSF    03.5
03F1:  BSF    03.6
03F2:  MOVF   09,W
03F3:  ANDLW  C0
03F4:  MOVWF  09
03F5:  BCF    03.6
03F6:  BCF    1F.4
03F7:  BCF    1F.5
03F8:  MOVLW  00
03F9:  BSF    03.6
03FA:  MOVWF  08
03FB:  BCF    03.5
03FC:  CLRF   07
03FD:  CLRF   08
03FE:  CLRF   09
....................  
....................    setup_adc_ports(NO_ANALOGS|VSS_VDD); 
*
0402:  BSF    03.5
0403:  BSF    03.6
0404:  MOVF   09,W
0405:  ANDLW  C0
0406:  MOVWF  09
0407:  BCF    03.6
0408:  BCF    1F.4
0409:  BCF    1F.5
040A:  MOVLW  00
040B:  BSF    03.6
040C:  MOVWF  08
....................    setup_adc(ADC_CLOCK_DIV_2); 
040D:  BCF    03.5
040E:  BCF    03.6
040F:  BCF    1F.6
0410:  BCF    1F.7
0411:  BSF    03.5
0412:  BCF    1F.7
0413:  BCF    03.5
0414:  BSF    1F.0
....................    setup_spi(SPI_SS_DISABLED); 
0415:  BCF    14.5
0416:  BCF    20.5
0417:  MOVF   20,W
0418:  BSF    03.5
0419:  MOVWF  07
041A:  BCF    03.5
041B:  BSF    20.4
041C:  MOVF   20,W
041D:  BSF    03.5
041E:  MOVWF  07
041F:  BCF    03.5
0420:  BCF    20.3
0421:  MOVF   20,W
0422:  BSF    03.5
0423:  MOVWF  07
0424:  MOVLW  01
0425:  BCF    03.5
0426:  MOVWF  14
0427:  MOVLW  00
0428:  BSF    03.5
0429:  MOVWF  14
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); 
042A:  MOVF   01,W
042B:  ANDLW  C7
042C:  IORLW  08
042D:  MOVWF  01
....................    setup_timer_1(T1_DISABLED); 
042E:  BCF    03.5
042F:  CLRF   10
....................    setup_timer_2(T2_DISABLED,0,1); 
0430:  MOVLW  00
0431:  MOVWF  78
0432:  MOVWF  12
0433:  MOVLW  00
0434:  BSF    03.5
0435:  MOVWF  12
....................    setup_ccp1(CCP_OFF); 
0436:  BCF    03.5
0437:  BSF    20.2
0438:  MOVF   20,W
0439:  BSF    03.5
043A:  MOVWF  07
043B:  BCF    03.5
043C:  CLRF   17
043D:  BSF    03.5
043E:  CLRF   1B
043F:  CLRF   1C
0440:  MOVLW  01
0441:  MOVWF  1D
....................    setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard 
0442:  BCF    03.5
0443:  BSF    03.6
0444:  CLRF   07
0445:  CLRF   08
0446:  CLRF   09
....................  
.................... printf("Vycitani zakladnich dat z modulu LION1CELL01B  \r\n",); 
0447:  MOVLW  04
0448:  MOVWF  0D
0449:  MOVLW  00
044A:  MOVWF  0F
044B:  BCF    03.6
044C:  CALL   0B1
.................... printf("(c) MLAB 2013 JACHO \r\n",); 
044D:  MOVLW  1D
044E:  BSF    03.6
044F:  MOVWF  0D
0450:  MOVLW  00
0451:  MOVWF  0F
0452:  BCF    03.6
0453:  CALL   0B1
.................... int16 data; 
....................  
....................    
....................   while(TRUE) 
....................  {  
....................    data=batintT(); 
0454:  GOTO   247
0455:  MOVF   79,W
0456:  MOVWF  22
0457:  MOVF   78,W
0458:  MOVWF  21
....................    printf("Teplota baterie: %Ld (°C)\r\n", data); 
0459:  MOVLW  29
045A:  BSF    03.6
045B:  MOVWF  0D
045C:  MOVLW  00
045D:  MOVWF  0F
045E:  MOVLW  11
045F:  BCF    03.6
0460:  MOVWF  23
0461:  CALL   28B
0462:  MOVLW  10
0463:  MOVWF  04
0464:  MOVF   22,W
0465:  MOVWF  24
0466:  MOVF   21,W
0467:  MOVWF  23
0468:  CALL   2AC
0469:  MOVLW  3D
046A:  BSF    03.6
046B:  MOVWF  0D
046C:  MOVLW  00
046D:  MOVWF  0F
046E:  MOVLW  07
046F:  BCF    03.6
0470:  MOVWF  23
0471:  CALL   28B
....................    data=batNAP(); 
0472:  GOTO   32C
0473:  MOVF   79,W
0474:  MOVWF  22
0475:  MOVF   78,W
0476:  MOVWF  21
....................    printf("Napeti clanku: %Ld (mV)\r\n", data); 
0477:  MOVLW  45
0478:  BSF    03.6
0479:  MOVWF  0D
047A:  MOVLW  00
047B:  MOVWF  0F
047C:  BCF    03.0
047D:  MOVLW  0F
047E:  BCF    03.6
047F:  MOVWF  23
0480:  CALL   33C
0481:  MOVLW  10
0482:  MOVWF  04
0483:  MOVF   22,W
0484:  MOVWF  24
0485:  MOVF   21,W
0486:  MOVWF  23
0487:  CALL   2AC
0488:  MOVLW  4E
0489:  BSF    03.6
048A:  MOVWF  0D
048B:  MOVLW  00
048C:  MOVWF  0F
048D:  BCF    03.0
048E:  MOVLW  07
048F:  BCF    03.6
0490:  MOVWF  23
0491:  CALL   33C
....................    data=batPROUD(); 
0492:  GOTO   38B
0493:  MOVF   79,W
0494:  MOVWF  22
0495:  MOVF   78,W
0496:  MOVWF  21
....................    printf("Proud clankem: %Ld (mA)\r\n", data); 
0497:  MOVLW  52
0498:  BSF    03.6
0499:  MOVWF  0D
049A:  MOVLW  00
049B:  MOVWF  0F
049C:  BCF    03.0
049D:  MOVLW  0F
049E:  BCF    03.6
049F:  MOVWF  23
04A0:  CALL   33C
04A1:  MOVLW  10
04A2:  MOVWF  04
04A3:  MOVF   22,W
04A4:  MOVWF  24
04A5:  MOVF   21,W
04A6:  MOVWF  23
04A7:  CALL   2AC
04A8:  MOVLW  5B
04A9:  BSF    03.6
04AA:  MOVWF  0D
04AB:  MOVLW  00
04AC:  MOVWF  0F
04AD:  BCF    03.0
04AE:  MOVLW  07
04AF:  BCF    03.6
04B0:  MOVWF  23
04B1:  CALL   33C
....................    data=batKAPAKT(); 
04B2:  GOTO   39B
04B3:  MOVF   79,W
04B4:  MOVWF  22
04B5:  MOVF   78,W
04B6:  MOVWF  21
....................    printf("Zbyvajici kapacita: %Ld (mAh)\r\n", data); 
04B7:  MOVLW  5F
04B8:  BSF    03.6
04B9:  MOVWF  0D
04BA:  MOVLW  00
04BB:  MOVWF  0F
04BC:  BCF    03.0
04BD:  MOVLW  14
04BE:  BCF    03.6
04BF:  MOVWF  23
04C0:  CALL   33C
04C1:  MOVLW  10
04C2:  MOVWF  04
04C3:  MOVF   22,W
04C4:  MOVWF  24
04C5:  MOVF   21,W
04C6:  MOVWF  23
04C7:  CALL   2AC
04C8:  MOVLW  6A
04C9:  BSF    03.6
04CA:  MOVWF  0D
04CB:  MOVLW  00
04CC:  MOVWF  0F
04CD:  BSF    03.0
04CE:  MOVLW  08
04CF:  BCF    03.6
04D0:  MOVWF  23
04D1:  CALL   33C
....................    data=batKAPMAX(); 
04D2:  GOTO   3AB
04D3:  MOVF   79,W
04D4:  MOVWF  22
04D5:  MOVF   78,W
04D6:  MOVWF  21
....................    printf("Max. kapacita: %Ld (mAh)\r\n", data); 
04D7:  MOVLW  6F
04D8:  BSF    03.6
04D9:  MOVWF  0D
04DA:  MOVLW  00
04DB:  MOVWF  0F
04DC:  BCF    03.0
04DD:  MOVLW  0F
04DE:  BCF    03.6
04DF:  MOVWF  23
04E0:  CALL   33C
04E1:  MOVLW  10
04E2:  MOVWF  04
04E3:  MOVF   22,W
04E4:  MOVWF  24
04E5:  MOVF   21,W
04E6:  MOVWF  23
04E7:  CALL   2AC
04E8:  MOVLW  78
04E9:  BSF    03.6
04EA:  MOVWF  0D
04EB:  MOVLW  00
04EC:  MOVWF  0F
04ED:  BCF    03.0
04EE:  MOVLW  08
04EF:  BCF    03.6
04F0:  MOVWF  23
04F1:  CALL   33C
....................    data=batSTAV(); 
04F2:  GOTO   3BB
04F3:  MOVF   79,W
04F4:  MOVWF  22
04F5:  MOVF   78,W
04F6:  MOVWF  21
....................    printf("Stav baterie: %Ld (procenta)\r\n", data); 
04F7:  MOVLW  7D
04F8:  BSF    03.6
04F9:  MOVWF  0D
04FA:  MOVLW  00
04FB:  MOVWF  0F
04FC:  BCF    03.0
04FD:  MOVLW  0E
04FE:  BCF    03.6
04FF:  MOVWF  23
0500:  CALL   33C
0501:  MOVLW  10
0502:  MOVWF  04
0503:  MOVF   22,W
0504:  MOVWF  24
0505:  MOVF   21,W
0506:  MOVWF  23
0507:  CALL   2AC
0508:  MOVLW  85
0509:  BSF    03.6
050A:  MOVWF  0D
050B:  MOVLW  00
050C:  MOVWF  0F
050D:  BSF    03.0
050E:  MOVLW  0D
050F:  BCF    03.6
0510:  MOVWF  23
0511:  CALL   33C
....................     printf("\r\n"); 
0512:  MOVLW  0D
0513:  MOVWF  2C
0514:  CALL   08D
0515:  MOVLW  0A
0516:  MOVWF  2C
0517:  CALL   08D
....................    delay_ms (2000); 
0518:  MOVLW  08
0519:  MOVWF  23
051A:  MOVLW  FA
051B:  MOVWF  24
051C:  GOTO   3CB
051D:  DECFSZ 23,F
051E:  GOTO   51A
....................  }  
051F:  GOTO   454
.................... } 
0520:  SLEEP

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