📄 adconvt.p1
字号:
[; ;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;
[; ;delay1ms.h: 10: void delay(unsigned int TimeMs);
"13 E:\workall\LAMP2\PICC18\Reconv\ADConvt.h
[v _TableADCON0 `Cuc -> 4 `i e ]
[i _TableADCON0
:U ..
-> -> 129 `i `uc
-> -> 133 `i `uc
-> -> 145 `i `uc
-> -> 149 `i `uc
..
][; ;ADConvt.h: 13: const unsigned char TableADCON0[4]={0x81,0x85,0x91,0x95};
"22
[s S1 `ui -> 4 `i `ui -> 4 `i `ui -> 4 `i `uc -> 4 `i `uc 1 ]
[n S1 strucAD ADBuf ADResult ADMin isStartADSap ADNum ]
[v _ADChnRe `S1 1 e ]
[; ;ADConvt.h: 15: struct strucAD
[; ;ADConvt.h: 16: {
[; ;ADConvt.h: 17: unsigned int ADBuf[4];
[; ;ADConvt.h: 18: unsigned int ADResult[4];
[; ;ADConvt.h: 19: unsigned int ADMin[4];
[; ;ADConvt.h: 20: unsigned char isStartADSap[4];
[; ;ADConvt.h: 21: unsigned char ADNum;
[; ;ADConvt.h: 22: } ADChnRe;
[; ;ADConvt.h: 24: void AD_initial(void);
[; ;ADConvt.h: 25: unsigned int ADConvt(unsigned char ADChn);
[; ;ADConvt.h: 26: void MainAdConv(void);
"8 E:\workall\LAMP2\PICC18\Reconv\ADConvt.c
[v _AD_initial `(v 1 ef ]
{
[; ;ADConvt.c: 7: void AD_initial(void)
[; ;ADConvt.c: 8: {
[e :U _AD_initial ]
[f ]
"9
[v _tmpADChn `uc 1 a ]
[; ;ADConvt.c: 9: unsigned char tmpADChn;
[; ;ADConvt.c: 10: ADCON0=0x81;
"10
[e = _ADCON0 -> -> 129 `i `uc ]
[; ;ADConvt.c: 11: ADCON1=0x83;
"11
[e = _ADCON1 -> -> 131 `i `uc ]
[; ;ADConvt.c: 12: ADIF=0;
"12
[e = _ADIF -> -> 0 `i `b ]
[; ;ADConvt.c: 13: ADIE=0;
"13
[e = _ADIE -> -> 0 `i `b ]
[; ;ADConvt.c: 14: TRISA0=1;
"14
[e = _TRISA0 -> -> 1 `i `b ]
[; ;ADConvt.c: 15: TRISA1=1;
"15
[e = _TRISA1 -> -> 1 `i `b ]
[; ;ADConvt.c: 16: TRISA2=1;
"16
[e = _TRISA2 -> -> 1 `i `b ]
[; ;ADConvt.c: 17: TRISA5=1;
"17
[e = _TRISA5 -> -> 1 `i `b ]
[; ;ADConvt.c: 18: ADChnRe.ADNum=0;
"18
[e = . _ADChnRe 4 -> -> 0 `i `uc ]
[; ;ADConvt.c: 19: for(tmpADChn=0;tmpADChn<4;tmpADChn++)
"19
{
[e = _tmpADChn -> -> 0 `i `uc ]
[e $ < -> _tmpADChn `i -> 4 `i 3 ]
[e $U 4 ]
"20
[e :U 3 ]
[; ;ADConvt.c: 20: {
{
[; ;ADConvt.c: 21: ADChnRe.ADBuf[tmpADChn]=0;
"21
[e = *U + &U . _ADChnRe 0 * -> _tmpADChn `ux -> -> # *U &U . _ADChnRe 0 `ui `ux -> -> 0 `i `ui ]
[; ;ADConvt.c: 22: ADChnRe.ADResult[tmpADChn]=0;
"22
[e = *U + &U . _ADChnRe 1 * -> _tmpADChn `ux -> -> # *U &U . _ADChnRe 1 `ui `ux -> -> 0 `i `ui ]
[; ;ADConvt.c: 23: ADChnRe.ADMin[tmpADChn]=1023;
"23
[e = *U + &U . _ADChnRe 2 * -> _tmpADChn `ux -> -> # *U &U . _ADChnRe 2 `ui `ux -> -> 1023 `i `ui ]
[; ;ADConvt.c: 24: ADChnRe.isStartADSap[tmpADChn]=0x00;
"24
[e = *U + &U . _ADChnRe 3 * -> _tmpADChn `ux -> -> # *U &U . _ADChnRe 3 `ui `ux -> -> 0 `i `uc ]
"25
}
"19
[e ++ _tmpADChn -> -> 1 `i `uc ]
[e $ < -> _tmpADChn `i -> 4 `i 3 ]
[e :U 4 ]
"25
}
"26
[; ;ADConvt.c: 25: }
[; ;ADConvt.c: 26: }
[e :UE 2 ]
}
"33
[v _ADConvt `(ui 1 ef1`uc ]
{
[; ;ADConvt.c: 32: unsigned int ADConvt(unsigned char ADChn)
[; ;ADConvt.c: 33: {
[e :U _ADConvt ]
[v _ADChn `uc 1 r1 ]
[f ]
"34
[v _ADConvResult `ui 1 a ]
"35
[v _ADWaitPluse `ui 1 a ]
[; ;ADConvt.c: 34: unsigned int ADConvResult;
[; ;ADConvt.c: 35: unsigned int ADWaitPluse;
[; ;ADConvt.c: 36: ADCON0=TableADCON0[ADChn];
"36
[e = _ADCON0 *U + &U _TableADCON0 * -> _ADChn `ux -> -> # *U &U _TableADCON0 `ui `ux ]
[; ;ADConvt.c: 37: delay(1);
"10 E:\workall\LAMP2\PICC18\Reconv\delay1ms.h
[v _delay `(v 0 ef1`ui ]
"37 E:\workall\LAMP2\PICC18\Reconv\ADConvt.c
[e ( _delay (1
-> -> 1 `i `ui ]
[; ;ADConvt.c: 38: GODONE=1;
"38
[e = _GODONE -> -> 1 `i `b ]
[; ;ADConvt.c: 39: ADWaitPluse=0;
"39
[e = _ADWaitPluse -> -> 0 `i `ui ]
[; ;ADConvt.c: 40: while(GODONE==0)
"40
[e $U 7 ]
[e :U 8 ]
[; ;ADConvt.c: 41: {
"41
{
[; ;ADConvt.c: 42: ADWaitPluse++;
"42
[e ++ _ADWaitPluse -> -> 1 `i `ui ]
[; ;ADConvt.c: 43: if(ADWaitPluse>=16000000/4000)
"43
[e $ ! >= -> _ADWaitPluse `l / -> 16000000 `l -> -> 4000 `i `l 10 ]
[; ;ADConvt.c: 44: {
"44
{
[; ;ADConvt.c: 45: return 0;
"45
[e ) -> -> 0 `i `ui ]
[e $UE 6 ]
"46
}
[e :U 10 ]
[; ;ADConvt.c: 46: };
"47
}
[e :U 7 ]
"40
[e $ == -> _GODONE `i -> 0 `i 8 ]
[e :U 9 ]
[; ;ADConvt.c: 47: }
[; ;ADConvt.c: 48: ADIF=0;
"48
[e = _ADIF -> -> 0 `i `b ]
[; ;ADConvt.c: 49: ADConvResult=ADRESL+(ADRESH<<8);
"49
[e = _ADConvResult -> + -> _ADRESL `i << -> _ADRESH `i -> 8 `i `ui ]
[; ;ADConvt.c: 50: return(ADConvResult);
"50
[e ) _ADConvResult ]
[e $UE 6 ]
"51
[; ;ADConvt.c: 51: }
[e :UE 6 ]
}
"60
[v _MainAdConv `(v 1 ef ]
{
[; ;ADConvt.c: 59: void MainAdConv(void)
[; ;ADConvt.c: 60: {
[e :U _MainAdConv ]
[f ]
"61
[v _NowADChn `uc 1 a ]
[; ;ADConvt.c: 61: unsigned char NowADChn;
[; ;ADConvt.c: 63: for(NowADChn=0;NowADChn<4;NowADChn++)
"63
{
[e = _NowADChn -> -> 0 `i `uc ]
[e $ < -> _NowADChn `i -> 4 `i 12 ]
[e $U 13 ]
"64
[e :U 12 ]
[; ;ADConvt.c: 64: {
{
[; ;ADConvt.c: 65: ADChnRe.ADBuf[NowADChn]+=ADConvt(NowADChn);
"65
[e =+ *U + &U . _ADChnRe 0 * -> _NowADChn `ux -> -> # *U &U . _ADChnRe 0 `ui `ux ( _ADConvt (1
_NowADChn ]
"66
}
"63
[e ++ _NowADChn -> -> 1 `i `uc ]
[e $ < -> _NowADChn `i -> 4 `i 12 ]
[e :U 13 ]
"66
}
[; ;ADConvt.c: 66: }
[; ;ADConvt.c: 67: ADChnRe.ADNum++;
"67
[e ++ . _ADChnRe 4 -> -> 1 `i `uc ]
[; ;ADConvt.c: 68: if(ADChnRe.ADNum==8)
"68
[e $ ! == -> . _ADChnRe 4 `i -> 8 `i 15 ]
[; ;ADConvt.c: 69: {
"69
{
[; ;ADConvt.c: 70: for(NowADChn=0;NowADChn<4;NowADChn++)
"70
{
[e = _NowADChn -> -> 0 `i `uc ]
[e $ < -> _NowADChn `i -> 4 `i 16 ]
[e $U 17 ]
"71
[e :U 16 ]
[; ;ADConvt.c: 71: {
{
[; ;ADConvt.c: 72: ADChnRe.ADResult[NowADChn]=ADChnRe.ADBuf[NowADChn]/8;
"72
[e = *U + &U . _ADChnRe 1 * -> _NowADChn `ux -> -> # *U &U . _ADChnRe 1 `ui `ux / *U + &U . _ADChnRe 0 * -> _NowADChn `ux -> -> # *U &U . _ADChnRe 0 `ui `ux -> -> 8 `i `ui ]
[; ;ADConvt.c: 73: ADChnRe.ADBuf[NowADChn]=0;
"73
[e = *U + &U . _ADChnRe 0 * -> _NowADChn `ux -> -> # *U &U . _ADChnRe 0 `ui `ux -> -> 0 `i `ui ]
[; ;ADConvt.c: 74: if((ADChnRe.ADResult[NowADChn]< ADChnRe.ADMin[NowADChn])&(ADChnRe.isStartADSap[NowADChn]==0xFF))
"74
[e $ ! & < *U + &U . _ADChnRe 1 * -> _NowADChn `ux -> -> # *U &U . _ADChnRe 1 `ui `ux *U + &U . _ADChnRe 2 * -> _NowADChn `ux -> -> # *U &U . _ADChnRe 2 `ui `ux == -> *U + &U . _ADChnRe 3 * -> _NowADChn `ux -> -> # *U &U . _ADChnRe 3 `ui `ux `i -> 255 `i 19 ]
[; ;ADConvt.c: 75: {
"75
{
[; ;ADConvt.c: 76: ADChnRe.ADMin[NowADChn]=ADChnRe.ADResult[NowADChn];
"76
[e = *U + &U . _ADChnRe 2 * -> _NowADChn `ux -> -> # *U &U . _ADChnRe 2 `ui `ux *U + &U . _ADChnRe 1 * -> _NowADChn `ux -> -> # *U &U . _ADChnRe 1 `ui `ux ]
"77
}
[e :U 19 ]
"78
}
"70
[e ++ _NowADChn -> -> 1 `i `uc ]
[e $ < -> _NowADChn `i -> 4 `i 16 ]
[e :U 17 ]
"78
}
"79
}
[e :U 15 ]
"80
[; ;ADConvt.c: 77: }
[; ;ADConvt.c: 78: }
[; ;ADConvt.c: 79: }
[; ;ADConvt.c: 80: }
[e :UE 11 ]
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -