CCS PCM C Compiler, Version 4.106, 47914 08-5-13 01:42
Filename: c:\users\honza\documents\pic\mereni_energie\main.lst
ROM used: 3155 words (39%)
Largest free fragment is 2048
RAM used: 78 (21%) at main() level
100 (27%) worst case
Stack: 4 locations
*
0000: MOVLW 09
0001: MOVWF 0A
0002: GOTO 15B
0003: NOP
.................... //Mereni energie
.................... //(c) Jan Chroust 2013
....................
....................
.................... #include "C: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)
*
000A: MOVLW 6A
000B: MOVWF 04
000C: BCF 03.7
000D: MOVF 00,W
000E: BTFSC 03.2
000F: GOTO 01D
0010: MOVLW 02
0011: MOVWF 78
0012: CLRF 77
0013: DECFSZ 77,F
0014: GOTO 013
0015: DECFSZ 78,F
0016: GOTO 012
0017: MOVLW 97
0018: MOVWF 77
0019: DECFSZ 77,F
001A: GOTO 019
001B: DECFSZ 00,F
001C: GOTO 010
001D: RETURN
....................
....................
....................
.................... #define EEPROM_SDA PIN_C4
.................... #define EEPROM_SCL PIN_C3
.................... //rele v blok sch. REL1 a REL2
.................... #define REL1_IN1 PIN_D6
.................... #define REL1_IN2 PIN_D7
.................... //rele v blok sch. REL5
.................... #define REL2_IN1 PIN_B2
.................... #define REL2_IN2 PIN_B3
.................... //rele v blok sch.REL3
.................... #define REL3_IN1 PIN_A0
.................... #define REL3_IN2 PIN_A1
.................... //rele v blok sch.REL3
.................... #define REL4_IN1 PIN_A2
.................... #define REL4_IN2 PIN_A3
....................
.................... #define NOC PIN_B1 //pro povoleni moznosti nabijet
....................
....................
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL)
*
018C: MOVLW 08
018D: MOVWF 78
018E: NOP
018F: BCF 07.3
0190: BCF 20.3
0191: MOVF 20,W
0192: BSF 03.5
0193: MOVWF 07
0194: NOP
0195: RLF 71,F
0196: BCF 03.5
0197: BCF 07.4
0198: BTFSS 03.0
0199: GOTO 1A0
019A: BSF 20.4
019B: MOVF 20,W
019C: BSF 03.5
019D: MOVWF 07
019E: GOTO 1A4
019F: BCF 03.5
01A0: BCF 20.4
01A1: MOVF 20,W
01A2: BSF 03.5
01A3: MOVWF 07
01A4: NOP
01A5: BCF 03.5
01A6: BSF 20.3
01A7: MOVF 20,W
01A8: BSF 03.5
01A9: MOVWF 07
01AA: BCF 03.5
01AB: BTFSS 07.3
01AC: GOTO 1AB
01AD: DECFSZ 78,F
01AE: GOTO 18E
01AF: NOP
01B0: BCF 07.3
01B1: BCF 20.3
01B2: MOVF 20,W
01B3: BSF 03.5
01B4: MOVWF 07
01B5: NOP
01B6: BCF 03.5
01B7: BSF 20.4
01B8: MOVF 20,W
01B9: BSF 03.5
01BA: MOVWF 07
01BB: NOP
01BC: NOP
01BD: BCF 03.5
01BE: BSF 20.3
01BF: MOVF 20,W
01C0: BSF 03.5
01C1: MOVWF 07
01C2: BCF 03.5
01C3: BTFSS 07.3
01C4: GOTO 1C3
01C5: CLRF 78
01C6: NOP
01C7: BTFSC 07.4
01C8: BSF 78.0
01C9: BCF 07.3
01CA: BCF 20.3
01CB: MOVF 20,W
01CC: BSF 03.5
01CD: MOVWF 07
01CE: BCF 03.5
01CF: BCF 07.4
01D0: BCF 20.4
01D1: MOVF 20,W
01D2: BSF 03.5
01D3: MOVWF 07
01D4: BCF 03.5
01D5: RETURN
*
0246: MOVLW 08
0247: MOVWF 72
0248: MOVF 77,W
0249: MOVWF 73
024A: BSF 20.4
024B: MOVF 20,W
024C: BSF 03.5
024D: MOVWF 07
024E: NOP
024F: BCF 03.5
0250: BSF 20.3
0251: MOVF 20,W
0252: BSF 03.5
0253: MOVWF 07
0254: BCF 03.5
0255: BTFSS 07.3
0256: GOTO 255
0257: BTFSC 07.4
0258: BSF 03.0
0259: BTFSS 07.4
025A: BCF 03.0
025B: RLF 78,F
025C: NOP
025D: BCF 20.3
025E: MOVF 20,W
025F: BSF 03.5
0260: MOVWF 07
0261: BCF 03.5
0262: BCF 07.3
0263: DECFSZ 72,F
0264: GOTO 24A
0265: BSF 20.4
0266: MOVF 20,W
0267: BSF 03.5
0268: MOVWF 07
0269: NOP
026A: BCF 03.5
026B: BCF 07.4
026C: MOVF 73,W
026D: BTFSC 03.2
026E: GOTO 274
026F: BCF 20.4
0270: MOVF 20,W
0271: BSF 03.5
0272: MOVWF 07
0273: BCF 03.5
0274: NOP
0275: BSF 20.3
0276: MOVF 20,W
0277: BSF 03.5
0278: MOVWF 07
0279: BCF 03.5
027A: BTFSS 07.3
027B: GOTO 27A
027C: NOP
027D: BCF 07.3
027E: BCF 20.3
027F: MOVF 20,W
0280: BSF 03.5
0281: MOVWF 07
0282: NOP
0283: BCF 03.5
0284: BCF 07.4
0285: BCF 20.4
0286: MOVF 20,W
0287: BSF 03.5
0288: MOVWF 07
0289: BCF 03.5
028A: RETURN
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD
*
001E: BCF 20.7
001F: MOVF 20,W
0020: BSF 03.5
0021: MOVWF 07
0022: BCF 03.5
0023: BCF 07.7
0024: MOVLW 08
0025: MOVWF 78
0026: GOTO 027
0027: NOP
0028: BSF 78.7
0029: GOTO 038
002A: BCF 78.7
002B: RRF 6D,F
002C: BTFSC 03.0
002D: BSF 07.7
002E: BTFSS 03.0
002F: BCF 07.7
0030: BSF 78.6
0031: GOTO 038
0032: BCF 78.6
0033: DECFSZ 78,F
0034: GOTO 02B
0035: GOTO 036
0036: NOP
0037: BSF 07.7
0038: MOVLW 3F
0039: MOVWF 04
003A: DECFSZ 04,F
003B: GOTO 03A
003C: NOP
003D: BTFSC 78.7
003E: GOTO 02A
003F: BTFSC 78.6
0040: GOTO 032
0041: RETURN
.................... #include "BQ34Z100.h"
.................... #define BAT_ADDR_R 0xAB //addresa pro cteni
.................... #define BAT_ADDR_W 0xAA
....................
....................
....................
....................
....................
.................... #include "BQ34Z100.c"
.................... //Knihovna pro obvod BQ34Z100
.................... //(c) Jan Chroust 2013
....................
....................
.................... int16 cteniBAT(byte lsb, byte msb)
.................... {
*
028B: CLRF 6E
028C: CLRF 6D
.................... int16 data = 0;
.................... unsigned int8 h, l;
.................... i2c_start();
028D: BSF 20.4
028E: MOVF 20,W
028F: BSF 03.5
0290: MOVWF 07
0291: NOP
0292: BCF 03.5
0293: BSF 20.3
0294: MOVF 20,W
0295: BSF 03.5
0296: MOVWF 07
0297: NOP
0298: BCF 03.5
0299: BCF 07.4
029A: BCF 20.4
029B: MOVF 20,W
029C: BSF 03.5
029D: MOVWF 07
029E: NOP
029F: BCF 03.5
02A0: BCF 07.3
02A1: BCF 20.3
02A2: MOVF 20,W
02A3: BSF 03.5
02A4: MOVWF 07
.................... I2C_Write(BAT_ADDR_W);
02A5: MOVLW AA
02A6: MOVWF 71
02A7: BCF 03.5
02A8: CALL 18C
.................... I2C_write(lsb);
02A9: MOVF 6B,W
02AA: MOVWF 71
02AB: CALL 18C
....................
.................... i2c_start();
02AC: BSF 20.4
02AD: MOVF 20,W
02AE: BSF 03.5
02AF: MOVWF 07
02B0: NOP
02B1: BCF 03.5
02B2: BSF 20.3
02B3: MOVF 20,W
02B4: BSF 03.5
02B5: MOVWF 07
02B6: NOP
02B7: BCF 03.5
02B8: BTFSS 07.3
02B9: GOTO 2B8
02BA: BCF 07.4
02BB: BCF 20.4
02BC: MOVF 20,W
02BD: BSF 03.5
02BE: MOVWF 07
02BF: NOP
02C0: BCF 03.5
02C1: BCF 07.3
02C2: BCF 20.3
02C3: MOVF 20,W
02C4: BSF 03.5
02C5: MOVWF 07
.................... I2C_Write(BAT_ADDR_R);
02C6: MOVLW AB
02C7: MOVWF 71
02C8: BCF 03.5
02C9: CALL 18C
.................... l=i2c_read(0);
02CA: CLRF 77
02CB: CALL 246
02CC: MOVF 78,W
02CD: MOVWF 70
.................... i2c_stop();
02CE: BCF 20.4
02CF: MOVF 20,W
02D0: BSF 03.5
02D1: MOVWF 07
02D2: NOP
02D3: BCF 03.5
02D4: BSF 20.3
02D5: MOVF 20,W
02D6: BSF 03.5
02D7: MOVWF 07
02D8: BCF 03.5
02D9: BTFSS 07.3
02DA: GOTO 2D9
02DB: NOP
02DC: GOTO 2DD
02DD: NOP
02DE: BSF 20.4
02DF: MOVF 20,W
02E0: BSF 03.5
02E1: MOVWF 07
02E2: NOP
....................
.................... i2c_start();
02E3: BCF 03.5
02E4: BSF 20.4
02E5: MOVF 20,W
02E6: BSF 03.5
02E7: MOVWF 07
02E8: NOP
02E9: BCF 03.5
02EA: BSF 20.3
02EB: MOVF 20,W
02EC: BSF 03.5
02ED: MOVWF 07
02EE: NOP
02EF: BCF 03.5
02F0: BCF 07.4
02F1: BCF 20.4
02F2: MOVF 20,W
02F3: BSF 03.5
02F4: MOVWF 07
02F5: NOP
02F6: BCF 03.5
02F7: BCF 07.3
02F8: BCF 20.3
02F9: MOVF 20,W
02FA: BSF 03.5
02FB: MOVWF 07
.................... I2C_Write(BAT_ADDR_W);
02FC: MOVLW AA
02FD: MOVWF 71
02FE: BCF 03.5
02FF: CALL 18C
.................... I2C_write(msb);
0300: MOVF 6C,W
0301: MOVWF 71
0302: CALL 18C
.................... i2c_start();
0303: BSF 20.4
0304: MOVF 20,W
0305: BSF 03.5
0306: MOVWF 07
0307: NOP
0308: BCF 03.5
0309: BSF 20.3
030A: MOVF 20,W
030B: BSF 03.5
030C: MOVWF 07
030D: NOP
030E: BCF 03.5
030F: BTFSS 07.3
0310: GOTO 30F
0311: BCF 07.4
0312: BCF 20.4
0313: MOVF 20,W
0314: BSF 03.5
0315: MOVWF 07
0316: NOP
0317: BCF 03.5
0318: BCF 07.3
0319: BCF 20.3
031A: MOVF 20,W
031B: BSF 03.5
031C: MOVWF 07
.................... I2C_Write(BAT_ADDR_R);
031D: MOVLW AB
031E: MOVWF 71
031F: BCF 03.5
0320: CALL 18C
.................... h=i2c_read(0);
0321: CLRF 77
0322: CALL 246
0323: MOVF 78,W
0324: MOVWF 6F
.................... i2c_stop();
0325: BCF 20.4
0326: MOVF 20,W
0327: BSF 03.5
0328: MOVWF 07
0329: NOP
032A: BCF 03.5
032B: BSF 20.3
032C: MOVF 20,W
032D: BSF 03.5
032E: MOVWF 07
032F: BCF 03.5
0330: BTFSS 07.3
0331: GOTO 330
0332: NOP
0333: GOTO 334
0334: NOP
0335: BSF 20.4
0336: MOVF 20,W
0337: BSF 03.5
0338: MOVWF 07
0339: NOP
....................
.................... return data = (((unsigned int16) h << 8) + l );
033A: CLRF 72
033B: BCF 03.5
033C: MOVF 6F,W
033D: MOVWF 71
033E: MOVWF 72
033F: CLRF 71
0340: MOVF 70,W
0341: ADDWF 71,W
0342: MOVWF 6D
0343: MOVF 72,W
0344: MOVWF 6E
0345: BTFSC 03.0
0346: INCF 6E,F
0347: MOVF 6D,W
0348: MOVWF 78
0349: MOVF 6E,W
034A: MOVWF 79
.................... }
034B: RETURN
....................
.................... int16 batintT(void) //teplota baterie (pri vyrobnim nastaveni, je mozne zmenit na teplotu v IO
.................... {
.................... int16 data = cteniBAT(0x0C, 0x0D);
.................... data = (data/10)-273;
.................... return data;
....................
.................... }
....................
.................... int16 batNAP(void) //napeti baterie
.................... {
*
0368: MOVLW 08
0369: MOVWF 6B
036A: MOVLW 09
036B: MOVWF 6C
036C: CALL 28B
036D: MOVF 79,W
036E: MOVWF 6A
036F: MOVF 78,W
0370: MOVWF 69
.................... int16 data = cteniBAT(0x08, 0x09);
.................... return data;
0371: MOVF 69,W
0372: MOVWF 78
0373: MOVF 6A,W
0374: MOVWF 79
....................
.................... }
0375: RETURN
....................
.................... int16 batPROUD(void) //proud z nebo do baterie
.................... {
*
034C: MOVLW 0A
034D: MOVWF 6B
034E: MOVLW 0B
034F: MOVWF 6C
0350: CALL 28B
0351: MOVF 79,W
0352: MOVWF 6A
0353: MOVF 78,W
0354: MOVWF 69
.................... int16 data = cteniBAT(0x0A, 0x0B);
.................... return data;
0355: MOVF 69,W
0356: MOVWF 78
0357: MOVF 6A,W
0358: MOVWF 79
....................
.................... }
0359: RETURN
....................
.................... int16 batKAPAKT(void) //zbyvajici kapacita
.................... {
.................... int16 data = cteniBAT(0x04, 0x05);
.................... return data;
....................
.................... }
.................... int16 batKAPMAX(void) //max. kapacita
.................... {
.................... int16 data = cteniBAT(0x06, 0x07);
.................... return data;
....................
.................... }
....................
.................... int16 batSTAV(void) //zbytek energie v baterii v %
.................... {
035A: MOVLW 02
035B: MOVWF 6B
035C: MOVLW 03
035D: MOVWF 6C
035E: CALL 28B
035F: MOVF 79,W
0360: MOVWF 6A
0361: MOVF 78,W
0362: MOVWF 69
.................... int16 data = cteniBAT(0x02, 0x03);
.................... return data;
0363: MOVF 69,W
0364: MOVWF 78
0365: MOVF 6A,W
0366: MOVWF 79
....................
.................... }
0367: RETURN
....................
....................
....................
....................
.................... //BAT3 - pro pohyblivý panel - LION1CELLB-1
.................... //BAT2 - pro fixní panel - LION1CELLB-2
.................... //BAT1 - hlavní baterie - LION1CELLB-3
.................... int16 bat1STAV,bat2STAV,bat3STAV; //zbyvajici eneregie akumulátoru v %
.................... signed int16 bat1PROUD,bat2PROUD,bat3PROUD; //proud akumulatorem
.................... int16 bat1NAP,bat2NAP,bat3NAP; //napeti akumulatoru
.................... signed int16 bat1P,bat2P, bat3P; //vykon z nebo do akumulatoru
....................
.................... //pro odeslání
.................... signed int16 rozdil;
.................... char baterka[40];
....................
....................
.................... void batMODE(int d) //nastavi rele do prislusneho modu
.................... {
.................... switch (d) {
*
0088: MOVF 69,W
0089: XORLW 01
008A: BTFSC 03.2
008B: GOTO 09C
008C: XORLW 03
008D: BTFSC 03.2
008E: GOTO 0D0
008F: XORLW 01
0090: BTFSC 03.2
0091: GOTO 0F4
0092: XORLW 07
0093: BTFSC 03.2
0094: GOTO 118
0095: XORLW 01
0096: BTFSC 03.2
0097: GOTO 13C
0098: XORLW 03
0099: BTFSC 03.2
009A: GOTO 160
009B: GOTO 183
....................
.................... case 1: output_high(REL1_IN2); //pro mereni
009C: BSF 03.5
009D: BCF 08.7
009E: BCF 03.5
009F: BSF 08.7
.................... output_high(REL2_IN1);
00A0: BSF 03.5
00A1: BCF 06.2
00A2: BCF 03.5
00A3: BSF 06.2
.................... output_high(REL3_IN2);
00A4: BSF 03.5
00A5: BCF 05.1
00A6: BCF 03.5
00A7: BSF 05.1
.................... output_high(REL4_IN2);
00A8: BSF 03.5
00A9: BCF 05.3
00AA: BCF 03.5
00AB: BSF 05.3
.................... delay_ms(100);
00AC: MOVLW 64
00AD: MOVWF 6A
00AE: CALL 00A
.................... output_low(REL1_IN1);
00AF: BSF 03.5
00B0: BCF 08.6
00B1: BCF 03.5
00B2: BCF 08.6
.................... output_low(REL1_IN2);
00B3: BSF 03.5
00B4: BCF 08.7
00B5: BCF 03.5
00B6: BCF 08.7
.................... output_low(REL2_IN1);
00B7: BSF 03.5
00B8: BCF 06.2
00B9: BCF 03.5
00BA: BCF 06.2
.................... output_low(REL2_IN2);
00BB: BSF 03.5
00BC: BCF 06.3
00BD: BCF 03.5
00BE: BCF 06.3
.................... output_low(REL3_IN1);
00BF: BSF 03.5
00C0: BCF 05.0
00C1: BCF 03.5
00C2: BCF 05.0
.................... output_low(REL3_IN2);
00C3: BSF 03.5
00C4: BCF 05.1
00C5: BCF 03.5
00C6: BCF 05.1
.................... output_low(REL4_IN1);
00C7: BSF 03.5
00C8: BCF 05.2
00C9: BCF 03.5
00CA: BCF 05.2
.................... output_low(REL4_IN2);
00CB: BSF 03.5
00CC: BCF 05.3
00CD: BCF 03.5
00CE: BCF 05.3
....................
.................... break;
00CF: GOTO 18B
....................
.................... case 2: output_high(REL1_IN2); //dobijeni Hl. clanku z bat3
00D0: BSF 03.5
00D1: BCF 08.7
00D2: BCF 03.5
00D3: BSF 08.7
.................... output_high(REL2_IN1);
00D4: BSF 03.5
00D5: BCF 06.2
00D6: BCF 03.5
00D7: BSF 06.2
.................... output_high(REL3_IN1);
00D8: BSF 03.5
00D9: BCF 05.0
00DA: BCF 03.5
00DB: BSF 05.0
.................... output_high(REL4_IN2);
00DC: BSF 03.5
00DD: BCF 05.3
00DE: BCF 03.5
00DF: BSF 05.3
.................... delay_ms(100);
00E0: MOVLW 64
00E1: MOVWF 6A
00E2: CALL 00A
.................... output_low(REL1_IN2);
00E3: BSF 03.5
00E4: BCF 08.7
00E5: BCF 03.5
00E6: BCF 08.7
.................... output_low(REL2_IN1);
00E7: BSF 03.5
00E8: BCF 06.2
00E9: BCF 03.5
00EA: BCF 06.2
.................... output_low(REL3_IN1);
00EB: BSF 03.5
00EC: BCF 05.0
00ED: BCF 03.5
00EE: BCF 05.0
.................... output_low(REL4_IN2);
00EF: BSF 03.5
00F0: BCF 05.3
00F1: BCF 03.5
00F2: BCF 05.3
.................... break;
00F3: GOTO 18B
....................
.................... case 3: output_high(REL1_IN2); //dobijeni Hl. clanku z bat2
00F4: BSF 03.5
00F5: BCF 08.7
00F6: BCF 03.5
00F7: BSF 08.7
.................... output_high(REL2_IN1);
00F8: BSF 03.5
00F9: BCF 06.2
00FA: BCF 03.5
00FB: BSF 06.2
.................... output_high(REL3_IN2);
00FC: BSF 03.5
00FD: BCF 05.1
00FE: BCF 03.5
00FF: BSF 05.1
.................... output_high(REL4_IN1);
0100: BSF 03.5
0101: BCF 05.2
0102: BCF 03.5
0103: BSF 05.2
.................... delay_ms(100);
0104: MOVLW 64
0105: MOVWF 6A
0106: CALL 00A
.................... output_low(REL1_IN2);
0107: BSF 03.5
0108: BCF 08.7
0109: BCF 03.5
010A: BCF 08.7
.................... output_low(REL2_IN1);
010B: BSF 03.5
010C: BCF 06.2
010D: BCF 03.5
010E: BCF 06.2
.................... output_low(REL3_IN2);
010F: BSF 03.5
0110: BCF 05.1
0111: BCF 03.5
0112: BCF 05.1
.................... output_low(REL4_IN1);
0113: BSF 03.5
0114: BCF 05.2
0115: BCF 03.5
0116: BCF 05.2
....................
.................... break;
0117: GOTO 18B
....................
.................... case 4: output_high(REL1_IN1); //dobijeni Hl. clanku ze sol. clanku
0118: BSF 03.5
0119: BCF 08.6
011A: BCF 03.5
011B: BSF 08.6
.................... output_high(REL2_IN1);
011C: BSF 03.5
011D: BCF 06.2
011E: BCF 03.5
011F: BSF 06.2
.................... output_high(REL3_IN2);
0120: BSF 03.5
0121: BCF 05.1
0122: BCF 03.5
0123: BSF 05.1
.................... output_high(REL4_IN2);
0124: BSF 03.5
0125: BCF 05.3
0126: BCF 03.5
0127: BSF 05.3
.................... delay_ms(100);
0128: MOVLW 64
0129: MOVWF 6A
012A: CALL 00A
.................... output_low(REL1_IN1);
012B: BSF 03.5
012C: BCF 08.6
012D: BCF 03.5
012E: BCF 08.6
.................... output_low(REL2_IN1);
012F: BSF 03.5
0130: BCF 06.2
0131: BCF 03.5
0132: BCF 06.2
.................... output_low(REL3_IN2);
0133: BSF 03.5
0134: BCF 05.1
0135: BCF 03.5
0136: BCF 05.1
.................... output_low(REL4_IN2);
0137: BSF 03.5
0138: BCF 05.3
0139: BCF 03.5
013A: BCF 05.3
....................
....................
.................... break;
013B: GOTO 18B
.................... case 5: output_high(REL1_IN2); //vybijeni bat3 do R
013C: BSF 03.5
013D: BCF 08.7
013E: BCF 03.5
013F: BSF 08.7
.................... output_high(REL2_IN2);
0140: BSF 03.5
0141: BCF 06.3
0142: BCF 03.5
0143: BSF 06.3
.................... output_high(REL3_IN1);
0144: BSF 03.5
0145: BCF 05.0
0146: BCF 03.5
0147: BSF 05.0
.................... output_high(REL4_IN2);
0148: BSF 03.5
0149: BCF 05.3
014A: BCF 03.5
014B: BSF 05.3
.................... delay_ms(100);
014C: MOVLW 64
014D: MOVWF 6A
014E: CALL 00A
.................... output_low(REL1_IN2);
014F: BSF 03.5
0150: BCF 08.7
0151: BCF 03.5
0152: BCF 08.7
.................... output_low(REL2_IN2);
0153: BSF 03.5
0154: BCF 06.3
0155: BCF 03.5
0156: BCF 06.3
.................... output_low(REL3_IN1);
0157: BSF 03.5
0158: BCF 05.0
0159: BCF 03.5
015A: BCF 05.0
.................... output_low(REL4_IN2);
015B: BSF 03.5
015C: BCF 05.3
015D: BCF 03.5
015E: BCF 05.3
....................
.................... break;
015F: GOTO 18B
....................
.................... case 6: output_high(REL1_IN2); //vybijeni bat2 do R
0160: BSF 03.5
0161: BCF 08.7
0162: BCF 03.5
0163: BSF 08.7
.................... output_high(REL2_IN2);
0164: BSF 03.5
0165: BCF 06.3
0166: BCF 03.5
0167: BSF 06.3
.................... output_high(REL3_IN2);
0168: BSF 03.5
0169: BCF 05.1
016A: BCF 03.5
016B: BSF 05.1
.................... output_high(REL4_IN1);
016C: BSF 03.5
016D: BCF 05.2
016E: BCF 03.5
016F: BSF 05.2
.................... delay_ms(100);
0170: MOVLW 64
0171: MOVWF 6A
0172: CALL 00A
.................... output_low(REL1_IN2);
0173: BSF 03.5
0174: BCF 08.7
0175: BCF 03.5
0176: BCF 08.7
.................... output_low(REL2_IN2);
0177: BSF 03.5
0178: BCF 06.3
0179: BCF 03.5
017A: BCF 06.3
.................... output_low(REL3_IN2);
017B: BSF 03.5
017C: BCF 05.1
017D: BCF 03.5
017E: BCF 05.1
.................... output_low(REL4_IN1);
017F: BSF 03.5
0180: BCF 05.2
0181: BCF 03.5
0182: BCF 05.2
....................
.................... default:printf("chyba");
0183: MOVLW 04
0184: BSF 03.6
0185: MOVWF 0D
0186: MOVLW 00
0187: MOVWF 0F
0188: BCF 03.6
0189: CALL 042
....................
.................... break; }
018A: GOTO 18B
....................
....................
.................... }
018B: RETURN
....................
....................
.................... void setHUB(int d) //vstupuje 1-8
.................... //hodnota udava jaky port bude pripojen na master I2C
.................... //zde je nastaveno propojeni jen jedne brany, je mozne propojit i vice bran naraz
.................... {
.................... switch (d) {
*
01D6: MOVF 69,W
01D7: XORLW 01
01D8: BTFSC 03.2
01D9: GOTO 1F0
01DA: XORLW 03
01DB: BTFSC 03.2
01DC: GOTO 1F3
01DD: XORLW 01
01DE: BTFSC 03.2
01DF: GOTO 1F6
01E0: XORLW 07
01E1: BTFSC 03.2
01E2: GOTO 1F9
01E3: XORLW 01
01E4: BTFSC 03.2
01E5: GOTO 1FC
01E6: XORLW 03
01E7: BTFSC 03.2
01E8: GOTO 1FF
01E9: XORLW 01
01EA: BTFSC 03.2
01EB: GOTO 202
01EC: XORLW 0F
01ED: BTFSC 03.2
01EE: GOTO 205
01EF: GOTO 208
....................
.................... case 1: d=0x01;
01F0: MOVLW 01
01F1: MOVWF 69
....................
.................... break;
01F2: GOTO 210
....................
.................... case 2: d=0x02;
01F3: MOVLW 02
01F4: MOVWF 69
....................
.................... break;
01F5: GOTO 210
....................
.................... case 3: d=0x04;
01F6: MOVLW 04
01F7: MOVWF 69
....................
.................... break;
01F8: GOTO 210
....................
.................... case 4: d=0x08;
01F9: MOVLW 08
01FA: MOVWF 69
....................
.................... break;
01FB: GOTO 210
.................... case 5: d=0x10;
01FC: MOVLW 10
01FD: MOVWF 69
....................
.................... break;
01FE: GOTO 210
....................
.................... case 6: d=0x20;
01FF: MOVLW 20
0200: MOVWF 69
....................
.................... break;
0201: GOTO 210
.................... case 7: d=0x40;
0202: MOVLW 40
0203: MOVWF 69
....................
.................... break;
0204: GOTO 210
....................
.................... case 8: d=0x80;
0205: MOVLW 80
0206: MOVWF 69
....................
.................... break;
0207: GOTO 210
....................
.................... default:printf("chyba");
0208: MOVLW 07
0209: BSF 03.6
020A: MOVWF 0D
020B: MOVLW 00
020C: MOVWF 0F
020D: BCF 03.6
020E: CALL 042
....................
.................... break; }
020F: GOTO 210
....................
.................... i2c_start();
0210: BSF 20.4
0211: MOVF 20,W
0212: BSF 03.5
0213: MOVWF 07
0214: NOP
0215: BCF 03.5
0216: BSF 20.3
0217: MOVF 20,W
0218: BSF 03.5
0219: MOVWF 07
021A: NOP
021B: BCF 03.5
021C: BCF 07.4
021D: BCF 20.4
021E: MOVF 20,W
021F: BSF 03.5
0220: MOVWF 07
0221: NOP
0222: BCF 03.5
0223: BCF 07.3
0224: BCF 20.3
0225: MOVF 20,W
0226: BSF 03.5
0227: MOVWF 07
.................... I2C_Write(0xE0);
0228: MOVLW E0
0229: MOVWF 71
022A: BCF 03.5
022B: CALL 18C
....................
.................... I2C_write(d);
022C: MOVF 69,W
022D: MOVWF 71
022E: CALL 18C
.................... i2c_stop();
022F: BCF 20.4
0230: MOVF 20,W
0231: BSF 03.5
0232: MOVWF 07
0233: NOP
0234: BCF 03.5
0235: BSF 20.3
0236: MOVF 20,W
0237: BSF 03.5
0238: MOVWF 07
0239: BCF 03.5
023A: BTFSS 07.3
023B: GOTO 23A
023C: NOP
023D: GOTO 23E
023E: NOP
023F: BSF 20.4
0240: MOVF 20,W
0241: BSF 03.5
0242: MOVWF 07
0243: NOP
....................
.................... }
0244: BCF 03.5
0245: RETURN
....................
.................... //nacitani potrebnych informaci z modulu s baterii
.................... void batdata(void)
.................... {
.................... setHUB(1);
*
053C: MOVLW 01
053D: MOVWF 69
053E: CALL 1D6
.................... bat1PROUD=batPROUD();
053F: CALL 34C
0540: MOVF 79,W
0541: MOVWF 28
0542: MOVF 78,W
0543: MOVWF 27
.................... bat1STAV=batSTAV();
0544: CALL 35A
0545: MOVF 79,W
0546: MOVWF 22
0547: MOVF 78,W
0548: MOVWF 21
.................... bat1NAP=batNAP();
0549: CALL 368
054A: MOVF 79,W
054B: MOVWF 2E
054C: MOVF 78,W
054D: MOVWF 2D
.................... setHUB(2);
054E: MOVLW 02
054F: MOVWF 69
0550: CALL 1D6
.................... bat2PROUD=batPROUD();
0551: CALL 34C
0552: MOVF 79,W
0553: MOVWF 2A
0554: MOVF 78,W
0555: MOVWF 29
.................... bat2STAV=batSTAV();
0556: CALL 35A
0557: MOVF 79,W
0558: MOVWF 24
0559: MOVF 78,W
055A: MOVWF 23
.................... bat2NAP=batNAP();
055B: CALL 368
055C: MOVF 79,W
055D: MOVWF 30
055E: MOVF 78,W
055F: MOVWF 2F
.................... setHUB(3);
0560: MOVLW 03
0561: MOVWF 69
0562: CALL 1D6
.................... bat3PROUD=batPROUD();
0563: CALL 34C
0564: MOVF 79,W
0565: MOVWF 2C
0566: MOVF 78,W
0567: MOVWF 2B
.................... bat3STAV=batSTAV();
0568: CALL 35A
0569: MOVF 79,W
056A: MOVWF 26
056B: MOVF 78,W
056C: MOVWF 25
.................... bat3NAP=batNAP();
056D: CALL 368
056E: MOVF 79,W
056F: MOVWF 32
0570: MOVF 78,W
0571: MOVWF 31
....................
.................... bat1P=(bat1PROUD*(((float)bat1NAP/1000)));
0572: MOVF 2E,W
0573: MOVWF 6A
0574: MOVF 2D,W
0575: MOVWF 69
0576: CALL 376
0577: MOVF 77,W
0578: MOVWF 69
0579: MOVF 78,W
057A: MOVWF 6A
057B: MOVF 79,W
057C: MOVWF 6B
057D: MOVF 7A,W
057E: MOVWF 6C
057F: MOVWF 70
0580: MOVF 79,W
0581: MOVWF 6F
0582: MOVF 78,W
0583: MOVWF 6E
0584: MOVF 77,W
0585: MOVWF 6D
0586: CLRF 74
0587: CLRF 73
0588: MOVLW 7A
0589: MOVWF 72
058A: MOVLW 88
058B: MOVWF 71
058C: CALL 393
058D: MOVF 28,W
058E: MOVWF 6A
058F: MOVF 27,W
0590: MOVWF 69
0591: MOVF 77,W
0592: MOVWF 6B
0593: MOVF 78,W
0594: MOVWF 6C
0595: MOVF 79,W
0596: MOVWF 6D
0597: MOVF 7A,W
0598: MOVWF 6E
0599: MOVF 28,W
059A: MOVWF 70
059B: MOVF 27,W
059C: MOVWF 6F
059D: CALL 472
059E: MOVF 7A,W
059F: MOVWF 72
05A0: MOVF 79,W
05A1: MOVWF 71
05A2: MOVF 78,W
05A3: MOVWF 70
05A4: MOVF 77,W
05A5: MOVWF 6F
05A6: MOVF 6E,W
05A7: MOVWF 76
05A8: MOVF 6D,W
05A9: MOVWF 75
05AA: MOVF 6C,W
05AB: MOVWF 74
05AC: MOVF 6B,W
05AD: MOVWF 73
05AE: CALL 497
05AF: MOVF 7A,W
05B0: MOVWF 72
05B1: MOVF 79,W
05B2: MOVWF 71
05B3: MOVF 78,W
05B4: MOVWF 70
05B5: MOVF 77,W
05B6: MOVWF 6F
05B7: CALL 51D
05B8: MOVF 79,W
05B9: MOVWF 34
05BA: MOVF 78,W
05BB: MOVWF 33
.................... bat2P=(bat2PROUD*(((float)bat2NAP/1000)));
05BC: MOVF 30,W
05BD: MOVWF 6A
05BE: MOVF 2F,W
05BF: MOVWF 69
05C0: CALL 376
05C1: MOVF 77,W
05C2: MOVWF 69
05C3: MOVF 78,W
05C4: MOVWF 6A
05C5: MOVF 79,W
05C6: MOVWF 6B
05C7: MOVF 7A,W
05C8: MOVWF 6C
05C9: MOVWF 70
05CA: MOVF 79,W
05CB: MOVWF 6F
05CC: MOVF 78,W
05CD: MOVWF 6E
05CE: MOVF 77,W
05CF: MOVWF 6D
05D0: CLRF 74
05D1: CLRF 73
05D2: MOVLW 7A
05D3: MOVWF 72
05D4: MOVLW 88
05D5: MOVWF 71
05D6: CALL 393
05D7: MOVF 2A,W
05D8: MOVWF 6A
05D9: MOVF 29,W
05DA: MOVWF 69
05DB: MOVF 77,W
05DC: MOVWF 6B
05DD: MOVF 78,W
05DE: MOVWF 6C
05DF: MOVF 79,W
05E0: MOVWF 6D
05E1: MOVF 7A,W
05E2: MOVWF 6E
05E3: MOVF 2A,W
05E4: MOVWF 70
05E5: MOVF 29,W
05E6: MOVWF 6F
05E7: CALL 472
05E8: MOVF 7A,W
05E9: MOVWF 72
05EA: MOVF 79,W
05EB: MOVWF 71
05EC: MOVF 78,W
05ED: MOVWF 70
05EE: MOVF 77,W
05EF: MOVWF 6F
05F0: MOVF 6E,W
05F1: MOVWF 76
05F2: MOVF 6D,W
05F3: MOVWF 75
05F4: MOVF 6C,W
05F5: MOVWF 74
05F6: MOVF 6B,W
05F7: MOVWF 73
05F8: CALL 497
05F9: MOVF 7A,W
05FA: MOVWF 72
05FB: MOVF 79,W
05FC: MOVWF 71
05FD: MOVF 78,W
05FE: MOVWF 70
05FF: MOVF 77,W
0600: MOVWF 6F
0601: CALL 51D
0602: MOVF 79,W
0603: MOVWF 36
0604: MOVF 78,W
0605: MOVWF 35
.................... bat3P=(bat3PROUD*(((float)bat3NAP/1000)));
0606: MOVF 32,W
0607: MOVWF 6A
0608: MOVF 31,W
0609: MOVWF 69
060A: CALL 376
060B: MOVF 77,W
060C: MOVWF 69
060D: MOVF 78,W
060E: MOVWF 6A
060F: MOVF 79,W
0610: MOVWF 6B
0611: MOVF 7A,W
0612: MOVWF 6C
0613: MOVWF 70
0614: MOVF 79,W
0615: MOVWF 6F
0616: MOVF 78,W
0617: MOVWF 6E
0618: MOVF 77,W
0619: MOVWF 6D
061A: CLRF 74
061B: CLRF 73
061C: MOVLW 7A
061D: MOVWF 72
061E: MOVLW 88
061F: MOVWF 71
0620: CALL 393
0621: MOVF 2C,W
0622: MOVWF 6A
0623: MOVF 2B,W
0624: MOVWF 69
0625: MOVF 77,W
0626: MOVWF 6B
0627: MOVF 78,W
0628: MOVWF 6C
0629: MOVF 79,W
062A: MOVWF 6D
062B: MOVF 7A,W
062C: MOVWF 6E
062D: MOVF 2C,W
062E: MOVWF 70
062F: MOVF 2B,W
0630: MOVWF 6F
0631: CALL 472
0632: MOVF 7A,W
0633: MOVWF 72
0634: MOVF 79,W
0635: MOVWF 71
0636: MOVF 78,W
0637: MOVWF 70
0638: MOVF 77,W
0639: MOVWF 6F
063A: MOVF 6E,W
063B: MOVWF 76
063C: MOVF 6D,W
063D: MOVWF 75
063E: MOVF 6C,W
063F: MOVWF 74
0640: MOVF 6B,W
0641: MOVWF 73
0642: CALL 497
0643: MOVF 7A,W
0644: MOVWF 72
0645: MOVF 79,W
0646: MOVWF 71
0647: MOVF 78,W
0648: MOVWF 70
0649: MOVF 77,W
064A: MOVWF 6F
064B: CALL 51D
064C: MOVF 79,W
064D: MOVWF 38
064E: MOVF 78,W
064F: MOVWF 37
.................... }
0650: RETURN
....................
....................
.................... void main()
.................... {
*
095B: CLRF 04
095C: BCF 03.7
095D: MOVLW 1F
095E: ANDWF 03,F
095F: MOVLW 71
0960: BSF 03.5
0961: MOVWF 0F
0962: MOVF 0F,W
0963: BCF 03.5
0964: BCF 20.7
0965: MOVF 20,W
0966: BSF 03.5
0967: MOVWF 07
0968: BCF 03.5
0969: BSF 07.7
096A: BSF 03.5
096B: BSF 03.6
096C: MOVF 09,W
096D: ANDLW C0
096E: MOVWF 09
096F: BCF 03.6
0970: BCF 1F.4
0971: BCF 1F.5
0972: MOVLW 00
0973: BSF 03.6
0974: MOVWF 08
0975: BCF 03.5
0976: CLRF 07
0977: CLRF 08
0978: CLRF 09
.................... batMODE(1);
*
097E: MOVLW 01
097F: MOVWF 69
0980: BCF 0A.3
0981: CALL 088
0982: BSF 0A.3
.................... float vypocet;
....................
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
0983: BSF 03.5
0984: BSF 03.6
0985: MOVF 09,W
0986: ANDLW C0
0987: MOVWF 09
0988: BCF 03.6
0989: BCF 1F.4
098A: BCF 1F.5
098B: MOVLW 00
098C: BSF 03.6
098D: MOVWF 08
.................... setup_adc(ADC_CLOCK_DIV_2);
098E: BCF 03.5
098F: BCF 03.6
0990: BCF 1F.6
0991: BCF 1F.7
0992: BSF 03.5
0993: BCF 1F.7
0994: BCF 03.5
0995: BSF 1F.0
.................... setup_spi(SPI_SS_DISABLED);
0996: BCF 14.5
0997: BCF 20.5
0998: MOVF 20,W
0999: BSF 03.5
099A: MOVWF 07
099B: BCF 03.5
099C: BSF 20.4
099D: MOVF 20,W
099E: BSF 03.5
099F: MOVWF 07
09A0: BCF 03.5
09A1: BCF 20.3
09A2: MOVF 20,W
09A3: BSF 03.5
09A4: MOVWF 07
09A5: MOVLW 01
09A6: BCF 03.5
09A7: MOVWF 14
09A8: MOVLW 00
09A9: BSF 03.5
09AA: MOVWF 14
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
09AB: MOVF 01,W
09AC: ANDLW C7
09AD: IORLW 08
09AE: MOVWF 01
.................... setup_timer_1(T1_DISABLED);
09AF: BCF 03.5
09B0: CLRF 10
.................... setup_timer_2(T2_DISABLED,0,1);
09B1: MOVLW 00
09B2: MOVWF 78
09B3: MOVWF 12
09B4: MOVLW 00
09B5: BSF 03.5
09B6: MOVWF 12
.................... setup_ccp1(CCP_OFF);
09B7: BCF 03.5
09B8: BSF 20.2
09B9: MOVF 20,W
09BA: BSF 03.5
09BB: MOVWF 07
09BC: BCF 03.5
09BD: CLRF 17
09BE: BSF 03.5
09BF: CLRF 1B
09C0: CLRF 1C
09C1: MOVLW 01
09C2: MOVWF 1D
.................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
09C3: BCF 03.5
09C4: BSF 03.6
09C5: CLRF 07
09C6: CLRF 08
09C7: CLRF 09
....................
.................... batMODE(1);
09C8: BCF 03.6
09C9: MOVWF 69
09CA: BCF 0A.3
09CB: CALL 088
09CC: BSF 0A.3
....................
....................
.................... //printf("STAV1 STAV2 STAV3 VYKON1 VYKON2 VYKON3\r\n");
.................... while(TRUE)
.................... {
....................
.................... batdata();
09CD: BCF 0A.3
09CE: CALL 53C
09CF: BSF 0A.3
.................... //nastane pri nedostatku energie v hl. akumulátoru
.................... while(bat1STAV<20)
.................... {
09D0: MOVF 22,F
09D1: BTFSS 03.2
09D2: GOTO 26C
09D3: MOVF 21,W
09D4: SUBLW 13
09D5: BTFSS 03.0
09D6: GOTO 26C
.................... //printf("nedostatek energie\r\n");
.................... if(bat2STAV>10)
09D7: MOVF 24,F
09D8: BTFSS 03.2
09D9: GOTO 1DE
09DA: MOVF 23,W
09DB: SUBLW 0A
09DC: BTFSC 03.0
09DD: GOTO 1E4
.................... {
.................... batMODE(3);
09DE: MOVLW 03
09DF: MOVWF 69
09E0: BCF 0A.3
09E1: CALL 088
09E2: BSF 0A.3
.................... }
.................... else
09E3: GOTO 1F6
.................... {
.................... if(bat3STAV>10)
09E4: MOVF 26,F
09E5: BTFSS 03.2
09E6: GOTO 1EB
09E7: MOVF 25,W
09E8: SUBLW 0A
09E9: BTFSC 03.0
09EA: GOTO 1F1
.................... {
.................... batMODE(2);
09EB: MOVLW 02
09EC: MOVWF 69
09ED: BCF 0A.3
09EE: CALL 088
09EF: BSF 0A.3
.................... }
.................... else
09F0: GOTO 1F6
.................... {
.................... batMODE(4);
09F1: MOVLW 04
09F2: MOVWF 69
09F3: BCF 0A.3
09F4: CALL 088
09F5: BSF 0A.3
.................... }
.................... }
.................... batdata();
09F6: BCF 0A.3
09F7: CALL 53C
09F8: BSF 0A.3
.................... sprintf(baterka, " %3.0Ld %3.0Ld %3.0Ld %5.0Ld %5.0Ld %5.0Ld %5.0Ld", bat1STAV, bat2STAV, bat3STAV, bat1P, bat2P, bat3P, 0);
09F9: CLRF 64
09FA: MOVLW 3B
09FB: MOVWF 63
09FC: MOVLW 20
09FD: MOVWF 72
09FE: BCF 0A.3
09FF: CALL 651
0A00: BSF 0A.3
0A01: MOVLW 03
0A02: MOVWF 04
0A03: MOVF 22,W
0A04: MOVWF 6A
0A05: MOVF 21,W
0A06: MOVWF 69
0A07: BCF 0A.3
0A08: CALL 65E
0A09: BSF 0A.3
0A0A: MOVLW 20
0A0B: MOVWF 72
0A0C: BCF 0A.3
0A0D: CALL 651
0A0E: BSF 0A.3
0A0F: MOVLW 03
0A10: MOVWF 04
0A11: MOVF 24,W
0A12: MOVWF 6A
0A13: MOVF 23,W
0A14: MOVWF 69
0A15: BCF 0A.3
0A16: CALL 65E
0A17: BSF 0A.3
0A18: MOVLW 20
0A19: MOVWF 72
0A1A: BCF 0A.3
0A1B: CALL 651
0A1C: BSF 0A.3
0A1D: MOVLW 03
0A1E: MOVWF 04
0A1F: MOVF 26,W
0A20: MOVWF 6A
0A21: MOVF 25,W
0A22: MOVWF 69
0A23: BCF 0A.3
0A24: CALL 65E
0A25: BSF 0A.3
0A26: MOVLW 20
0A27: MOVWF 72
0A28: BCF 0A.3
0A29: CALL 651
0A2A: BSF 0A.3
0A2B: MOVLW 01
0A2C: MOVWF 04
0A2D: MOVF 34,W
0A2E: MOVWF 6A
0A2F: MOVF 33,W
0A30: MOVWF 69
0A31: BCF 0A.3
0A32: CALL 65E
0A33: BSF 0A.3
0A34: MOVLW 20
0A35: MOVWF 72
0A36: BCF 0A.3
0A37: CALL 651
0A38: BSF 0A.3
0A39: MOVLW 01
0A3A: MOVWF 04
0A3B: MOVF 36,W
0A3C: MOVWF 6A
0A3D: MOVF 35,W
0A3E: MOVWF 69
0A3F: BCF 0A.3
0A40: CALL 65E
0A41: BSF 0A.3
0A42: MOVLW 20
0A43: MOVWF 72
0A44: BCF 0A.3
0A45: CALL 651
0A46: BSF 0A.3
0A47: MOVLW 01
0A48: MOVWF 04
0A49: MOVF 38,W
0A4A: MOVWF 6A
0A4B: MOVF 37,W
0A4C: MOVWF 69
0A4D: BCF 0A.3
0A4E: CALL 65E
0A4F: BSF 0A.3
0A50: MOVLW 20
0A51: MOVWF 72
0A52: BCF 0A.3
0A53: CALL 651
0A54: BSF 0A.3
0A55: MOVLW 01
0A56: MOVWF 04
0A57: CLRF 6A
0A58: CLRF 69
0A59: BCF 0A.3
0A5A: CALL 65E
0A5B: BSF 0A.3
.................... printf(baterka);
0A5C: MOVLW 3B
0A5D: MOVWF 04
0A5E: BCF 03.7
0A5F: BCF 0A.3
0A60: CALL 6DE
0A61: BSF 0A.3
.................... delay_ms(5000);
0A62: MOVLW 14
0A63: MOVWF 69
0A64: MOVLW FA
0A65: MOVWF 6A
0A66: BCF 0A.3
0A67: CALL 00A
0A68: BSF 0A.3
0A69: DECFSZ 69,F
0A6A: GOTO 264
.................... }
0A6B: GOTO 1D0
....................
.................... //osetreni proti prebiti clanku
.................... while(bat2STAV>96)
.................... {
0A6C: MOVF 24,F
0A6D: BTFSS 03.2
0A6E: GOTO 273
0A6F: MOVF 23,W
0A70: SUBLW 60
0A71: BTFSC 03.0
0A72: GOTO 301
.................... //printf("bat2 prebita");
.................... if(bat1STAV>98)
0A73: MOVF 22,F
0A74: BTFSS 03.2
0A75: GOTO 27A
0A76: MOVF 21,W
0A77: SUBLW 62
0A78: BTFSC 03.0
0A79: GOTO 280
.................... {
.................... batMODE(6); //vybijeni do rezistoru
0A7A: MOVLW 06
0A7B: MOVWF 69
0A7C: BCF 0A.3
0A7D: CALL 088
0A7E: BSF 0A.3
.................... }
.................... else
0A7F: GOTO 285
.................... {
.................... batMODE(3); //nabijeni hl. akumulatoru
0A80: MOVLW 03
0A81: MOVWF 69
0A82: BCF 0A.3
0A83: CALL 088
0A84: BSF 0A.3
.................... }
....................
.................... batdata();
0A85: BCF 0A.3
0A86: CALL 53C
0A87: BSF 0A.3
.................... sprintf(baterka, " %3.0Ld %3.0Ld %3.0Ld %5.0Ld %5.0Ld %5.0Ld %5.0Ld", bat1STAV, bat2STAV, bat3STAV, bat1P, bat2P, bat3P, 0);
0A88: CLRF 64
0A89: MOVLW 3B
0A8A: MOVWF 63
0A8B: MOVLW 20
0A8C: MOVWF 72
0A8D: BCF 0A.3
0A8E: CALL 651
0A8F: BSF 0A.3
0A90: MOVLW 03
0A91: MOVWF 04
0A92: MOVF 22,W
0A93: MOVWF 6A
0A94: MOVF 21,W
0A95: MOVWF 69
0A96: BCF 0A.3
0A97: CALL 65E
0A98: BSF 0A.3
0A99: MOVLW 20
0A9A: MOVWF 72
0A9B: BCF 0A.3
0A9C: CALL 651
0A9D: BSF 0A.3
0A9E: MOVLW 03
0A9F: MOVWF 04
0AA0: MOVF 24,W
0AA1: MOVWF 6A
0AA2: MOVF 23,W
0AA3: MOVWF 69
0AA4: BCF 0A.3
0AA5: CALL 65E
0AA6: BSF 0A.3
0AA7: MOVLW 20
0AA8: MOVWF 72
0AA9: BCF 0A.3
0AAA: CALL 651
0AAB: BSF 0A.3
0AAC: MOVLW 03
0AAD: MOVWF 04
0AAE: MOVF 26,W
0AAF: MOVWF 6A
0AB0: MOVF 25,W
0AB1: MOVWF 69
0AB2: BCF 0A.3
0AB3: CALL 65E
0AB4: BSF 0A.3
0AB5: MOVLW 20
0AB6: MOVWF 72
0AB7: BCF 0A.3
0AB8: CALL 651
0AB9: BSF 0A.3
0ABA: MOVLW 01
0ABB: MOVWF 04
0ABC: MOVF 34,W
0ABD: MOVWF 6A
0ABE: MOVF 33,W
0ABF: MOVWF 69
0AC0: BCF 0A.3
0AC1: CALL 65E
0AC2: BSF 0A.3
0AC3: MOVLW 20
0AC4: MOVWF 72
0AC5: BCF 0A.3
0AC6: CALL 651
0AC7: BSF 0A.3
0AC8: MOVLW 01
0AC9: MOVWF 04
0ACA: MOVF 36,W
0ACB: MOVWF 6A
0ACC: MOVF 35,W
0ACD: MOVWF 69
0ACE: BCF 0A.3
0ACF: CALL 65E
0AD0: BSF 0A.3
0AD1: MOVLW 20
0AD2: MOVWF 72
0AD3: BCF 0A.3
0AD4: CALL 651
0AD5: BSF 0A.3
0AD6: MOVLW 01
0AD7: MOVWF 04
0AD8: MOVF 38,W
0AD9: MOVWF 6A
0ADA: MOVF 37,W
0ADB: MOVWF 69
0ADC: BCF 0A.3
0ADD: CALL 65E
0ADE: BSF 0A.3
0ADF: MOVLW 20
0AE0: MOVWF 72
0AE1: BCF 0A.3
0AE2: CALL 651
0AE3: BSF 0A.3
0AE4: MOVLW 01
0AE5: MOVWF 04
0AE6: CLRF 6A
0AE7: CLRF 69
0AE8: BCF 0A.3
0AE9: CALL 65E
0AEA: BSF 0A.3
.................... printf(baterka);
0AEB: MOVLW 3B
0AEC: MOVWF 04
0AED: BCF 03.7
0AEE: BCF 0A.3
0AEF: CALL 6DE
0AF0: BSF 0A.3
.................... bat2STAV=bat2STAV-2;
0AF1: MOVLW 02
0AF2: SUBWF 23,F
0AF3: MOVLW 00
0AF4: BTFSS 03.0
0AF5: MOVLW 01
0AF6: SUBWF 24,F
.................... delay_ms(5000);
0AF7: MOVLW 14
0AF8: MOVWF 69
0AF9: MOVLW FA
0AFA: MOVWF 6A
0AFB: BCF 0A.3
0AFC: CALL 00A
0AFD: BSF 0A.3
0AFE: DECFSZ 69,F
0AFF: GOTO 2F9
.................... }
0B00: GOTO 26C
....................
.................... while(bat3STAV>96)
.................... {
0B01: MOVF 26,F
0B02: BTFSS 03.2
0B03: GOTO 308
0B04: MOVF 25,W
0B05: SUBLW 60
0B06: BTFSC 03.0
0B07: GOTO 396
.................... //printf("bat3 prebyta\r\n");
.................... if(bat1STAV>98)
0B08: MOVF 22,F
0B09: BTFSS 03.2
0B0A: GOTO 30F
0B0B: MOVF 21,W
0B0C: SUBLW 62
0B0D: BTFSC 03.0
0B0E: GOTO 315
.................... {
.................... batMODE(5); //vybijeni do rezistoru
0B0F: MOVLW 05
0B10: MOVWF 69
0B11: BCF 0A.3
0B12: CALL 088
0B13: BSF 0A.3
.................... }
.................... else
0B14: GOTO 31A
.................... {
.................... batMODE(2); //vybijeni do hl. akumulatoru
0B15: MOVLW 02
0B16: MOVWF 69
0B17: BCF 0A.3
0B18: CALL 088
0B19: BSF 0A.3
.................... }
....................
.................... batdata();
0B1A: BCF 0A.3
0B1B: CALL 53C
0B1C: BSF 0A.3
.................... sprintf(baterka, " %3.0Ld %3.0Ld %3.0Ld %5.0Ld %5.0Ld %5.0Ld %5.0Ld", bat1STAV, bat2STAV, bat3STAV, bat1P, bat2P, bat3P, 0);
0B1D: CLRF 64
0B1E: MOVLW 3B
0B1F: MOVWF 63
0B20: MOVLW 20
0B21: MOVWF 72
0B22: BCF 0A.3
0B23: CALL 651
0B24: BSF 0A.3
0B25: MOVLW 03
0B26: MOVWF 04
0B27: MOVF 22,W
0B28: MOVWF 6A
0B29: MOVF 21,W
0B2A: MOVWF 69
0B2B: BCF 0A.3
0B2C: CALL 65E
0B2D: BSF 0A.3
0B2E: MOVLW 20
0B2F: MOVWF 72
0B30: BCF 0A.3
0B31: CALL 651
0B32: BSF 0A.3
0B33: MOVLW 03
0B34: MOVWF 04
0B35: MOVF 24,W
0B36: MOVWF 6A
0B37: MOVF 23,W
0B38: MOVWF 69
0B39: BCF 0A.3
0B3A: CALL 65E
0B3B: BSF 0A.3
0B3C: MOVLW 20
0B3D: MOVWF 72
0B3E: BCF 0A.3
0B3F: CALL 651
0B40: BSF 0A.3
0B41: MOVLW 03
0B42: MOVWF 04
0B43: MOVF 26,W
0B44: MOVWF 6A
0B45: MOVF 25,W
0B46: MOVWF 69
0B47: BCF 0A.3
0B48: CALL 65E
0B49: BSF 0A.3
0B4A: MOVLW 20
0B4B: MOVWF 72
0B4C: BCF 0A.3
0B4D: CALL 651
0B4E: BSF 0A.3
0B4F: MOVLW 01
0B50: MOVWF 04
0B51: MOVF 34,W
0B52: MOVWF 6A
0B53: MOVF 33,W
0B54: MOVWF 69
0B55: BCF 0A.3
0B56: CALL 65E
0B57: BSF 0A.3
0B58: MOVLW 20
0B59: MOVWF 72
0B5A: BCF 0A.3
0B5B: CALL 651
0B5C: BSF 0A.3
0B5D: MOVLW 01
0B5E: MOVWF 04
0B5F: MOVF 36,W
0B60: MOVWF 6A
0B61: MOVF 35,W
0B62: MOVWF 69
0B63: BCF 0A.3
0B64: CALL 65E
0B65: BSF 0A.3
0B66: MOVLW 20
0B67: MOVWF 72
0B68: BCF 0A.3
0B69: CALL 651
0B6A: BSF 0A.3
0B6B: MOVLW 01
0B6C: MOVWF 04
0B6D: MOVF 38,W
0B6E: MOVWF 6A
0B6F: MOVF 37,W
0B70: MOVWF 69
0B71: BCF 0A.3
0B72: CALL 65E
0B73: BSF 0A.3
0B74: MOVLW 20
0B75: MOVWF 72
0B76: BCF 0A.3
0B77: CALL 651
0B78: BSF 0A.3
0B79: MOVLW 01
0B7A: MOVWF 04
0B7B: CLRF 6A
0B7C: CLRF 69
0B7D: BCF 0A.3
0B7E: CALL 65E
0B7F: BSF 0A.3
.................... printf(baterka);
0B80: MOVLW 3B
0B81: MOVWF 04
0B82: BCF 03.7
0B83: BCF 0A.3
0B84: CALL 6DE
0B85: BSF 0A.3
.................... bat3STAV=bat3STAV-2;
0B86: MOVLW 02
0B87: SUBWF 25,F
0B88: MOVLW 00
0B89: BTFSS 03.0
0B8A: MOVLW 01
0B8B: SUBWF 26,F
.................... delay_ms(5000);
0B8C: MOVLW 14
0B8D: MOVWF 69
0B8E: MOVLW FA
0B8F: MOVWF 6A
0B90: BCF 0A.3
0B91: CALL 00A
0B92: BSF 0A.3
0B93: DECFSZ 69,F
0B94: GOTO 38E
.................... }
0B95: GOTO 301
....................
.................... while(input(NOC)==1) //nastane pri zapadu Slunce
.................... {
0B96: BSF 03.5
0B97: BSF 06.1
0B98: BCF 03.5
0B99: BTFSS 06.1
0B9A: GOTO 45D
.................... //printf("noc\r\n");
.................... batdata();
0B9B: BCF 0A.3
0B9C: CALL 53C
0B9D: BSF 0A.3
....................
.................... if(bat1STAV<98) //dobiti hl. akumulatoru
0B9E: MOVF 22,F
0B9F: BTFSS 03.2
0BA0: GOTO 3C8
0BA1: MOVF 21,W
0BA2: SUBLW 61
0BA3: BTFSS 03.0
0BA4: GOTO 3C8
.................... {
....................
.................... if(bat2STAV>20)
0BA5: MOVF 24,F
0BA6: BTFSS 03.2
0BA7: GOTO 3AC
0BA8: MOVF 23,W
0BA9: SUBLW 14
0BAA: BTFSC 03.0
0BAB: GOTO 3B2
.................... {
.................... batMODE(3);
0BAC: MOVLW 03
0BAD: MOVWF 69
0BAE: BCF 0A.3
0BAF: CALL 088
0BB0: BSF 0A.3
.................... }
.................... else
0BB1: GOTO 3C4
.................... {
....................
.................... if(bat3STAV>20)
0BB2: MOVF 26,F
0BB3: BTFSS 03.2
0BB4: GOTO 3B9
0BB5: MOVF 25,W
0BB6: SUBLW 14
0BB7: BTFSC 03.0
0BB8: GOTO 3BF
.................... {
.................... batMODE(2);
0BB9: MOVLW 02
0BBA: MOVWF 69
0BBB: BCF 0A.3
0BBC: CALL 088
0BBD: BSF 0A.3
.................... }
.................... else
0BBE: GOTO 3C4
.................... {
.................... batMODE(1);
0BBF: MOVLW 01
0BC0: MOVWF 69
0BC1: BCF 0A.3
0BC2: CALL 088
0BC3: BSF 0A.3
.................... }
....................
.................... }
.................... batdata();
0BC4: BCF 0A.3
0BC5: CALL 53C
0BC6: BSF 0A.3
.................... }
.................... else //prebitecna energie do rezistoru
0BC7: GOTO 3E7
.................... {
.................... if(bat2STAV>20)
0BC8: MOVF 24,F
0BC9: BTFSS 03.2
0BCA: GOTO 3CF
0BCB: MOVF 23,W
0BCC: SUBLW 14
0BCD: BTFSC 03.0
0BCE: GOTO 3D5
.................... {
.................... batMODE(6);
0BCF: MOVLW 06
0BD0: MOVWF 69
0BD1: BCF 0A.3
0BD2: CALL 088
0BD3: BSF 0A.3
.................... }
.................... else
0BD4: GOTO 3E7
.................... {
.................... if(bat3STAV>20)
0BD5: MOVF 26,F
0BD6: BTFSS 03.2
0BD7: GOTO 3DC
0BD8: MOVF 25,W
0BD9: SUBLW 14
0BDA: BTFSC 03.0
0BDB: GOTO 3E2
.................... {
.................... batMODE(5);
0BDC: MOVLW 05
0BDD: MOVWF 69
0BDE: BCF 0A.3
0BDF: CALL 088
0BE0: BSF 0A.3
.................... }
.................... else
0BE1: GOTO 3E7
.................... {
.................... batMODE(1);
0BE2: MOVLW 01
0BE3: MOVWF 69
0BE4: BCF 0A.3
0BE5: CALL 088
0BE6: BSF 0A.3
.................... }
.................... }
.................... }
....................
.................... batdata();
0BE7: BCF 0A.3
0BE8: CALL 53C
0BE9: BSF 0A.3
.................... sprintf(baterka, " %3.0Ld %3.0Ld %3.0Ld %5.0Ld %5.0Ld %5.0Ld %5.0Ld", bat1STAV, bat2STAV, bat3STAV, bat1P, bat2P, bat3P, 0);
0BEA: CLRF 64
0BEB: MOVLW 3B
0BEC: MOVWF 63
0BED: MOVLW 20
0BEE: MOVWF 72
0BEF: BCF 0A.3
0BF0: CALL 651
0BF1: BSF 0A.3
0BF2: MOVLW 03
0BF3: MOVWF 04
0BF4: MOVF 22,W
0BF5: MOVWF 6A
0BF6: MOVF 21,W
0BF7: MOVWF 69
0BF8: BCF 0A.3
0BF9: CALL 65E
0BFA: BSF 0A.3
0BFB: MOVLW 20
0BFC: MOVWF 72
0BFD: BCF 0A.3
0BFE: CALL 651
0BFF: BSF 0A.3
0C00: MOVLW 03
0C01: MOVWF 04
0C02: MOVF 24,W
0C03: MOVWF 6A
0C04: MOVF 23,W
0C05: MOVWF 69
0C06: BCF 0A.3
0C07: CALL 65E
0C08: BSF 0A.3
0C09: MOVLW 20
0C0A: MOVWF 72
0C0B: BCF 0A.3
0C0C: CALL 651
0C0D: BSF 0A.3
0C0E: MOVLW 03
0C0F: MOVWF 04
0C10: MOVF 26,W
0C11: MOVWF 6A
0C12: MOVF 25,W
0C13: MOVWF 69
0C14: BCF 0A.3
0C15: CALL 65E
0C16: BSF 0A.3
0C17: MOVLW 20
0C18: MOVWF 72
0C19: BCF 0A.3
0C1A: CALL 651
0C1B: BSF 0A.3
0C1C: MOVLW 01
0C1D: MOVWF 04
0C1E: MOVF 34,W
0C1F: MOVWF 6A
0C20: MOVF 33,W
0C21: MOVWF 69
0C22: BCF 0A.3
0C23: CALL 65E
0C24: BSF 0A.3
0C25: MOVLW 20
0C26: MOVWF 72
0C27: BCF 0A.3
0C28: CALL 651
0C29: BSF 0A.3
0C2A: MOVLW 01
0C2B: MOVWF 04
0C2C: MOVF 36,W
0C2D: MOVWF 6A
0C2E: MOVF 35,W
0C2F: MOVWF 69
0C30: BCF 0A.3
0C31: CALL 65E
0C32: BSF 0A.3
0C33: MOVLW 20
0C34: MOVWF 72
0C35: BCF 0A.3
0C36: CALL 651
0C37: BSF 0A.3
0C38: MOVLW 01
0C39: MOVWF 04
0C3A: MOVF 38,W
0C3B: MOVWF 6A
0C3C: MOVF 37,W
0C3D: MOVWF 69
0C3E: BCF 0A.3
0C3F: CALL 65E
0C40: BSF 0A.3
0C41: MOVLW 20
0C42: MOVWF 72
0C43: BCF 0A.3
0C44: CALL 651
0C45: BSF 0A.3
0C46: MOVLW 01
0C47: MOVWF 04
0C48: CLRF 6A
0C49: CLRF 69
0C4A: BCF 0A.3
0C4B: CALL 65E
0C4C: BSF 0A.3
.................... //sprintf(baterka, "%Ld %Ld %Ld 0 0 0 0" bat1STAV, bat2STAV, bat3STAV);
.................... printf(baterka);
0C4D: MOVLW 3B
0C4E: MOVWF 04
0C4F: BCF 03.7
0C50: BCF 0A.3
0C51: CALL 6DE
0C52: BSF 0A.3
.................... delay_ms(5000);
0C53: MOVLW 14
0C54: MOVWF 69
0C55: MOVLW FA
0C56: MOVWF 6A
0C57: BCF 0A.3
0C58: CALL 00A
0C59: BSF 0A.3
0C5A: DECFSZ 69,F
0C5B: GOTO 455
.................... }
0C5C: GOTO 396
....................
.................... batMODE(1);
0C5D: MOVLW 01
0C5E: MOVWF 69
0C5F: BCF 0A.3
0C60: CALL 088
0C61: BSF 0A.3
.................... if(bat2P==0) //osetreni deleni nulou
0C62: MOVF 35,F
0C63: BTFSS 03.2
0C64: GOTO 46D
0C65: MOVF 36,F
0C66: BTFSS 03.2
0C67: GOTO 46D
.................... {
.................... rozdil=9999;
0C68: MOVLW 27
0C69: MOVWF 3A
0C6A: MOVLW 0F
0C6B: MOVWF 39
.................... }
.................... else
0C6C: GOTO 4E9
.................... {
.................... vypocet=(((float)bat3P-bat2P)/bat2P)*100; //vypocet rozdilu dodavane enengie dodavane solárnim panelem sledujícím Slunce a fixnim solarnim panelem
0C6D: MOVF 38,W
0C6E: MOVWF 70
0C6F: MOVF 37,W
0C70: MOVWF 6F
0C71: BCF 0A.3
0C72: CALL 472
0C73: BSF 0A.3
0C74: MOVF 77,W
0C75: MOVWF 69
0C76: MOVF 78,W
0C77: MOVWF 6A
0C78: MOVF 79,W
0C79: MOVWF 6B
0C7A: MOVF 7A,W
0C7B: MOVWF 6C
0C7C: MOVF 36,W
0C7D: MOVWF 70
0C7E: MOVF 35,W
0C7F: MOVWF 6F
0C80: BCF 0A.3
0C81: CALL 472
0C82: BSF 0A.3
0C83: BSF 03.1
0C84: MOVF 6C,W
0C85: MOVWF 70
0C86: MOVF 6B,W
0C87: MOVWF 6F
0C88: MOVF 6A,W
0C89: MOVWF 6E
0C8A: MOVF 69,W
0C8B: MOVWF 6D
0C8C: MOVF 7A,W
0C8D: MOVWF 74
0C8E: MOVF 79,W
0C8F: MOVWF 73
0C90: MOVF 78,W
0C91: MOVWF 72
0C92: MOVF 77,W
0C93: MOVWF 71
0C94: GOTO 000
0C95: MOVF 77,W
0C96: MOVWF 69
0C97: MOVF 78,W
0C98: MOVWF 6A
0C99: MOVF 79,W
0C9A: MOVWF 6B
0C9B: MOVF 7A,W
0C9C: MOVWF 6C
0C9D: MOVF 36,W
0C9E: MOVWF 70
0C9F: MOVF 35,W
0CA0: MOVWF 6F
0CA1: BCF 0A.3
0CA2: CALL 472
0CA3: BSF 0A.3
0CA4: MOVF 6C,W
0CA5: MOVWF 70
0CA6: MOVF 6B,W
0CA7: MOVWF 6F
0CA8: MOVF 6A,W
0CA9: MOVWF 6E
0CAA: MOVF 69,W
0CAB: MOVWF 6D
0CAC: MOVF 7A,W
0CAD: MOVWF 74
0CAE: MOVF 79,W
0CAF: MOVWF 73
0CB0: MOVF 78,W
0CB1: MOVWF 72
0CB2: MOVF 77,W
0CB3: MOVWF 71
0CB4: BCF 0A.3
0CB5: CALL 393
0CB6: BSF 0A.3
0CB7: MOVF 77,W
0CB8: MOVWF 69
0CB9: MOVF 78,W
0CBA: MOVWF 6A
0CBB: MOVF 79,W
0CBC: MOVWF 6B
0CBD: MOVF 7A,W
0CBE: MOVWF 6C
0CBF: MOVWF 72
0CC0: MOVF 79,W
0CC1: MOVWF 71
0CC2: MOVF 78,W
0CC3: MOVWF 70
0CC4: MOVF 77,W
0CC5: MOVWF 6F
0CC6: CLRF 76
0CC7: CLRF 75
0CC8: MOVLW 48
0CC9: MOVWF 74
0CCA: MOVLW 85
0CCB: MOVWF 73
0CCC: BCF 0A.3
0CCD: CALL 497
0CCE: BSF 0A.3
0CCF: MOVF 7A,W
0CD0: MOVWF 68
0CD1: MOVF 79,W
0CD2: MOVWF 67
0CD3: MOVF 78,W
0CD4: MOVWF 66
0CD5: MOVF 77,W
0CD6: MOVWF 65
.................... rozdil=(signed int)vypocet;
0CD7: MOVF 68,W
0CD8: MOVWF 72
0CD9: MOVF 67,W
0CDA: MOVWF 71
0CDB: MOVF 66,W
0CDC: MOVWF 70
0CDD: MOVF 65,W
0CDE: MOVWF 6F
0CDF: BCF 0A.3
0CE0: CALL 51D
0CE1: BSF 0A.3
0CE2: CLRF 7A
0CE3: MOVF 78,W
0CE4: BTFSC 78.7
0CE5: DECF 7A,F
0CE6: MOVWF 39
0CE7: MOVF 7A,W
0CE8: MOVWF 3A
.................... }
....................
.................... //zaslani namerenych udaju na seriovou linku
.................... sprintf(baterka, " %3.0Ld %3.0Ld %3.0Ld %5.0Ld %5.0Ld %5.0Ld %5.0Ld", bat1STAV, bat2STAV, bat3STAV, bat1P, bat2P, bat3P, rozdil);
0CE9: CLRF 64
0CEA: MOVLW 3B
0CEB: MOVWF 63
0CEC: MOVLW 20
0CED: MOVWF 72
0CEE: BCF 0A.3
0CEF: CALL 651
0CF0: BSF 0A.3
0CF1: MOVLW 03
0CF2: MOVWF 04
0CF3: MOVF 22,W
0CF4: MOVWF 6A
0CF5: MOVF 21,W
0CF6: MOVWF 69
0CF7: BCF 0A.3
0CF8: CALL 65E
0CF9: BSF 0A.3
0CFA: MOVLW 20
0CFB: MOVWF 72
0CFC: BCF 0A.3
0CFD: CALL 651
0CFE: BSF 0A.3
0CFF: MOVLW 03
0D00: MOVWF 04
0D01: MOVF 24,W
0D02: MOVWF 6A
0D03: MOVF 23,W
0D04: MOVWF 69
0D05: BCF 0A.3
0D06: CALL 65E
0D07: BSF 0A.3
0D08: MOVLW 20
0D09: MOVWF 72
0D0A: BCF 0A.3
0D0B: CALL 651
0D0C: BSF 0A.3
0D0D: MOVLW 03
0D0E: MOVWF 04
0D0F: MOVF 26,W
0D10: MOVWF 6A
0D11: MOVF 25,W
0D12: MOVWF 69
0D13: BCF 0A.3
0D14: CALL 65E
0D15: BSF 0A.3
0D16: MOVLW 20
0D17: MOVWF 72
0D18: BCF 0A.3
0D19: CALL 651
0D1A: BSF 0A.3
0D1B: MOVLW 01
0D1C: MOVWF 04
0D1D: MOVF 34,W
0D1E: MOVWF 6A
0D1F: MOVF 33,W
0D20: MOVWF 69
0D21: BCF 0A.3
0D22: CALL 65E
0D23: BSF 0A.3
0D24: MOVLW 20
0D25: MOVWF 72
0D26: BCF 0A.3
0D27: CALL 651
0D28: BSF 0A.3
0D29: MOVLW 01
0D2A: MOVWF 04
0D2B: MOVF 36,W
0D2C: MOVWF 6A
0D2D: MOVF 35,W
0D2E: MOVWF 69
0D2F: BCF 0A.3
0D30: CALL 65E
0D31: BSF 0A.3
0D32: MOVLW 20
0D33: MOVWF 72
0D34: BCF 0A.3
0D35: CALL 651
0D36: BSF 0A.3
0D37: MOVLW 01
0D38: MOVWF 04
0D39: MOVF 38,W
0D3A: MOVWF 6A
0D3B: MOVF 37,W
0D3C: MOVWF 69
0D3D: BCF 0A.3
0D3E: CALL 65E
0D3F: BSF 0A.3
0D40: MOVLW 20
0D41: MOVWF 72
0D42: BCF 0A.3
0D43: CALL 651
0D44: BSF 0A.3
0D45: MOVLW 01
0D46: MOVWF 04
0D47: MOVF 3A,W
0D48: MOVWF 6A
0D49: MOVF 39,W
0D4A: MOVWF 69
0D4B: BCF 0A.3
0D4C: CALL 65E
0D4D: BSF 0A.3
.................... printf(baterka);
0D4E: MOVLW 3B
0D4F: MOVWF 04
0D50: BCF 03.7
0D51: BCF 0A.3
0D52: CALL 6DE
0D53: BSF 0A.3
.................... delay_ms (20000);
0D54: MOVLW 50
0D55: MOVWF 69
0D56: MOVLW FA
0D57: MOVWF 6A
0D58: BCF 0A.3
0D59: CALL 00A
0D5A: BSF 0A.3
0D5B: DECFSZ 69,F
0D5C: GOTO 556
.................... }
0D5D: GOTO 1CD
.................... }
....................
0D5E: SLEEP
Configuration Fuses:
Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
Word 2: 3FFF NOWRT BORV40