ctrlcharge.p1
来自「采用PICC18编写的单片机源代码」· P1 代码 · 共 2,555 行 · 第 1/5 页
P1
2,555 行
"492
[v _LB5 `VNb 1 e@31829 ]
[; ;pic18fxx2.h: 492: volatile near bit LB5 @ ((unsigned)&LATB*8)+5;
"493
[v _LB6 `VNb 1 e@31830 ]
[; ;pic18fxx2.h: 493: volatile near bit LB6 @ ((unsigned)&LATB*8)+6;
"494
[v _LB7 `VNb 1 e@31831 ]
[; ;pic18fxx2.h: 494: volatile near bit LB7 @ ((unsigned)&LATB*8)+7;
"496
[v _LATB0 `VNb 1 e@31824 ]
[; ;pic18fxx2.h: 496: volatile near bit LATB0 @ ((unsigned)&LATB*8)+0;
"497
[v _LATB1 `VNb 1 e@31825 ]
[; ;pic18fxx2.h: 497: volatile near bit LATB1 @ ((unsigned)&LATB*8)+1;
"498
[v _LATB2 `VNb 1 e@31826 ]
[; ;pic18fxx2.h: 498: volatile near bit LATB2 @ ((unsigned)&LATB*8)+2;
"499
[v _LATB3 `VNb 1 e@31827 ]
[; ;pic18fxx2.h: 499: volatile near bit LATB3 @ ((unsigned)&LATB*8)+3;
"500
[v _LATB4 `VNb 1 e@31828 ]
[; ;pic18fxx2.h: 500: volatile near bit LATB4 @ ((unsigned)&LATB*8)+4;
"501
[v _LATB5 `VNb 1 e@31829 ]
[; ;pic18fxx2.h: 501: volatile near bit LATB5 @ ((unsigned)&LATB*8)+5;
"502
[v _LATB6 `VNb 1 e@31830 ]
[; ;pic18fxx2.h: 502: volatile near bit LATB6 @ ((unsigned)&LATB*8)+6;
"503
[v _LATB7 `VNb 1 e@31831 ]
[; ;pic18fxx2.h: 503: volatile near bit LATB7 @ ((unsigned)&LATB*8)+7;
"506
[v _LA0 `VNb 1 e@31816 ]
[; ;pic18fxx2.h: 506: volatile near bit LA0 @ ((unsigned)&LATA*8)+0;
"507
[v _LA1 `VNb 1 e@31817 ]
[; ;pic18fxx2.h: 507: volatile near bit LA1 @ ((unsigned)&LATA*8)+1;
"508
[v _LA2 `VNb 1 e@31818 ]
[; ;pic18fxx2.h: 508: volatile near bit LA2 @ ((unsigned)&LATA*8)+2;
"509
[v _LA3 `VNb 1 e@31819 ]
[; ;pic18fxx2.h: 509: volatile near bit LA3 @ ((unsigned)&LATA*8)+3;
"510
[v _LA4 `VNb 1 e@31820 ]
[; ;pic18fxx2.h: 510: volatile near bit LA4 @ ((unsigned)&LATA*8)+4;
"511
[v _LA5 `VNb 1 e@31821 ]
[; ;pic18fxx2.h: 511: volatile near bit LA5 @ ((unsigned)&LATA*8)+5;
"512
[v _LA6 `VNb 1 e@31822 ]
[; ;pic18fxx2.h: 512: volatile near bit LA6 @ ((unsigned)&LATA*8)+6;
"514
[v _LATA0 `VNb 1 e@31816 ]
[; ;pic18fxx2.h: 514: volatile near bit LATA0 @ ((unsigned)&LATA*8)+0;
"515
[v _LATA1 `VNb 1 e@31817 ]
[; ;pic18fxx2.h: 515: volatile near bit LATA1 @ ((unsigned)&LATA*8)+1;
"516
[v _LATA2 `VNb 1 e@31818 ]
[; ;pic18fxx2.h: 516: volatile near bit LATA2 @ ((unsigned)&LATA*8)+2;
"517
[v _LATA3 `VNb 1 e@31819 ]
[; ;pic18fxx2.h: 517: volatile near bit LATA3 @ ((unsigned)&LATA*8)+3;
"518
[v _LATA4 `VNb 1 e@31820 ]
[; ;pic18fxx2.h: 518: volatile near bit LATA4 @ ((unsigned)&LATA*8)+4;
"519
[v _LATA5 `VNb 1 e@31821 ]
[; ;pic18fxx2.h: 519: volatile near bit LATA5 @ ((unsigned)&LATA*8)+5;
"520
[v _LATA6 `VNb 1 e@31822 ]
[; ;pic18fxx2.h: 520: volatile near bit LATA6 @ ((unsigned)&LATA*8)+6;
"524
[v _RE0 `VNb 1 e@31776 ]
[; ;pic18fxx2.h: 524: volatile near bit RE0 @ ((unsigned)&PORTE*8)+0;
"525
[v _RE1 `VNb 1 e@31777 ]
[; ;pic18fxx2.h: 525: volatile near bit RE1 @ ((unsigned)&PORTE*8)+1;
"526
[v _RE2 `VNb 1 e@31778 ]
[; ;pic18fxx2.h: 526: volatile near bit RE2 @ ((unsigned)&PORTE*8)+2;
"529
[v _RD0 `VNb 1 e@31768 ]
[; ;pic18fxx2.h: 529: volatile near bit RD0 @ ((unsigned)&PORTD*8)+0;
"530
[v _RD1 `VNb 1 e@31769 ]
[; ;pic18fxx2.h: 530: volatile near bit RD1 @ ((unsigned)&PORTD*8)+1;
"531
[v _RD2 `VNb 1 e@31770 ]
[; ;pic18fxx2.h: 531: volatile near bit RD2 @ ((unsigned)&PORTD*8)+2;
"532
[v _RD3 `VNb 1 e@31771 ]
[; ;pic18fxx2.h: 532: volatile near bit RD3 @ ((unsigned)&PORTD*8)+3;
"533
[v _RD4 `VNb 1 e@31772 ]
[; ;pic18fxx2.h: 533: volatile near bit RD4 @ ((unsigned)&PORTD*8)+4;
"534
[v _RD5 `VNb 1 e@31773 ]
[; ;pic18fxx2.h: 534: volatile near bit RD5 @ ((unsigned)&PORTD*8)+5;
"535
[v _RD6 `VNb 1 e@31774 ]
[; ;pic18fxx2.h: 535: volatile near bit RD6 @ ((unsigned)&PORTD*8)+6;
"536
[v _RD7 `VNb 1 e@31775 ]
[; ;pic18fxx2.h: 536: volatile near bit RD7 @ ((unsigned)&PORTD*8)+7;
"540
[v _RC0 `VNb 1 e@31760 ]
[; ;pic18fxx2.h: 540: volatile near bit RC0 @ ((unsigned)&PORTC*8)+0;
"541
[v _RC1 `VNb 1 e@31761 ]
[; ;pic18fxx2.h: 541: volatile near bit RC1 @ ((unsigned)&PORTC*8)+1;
"542
[v _RC2 `VNb 1 e@31762 ]
[; ;pic18fxx2.h: 542: volatile near bit RC2 @ ((unsigned)&PORTC*8)+2;
"543
[v _RC3 `VNb 1 e@31763 ]
[; ;pic18fxx2.h: 543: volatile near bit RC3 @ ((unsigned)&PORTC*8)+3;
"544
[v _RC4 `VNb 1 e@31764 ]
[; ;pic18fxx2.h: 544: volatile near bit RC4 @ ((unsigned)&PORTC*8)+4;
"545
[v _RC5 `VNb 1 e@31765 ]
[; ;pic18fxx2.h: 545: volatile near bit RC5 @ ((unsigned)&PORTC*8)+5;
"546
[v _RC6 `VNb 1 e@31766 ]
[; ;pic18fxx2.h: 546: volatile near bit RC6 @ ((unsigned)&PORTC*8)+6;
"547
[v _RC7 `VNb 1 e@31767 ]
[; ;pic18fxx2.h: 547: volatile near bit RC7 @ ((unsigned)&PORTC*8)+7;
"550
[v _RB0 `VNb 1 e@31752 ]
[; ;pic18fxx2.h: 550: volatile near bit RB0 @ ((unsigned)&PORTB*8)+0;
"551
[v _RB1 `VNb 1 e@31753 ]
[; ;pic18fxx2.h: 551: volatile near bit RB1 @ ((unsigned)&PORTB*8)+1;
"552
[v _RB2 `VNb 1 e@31754 ]
[; ;pic18fxx2.h: 552: volatile near bit RB2 @ ((unsigned)&PORTB*8)+2;
"553
[v _RB3 `VNb 1 e@31755 ]
[; ;pic18fxx2.h: 553: volatile near bit RB3 @ ((unsigned)&PORTB*8)+3;
"554
[v _RB4 `VNb 1 e@31756 ]
[; ;pic18fxx2.h: 554: volatile near bit RB4 @ ((unsigned)&PORTB*8)+4;
"555
[v _RB5 `VNb 1 e@31757 ]
[; ;pic18fxx2.h: 555: volatile near bit RB5 @ ((unsigned)&PORTB*8)+5;
"556
[v _RB6 `VNb 1 e@31758 ]
[; ;pic18fxx2.h: 556: volatile near bit RB6 @ ((unsigned)&PORTB*8)+6;
"557
[v _RB7 `VNb 1 e@31759 ]
[; ;pic18fxx2.h: 557: volatile near bit RB7 @ ((unsigned)&PORTB*8)+7;
"560
[v _RA0 `VNb 1 e@31744 ]
[; ;pic18fxx2.h: 560: volatile near bit RA0 @ ((unsigned)&PORTA*8)+0;
"561
[v _RA1 `VNb 1 e@31745 ]
[; ;pic18fxx2.h: 561: volatile near bit RA1 @ ((unsigned)&PORTA*8)+1;
"562
[v _RA2 `VNb 1 e@31746 ]
[; ;pic18fxx2.h: 562: volatile near bit RA2 @ ((unsigned)&PORTA*8)+2;
"563
[v _RA3 `VNb 1 e@31747 ]
[; ;pic18fxx2.h: 563: volatile near bit RA3 @ ((unsigned)&PORTA*8)+3;
"564
[v _RA4 `VNb 1 e@31748 ]
[; ;pic18fxx2.h: 564: volatile near bit RA4 @ ((unsigned)&PORTA*8)+4;
"565
[v _RA5 `VNb 1 e@31749 ]
[; ;pic18fxx2.h: 565: volatile near bit RA5 @ ((unsigned)&PORTA*8)+5;
"566
[v _RA6 `VNb 1 e@31750 ]
[; ;pic18fxx2.h: 566: volatile near bit RA6 @ ((unsigned)&PORTA*8)+6;
[; ;pic18.h: 293: extern unsigned char eeprom_read(unsigned int address);
[; ;pic18.h: 294: extern void eeprom_write(unsigned int address,unsigned char data);
[; ;pic18.h: 298: extern unsigned char flash_read(unsigned long addr);
[; ;pic18.h: 302: extern void flash_write(const unsigned char *,unsigned int,far unsigned char *);
[; ;pic18.h: 305: extern void flash_erase(unsigned long addr);
[; ;pic18.h: 323: extern unsigned int config_read(unsigned char reg_no);
[; ;pic18.h: 324: extern void config_write(unsigned char reg_no, unsigned int dataword);
[; ;pic18.h: 327: extern unsigned int device_id_read(void);
[; ;pic18.h: 330: extern unsigned char idloc_read(unsigned char reg_no);
[; ;pic18.h: 331: extern void idloc_write(unsigned char reg_no,unsigned char data);
[; ;pic18.h: 334: extern void initiate_write(void);
[; ;pic18.h: 353: extern unsigned char checksum8(unsigned long startAddr, unsigned long length);
[; ;pic18.h: 354: extern unsigned int checksum16(unsigned long startAddr, unsigned long length);
[; ;pic18.h: 355: extern unsigned long checksum32(unsigned long startAddr, unsigned long length);
"13 E:\workall\LAMP2\PICC18\Reconv\main.h
[v _dispBuf `uc -> 5 `i e ]
[; ;main.h: 13: unsigned char dispBuf[5];
"14
[v _taskNo `uc 1 e ]
[; ;main.h: 14: unsigned char taskNo;
"15
[v _FaceReg `uc 1 e ]
[; ;main.h: 15: unsigned char FaceReg;
"16
[v _FaceChnNo `uc 1 e ]
[; ;main.h: 16: unsigned char FaceChnNo;
"17
[v _FaceEmerNo `uc 1 e ]
[; ;main.h: 17: unsigned char FaceEmerNo;
"18
[v _Intpart `uc -> 3 `i e ]
[v _Decm `uc -> 2 `i e ]
[; ;main.h: 18: unsigned char Intpart[3],Decm[2];
"19
[v _flag_1Sec `b 1 s ]
[; ;main.h: 19: static bit flag_1Sec;
"11 E:\workall\LAMP2\PICC18\Reconv\CtrlCharge.h
[v _TableFlagStTest `Cuc -> 4 `i e ]
[i _TableFlagStTest
:U ..
-> -> 4 `i `uc
-> + -> 4 `i -> 1 `i `uc
-> + -> 4 `i -> 2 `i `uc
-> + -> 4 `i -> 3 `i `uc
..
][; ;CtrlCharge.h: 11: const unsigned char TableFlagStTest[4]={0x04,0x04+1,0x04+2,0x04+3};
"13
[v F823 `Cuc -> 4 `i t ]
[v _TableAddrE2CtrlCharge `F823 -> 4 `i e ]
[i _TableAddrE2CtrlCharge
:U ..
:U ..
-> + -> 4 `i -> 4 `i `uc
-> + + -> 4 `i -> 4 `i -> 1 `i `uc
-> + + -> 4 `i -> 4 `i -> 2 `i `uc
-> + + -> 4 `i -> 4 `i -> 3 `i `uc
..
:U ..
"14
-> + + -> 4 `i -> 4 `i -> 4 `i `uc
-> + + -> 4 `i -> 4 `i -> 5 `i `uc
-> + + -> 4 `i -> 4 `i -> 6 `i `uc
-> + + -> 4 `i -> 4 `i -> 7 `i `uc
..
:U ..
"15
-> + + -> 4 `i -> 4 `i -> 8 `i `uc
-> + + -> 4 `i -> 4 `i -> 9 `i `uc
-> + + -> 4 `i -> 4 `i -> 10 `i `uc
-> + + -> 4 `i -> 4 `i -> 11 `i `uc
..
:U ..
"16
-> + + -> 4 `i -> 4 `i -> 12 `i `uc
-> + + -> 4 `i -> 4 `i -> 13 `i `uc
-> + + -> 4 `i -> 4 `i -> 14 `i `uc
-> + + -> 4 `i -> 4 `i -> 15 `i `uc
..
..
][; ;CtrlCharge.h: 13: const unsigned char TableAddrE2CtrlCharge[4][4]={{0x04+4,0x04+4+1,0x04+4+2,0x04+4+3},
[; ;CtrlCharge.h: 14: {0x04+4+4,0x04+4+5,0x04+4+6,0x04+4+7},
[; ;CtrlCharge.h: 15: {0x04+4+8,0x04+4+9,0x04+4+10,0x04+4+11},
[; ;CtrlCharge.h: 16: {0x04+4+12,0x04+4+13,0x04+4+14,0x04+4+15}};
"19
[v _ChargeHour `uc 1 s ]
[; ;CtrlCharge.h: 19: static unsigned char ChargeHour;
"20
[v _DischargeHour `uc 1 s ]
[; ;CtrlCharge.h: 20: static unsigned char DischargeHour;
"30
[s S1 `uc 1 `uc 1 `uc 1 `uc 1 `uc 1 `uc 1 `uc 1 ]
[n S1 strCtrlCharge second minute hour FlagIsStTest FlagIsCharge ChargeNum disChargeNum ]
[; ;CtrlCharge.h: 21: struct strCtrlCharge
[; ;CtrlCharge.h: 22: {
[; ;CtrlCharge.h: 23: unsigned char second;
[; ;CtrlCharge.h: 24: unsigned char minute;
[; ;CtrlCharge.h: 25: unsigned char hour;
[; ;CtrlCharge.h: 26: unsigned char FlagIsStTest;
[; ;CtrlCharge.h: 27: unsigned char FlagIsCharge;
[; ;CtrlCharge.h: 28: unsigned char ChargeNum;
[; ;CtrlCharge.h: 29: unsigned char disChargeNum;
[; ;CtrlCharge.h: 30: };
"31
[v _CtrlCharge `S1 -> 4 `i e ]
[; ;CtrlCharge.h: 31: struct strCtrlCharge CtrlCharge[4];
[; ;CtrlCharge.h: 32: void CtrlCharge_Initial(void);
[; ;CtrlCharge.h: 33: void MainCtrlCharge(void);
[; ;CtrlCharge.h: 34: void resetChargePara(unsigned char ChargeChnNo);
[; ;CtrlCharge.h: 35: void startCtrlCharge(unsigned char ChargeChnNo);
"9 E:\workall\LAMP2\PICC18\Reconv\CtrlCharge.c
[v _CtrlCharge_Initial `(v 1 ef ]
{
[; ;CtrlCharge.c: 8: void CtrlCharge_Initial(void)
[; ;CtrlCharge.c: 9: {
[e :U _CtrlCharge_Initial ]
[f ]
"10
[v _tmpCtr `uc 1 a ]
[; ;CtrlCharge.c: 10: unsigned char tmpCtr;
[; ;CtrlCharge.c: 11: ChargeHour=eeprom_read(0x02);
"293 E:\workall\LAMP2\PICC18\Reconv\pic18.h
[v _eeprom_read `(uc 0 ef1`ui ]
"11 E:\workall\LAMP2\PICC18\Reconv\CtrlCharge.c
[e = _ChargeHour ( _eeprom_read (1
-> -> 2 `i `ui ]
[; ;CtrlCharge.c: 12: DischargeHour=eeprom_read(0x03);
"12
[e = _DischargeHour ( _eeprom_read (1
-> -> 3 `i `ui ]
[; ;CtrlCharge.c: 13: for(tmpCtr=0;tmpCtr<4;tmpCtr++)
"13
{
[e = _tmpCtr -> -> 0 `i `uc ]
[e $ < -> _tmpCtr `i -> 4 `i 3 ]
[e $U 4 ]
"14
[e :U 3 ]
[; ;CtrlCharge.c: 14: {
{
[; ;CtrlCharge.c: 15: CtrlCharge[tmpCtr].second=0;
"15
[e = . *U + &U _CtrlCharge * -> _tmpCtr `ux -> -> # *U &U _CtrlCharge `ui `ux 0 -> -> 0 `i `uc ]
[; ;CtrlCharge.c: 16: CtrlCharge[tmpCtr].minute=0;
"16
[e = . *U + &U _CtrlCharge * -> _tmpCtr `ux -> -> # *U &U _CtrlCharge `ui `ux 1 -> -> 0 `i `uc ]
[; ;CtrlCharge.c: 17: CtrlCharge[tmpCtr].ChargeNum=eeprom_read(0x04+4+4*tmpCtr);
"17
[e = . *U + &U _CtrlCharge * -> _tmpCtr `ux -> -> # *U &U _CtrlCharge `ui `ux 5 ( _eeprom_read (1
-> + + -> 4 `i -> 4 `i * -> 4 `i -> _tmpCtr `i `ui ]
[; ;CtrlCharge.c: 18: CtrlCharge[tmpCtr].disChargeNum=eeprom_read(0x04+4+1+4*tmpCtr);
"18
[e = . *U + &U _CtrlCharge * -> _tmpCtr `ux -> -> # *U &U _CtrlCharge `ui `ux 6 ( _eeprom_read (1
-> + + + -> 4 `i -> 4 `i -> 1 `i * -> 4 `i -> _tmpCtr `i `ui ]
[; ;CtrlCharge.c: 19: CtrlCharge[tmpCtr].FlagIsCharge=eeprom_read(0x04+4+2+4*tmpCtr);
"19
[e = . *U + &U _CtrlCharge * -> _tmpCtr `ux -> -> # *U &U _CtrlCharge `ui `ux 4 ( _eeprom_read (1
-> + + + -> 4 `i -> 4 `i -> 2 `i * -> 4 `i -> _tmpCtr `i `ui ]
[; ;CtrlCharge.c: 20: CtrlCharge[tmpCtr].hour=eeprom_read(0x04+4+3+4*tmpCtr);
"20
[e = . *U + &U _CtrlCharge * -> _tmpCtr `ux -> -> # *U &U _CtrlCharge `ui `ux 2 ( _eeprom_read (1
-> + + + -> 4 `i -> 4 `i -> 3 `i * -> 4 `i -> _tmpCtr `i `ui ]
"21
}
"13
[e ++ _tmpCtr -> -> 1 `i `uc ]
[e $ < -> _tmpCtr `i -> 4 `i 3 ]
[e :U 4 ]
"21
}
[; ;CtrlCharge.c: 21: }
[; ;CtrlCharge.c: 23: for(tmpCtr=0;tmpCtr<4;tmpCtr++)
"23
{
[e = _tmpCtr -> -> 0 `i `uc ]
[e $ < -> _tmpCtr `i -> 4 `i 6 ]
[e $U 7 ]
"24
[e :U 6 ]
[; ;CtrlCharge.c: 24: {
{
[; ;CtrlCharge.c: 25: CtrlCharge[tmpCtr].FlagIsStTest=eeprom_read(0x04+4*tmpCtr);
"25
[e = . *U + &U _CtrlCharge * -> _tmpCtr `ux -> -> # *U &U _CtrlCharge `ui `ux 3 ( _eeprom_read (1
-> + -> 4 `i * -> 4 `i -> _tmpCtr `i `ui ]
"26
}
"23
[e ++ _tmpCtr -> -> 1 `i `uc ]
[e $ < -> _tmpCtr `i -> 4 `i 6 ]
[e :U 7 ]
"26
}
[; ;CtrlCharge.c: 26: }
[; ;CtrlCharge.c: 27: TRISD=0x00;
"27
[e = _TRISD -> -> 0 `i `uc ]
"28
[; ;CtrlCharge.c: 28: }
[e :UE 2 ]
}
"38
[v _CtrlChnCharge `(i 1 ef1`uc ]
{
[; ;CtrlCharge.c: 37: CtrlChnCharge(unsigned char ChnNo)
[; ;CtrlCharge.c: 38: {
[e :U _CtrlChnCharge ]
[v _ChnNo `uc 1 r1 ]
[f ]
[; ;CtrlCharge.c: 39: if(CtrlCharge[ChnNo].FlagIsStTest==0xFF)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?