📄 mtouch1.p1
字号:
Version 3.2 HI-TECH Software Intermediate Code
"17 F:\mtouch1\mtouch1.h
[v _Current_Frq `uc 1 e ]
[; ;mtouch1.h: 17: unsigned char Current_Frq;
"18
[v _Avr_Index `uc 1 e ]
[; ;mtouch1.h: 18: unsigned char Avr_Index;
"19
[v _Freq_Avr_Value `uc 1 e ]
[; ;mtouch1.h: 19: unsigned char Freq_Avr_Value;
"20
[v _Avr_Value `ui 1 e ]
[; ;mtouch1.h: 20: unsigned int Avr_Value;
"21
[v _Trip_Point `uc 1 e ]
[; ;mtouch1.h: 21: unsigned char Trip_Point;
"22
[v _Avr_Cnt `uc 1 e ]
[; ;mtouch1.h: 22: unsigned char Avr_Cnt;
"23
[v _Push_Flag `uc 1 e ]
[; ;mtouch1.h: 23: char Push_Flag;
"15 C:\Program Files\HI-TECH Software\PICC\PRO\9.60\include\pic10f20x.h
[v _RTCC `Vuc 1 e@1 ]
[; ;pic10f20x.h: 15: volatile unsigned char RTCC @ 0x01;
"16
[v _TMR0 `Vuc 1 e@1 ]
[; ;pic10f20x.h: 16: volatile unsigned char TMR0 @ 0x01;
"17
[v _PCL `Vuc 1 e@2 ]
[; ;pic10f20x.h: 17: volatile unsigned char PCL @ 0x02;
"18
[v _STATUS `Vuc 1 e@3 ]
[; ;pic10f20x.h: 18: volatile unsigned char STATUS @ 0x03;
"19
[v _FSR `uc 1 e@4 ]
[; ;pic10f20x.h: 19: unsigned char FSR @ 0x04;
"20
[v _OSCCAL `Vuc 1 e@5 ]
[; ;pic10f20x.h: 20: volatile unsigned char OSCCAL @ 0x05;
"21
[v _GPIO `Vuc 1 e@6 ]
[; ;pic10f20x.h: 21: volatile unsigned char GPIO @ 0x06;
"23
[v _CMCON `Vuc 1 e@7 ]
[; ;pic10f20x.h: 23: volatile unsigned char CMCON @ 0x07;
"25
[v _CMCON0 `Vuc 1 e@7 ]
[; ;pic10f20x.h: 25: volatile unsigned char CMCON0 @ 0x07;
"28
[v _OPTION `Wuc 1 e@0 ]
[; ;pic10f20x.h: 28: unsigned char control OPTION @ 0x00;
"29
[v _TRISGPIO `VWuc 1 e@6 ]
[; ;pic10f20x.h: 29: volatile unsigned char control TRISGPIO @ 0x06;
"31
[v _TRIS `VWuc 1 e@6 ]
[; ;pic10f20x.h: 31: volatile unsigned char control TRIS @ 0x06;
"34
[v _GPWUF `Vb 1 e@31 ]
[; ;pic10f20x.h: 34: volatile bit GPWUF @ (unsigned)&STATUS*8+7;
"36
[v _CWUF `Vb 1 e@30 ]
[; ;pic10f20x.h: 36: volatile bit CWUF @ (unsigned)&STATUS*8+6;
"38
[v _TO `Vb 1 e@28 ]
[; ;pic10f20x.h: 38: volatile bit TO @ (unsigned)&STATUS*8+4;
"39
[v _PD `Vb 1 e@27 ]
[; ;pic10f20x.h: 39: volatile bit PD @ (unsigned)&STATUS*8+3;
"40
[v _ZERO `Vb 1 e@26 ]
[; ;pic10f20x.h: 40: volatile bit ZERO @ (unsigned)&STATUS*8+2;
"41
[v _DC `Vb 1 e@25 ]
[; ;pic10f20x.h: 41: volatile bit DC @ (unsigned)&STATUS*8+1;
"42
[v _CARRY `Vb 1 e@24 ]
[; ;pic10f20x.h: 42: volatile bit CARRY @ (unsigned)&STATUS*8+0;
"45
[v _CWU `b 1 e@56 ]
[; ;pic10f20x.h: 45: bit CWU @ (unsigned)&CMCON*8+0;
"46
[v _CPREF `b 1 e@57 ]
[; ;pic10f20x.h: 46: bit CPREF @ (unsigned)&CMCON*8+1;
"47
[v _CNREF `b 1 e@58 ]
[; ;pic10f20x.h: 47: bit CNREF @ (unsigned)&CMCON*8+2;
"48
[v _CMPON `b 1 e@59 ]
[; ;pic10f20x.h: 48: bit CMPON @ (unsigned)&CMCON*8+3;
"49
[v _CMPT0CS `b 1 e@60 ]
[; ;pic10f20x.h: 49: bit CMPT0CS @ (unsigned)&CMCON*8+4;
"50
[v _POL `b 1 e@61 ]
[; ;pic10f20x.h: 50: bit POL @ (unsigned)&CMCON*8+5;
"51
[v _COUTEN `b 1 e@62 ]
[; ;pic10f20x.h: 51: bit COUTEN @ (unsigned)&CMCON*8+6;
"52
[v _CMPOUT `Vb 1 e@63 ]
[; ;pic10f20x.h: 52: volatile bit CMPOUT @ (unsigned)&CMCON*8+7;
"66
[v _CAL6 `Vb 1 e@47 ]
[; ;pic10f20x.h: 66: volatile bit CAL6 @ (unsigned)&OSCCAL*8+7;
"67
[v _CAL5 `Vb 1 e@46 ]
[; ;pic10f20x.h: 67: volatile bit CAL5 @ (unsigned)&OSCCAL*8+6;
"68
[v _CAL4 `Vb 1 e@45 ]
[; ;pic10f20x.h: 68: volatile bit CAL4 @ (unsigned)&OSCCAL*8+5;
"69
[v _CAL3 `Vb 1 e@44 ]
[; ;pic10f20x.h: 69: volatile bit CAL3 @ (unsigned)&OSCCAL*8+4;
"70
[v _CAL2 `Vb 1 e@43 ]
[; ;pic10f20x.h: 70: volatile bit CAL2 @ (unsigned)&OSCCAL*8+3;
"71
[v _CAL1 `Vb 1 e@42 ]
[; ;pic10f20x.h: 71: volatile bit CAL1 @ (unsigned)&OSCCAL*8+2;
"72
[v _CAL0 `Vb 1 e@41 ]
[; ;pic10f20x.h: 72: volatile bit CAL0 @ (unsigned)&OSCCAL*8+1;
"73
[v _FOSC4 `Vb 1 e@40 ]
[; ;pic10f20x.h: 73: volatile bit FOSC4 @ (unsigned)&OSCCAL*8+0;
"76
[v _GP3 `Vb 1 e@51 ]
[; ;pic10f20x.h: 76: volatile bit GP3 @ (unsigned)&GPIO*8+3;
"77
[v _GP2 `Vb 1 e@50 ]
[; ;pic10f20x.h: 77: volatile bit GP2 @ (unsigned)&GPIO*8+2;
"78
[v _GP1 `Vb 1 e@49 ]
[; ;pic10f20x.h: 78: volatile bit GP1 @ (unsigned)&GPIO*8+1;
"79
[v _GP0 `Vb 1 e@48 ]
[; ;pic10f20x.h: 79: volatile bit GP0 @ (unsigned)&GPIO*8+0;
[; ;pic.h: 354: extern void _delay(unsigned long);
"11 F:\mtouch1\mtouch1.c
[; ;mtouch1.c: 11: asm("\tpsect config,class=CONFIG,delta=2"); asm("\tdw ""0xFEF&0xFFB&0xFFF");
[; psect config,class=CONFIG,delta=2 ;#
[; dw 0xFEF&0xFFB&0xFFF ;#
"15
[v _Abit_Delay `(v 1 ef1`ui ]
{
[; ;mtouch1.c: 14: void Abit_Delay(unsigned int delay )
[; ;mtouch1.c: 15: {
[e :U _Abit_Delay ]
[v _delay `ui 1 r1 ]
[f ]
[; ;mtouch1.c: 16: while(--delay) asm("nop");
"16
[e $U 2 ]
[e :U 3 ]
[; nop ;#
[e :U 2 ]
[e $ != =- _delay -> -> 1 `i `ui -> -> 0 `i `ui 3 ]
[e :U 4 ]
"17
[; ;mtouch1.c: 17: }
[e :UE 1 ]
}
"19
[v _Abit_Avreage_Value `(v 1 ef ]
{
[; ;mtouch1.c: 18: void Abit_Avreage_Value(void)
[; ;mtouch1.c: 19: {
[e :U _Abit_Avreage_Value ]
[f ]
[; ;mtouch1.c: 20: OPTION=11110110;
"20
[e = _OPTION -> -> 11110110 `l `uc ]
[; ;mtouch1.c: 21: CMCON0=0B00001011;
"21
[e = _CMCON0 -> -> 11 `i `uc ]
[; ;mtouch1.c: 22: for (Avr_Index=0;Avr_Index<4;Avr_Index++)
"22
[e = _Avr_Index -> -> 0 `i `uc ]
[e $ < -> _Avr_Index `i -> 4 `i 6 ]
[e $U 7 ]
"23
[e :U 6 ]
[; ;mtouch1.c: 23: {
[; ;mtouch1.c: 24: TMR0=0;
"24
[e = _TMR0 -> -> 0 `i `uc ]
[; ;mtouch1.c: 25: CMPON=1;
"25
[e = _CMPON -> -> 1 `i `b ]
[; ;mtouch1.c: 26: Abit_Delay(2500);
"26
[e ( _Abit_Delay (1
-> -> 2500 `i `ui ]
[; ;mtouch1.c: 27: CMPON=0;
"27
[e = _CMPON -> -> 0 `i `b ]
[; ;mtouch1.c: 28: Current_Frq=TMR0;
"28
[e = _Current_Frq _TMR0 ]
[; ;mtouch1.c: 29: Avr_Value+=Current_Frq;
"29
[e =+ _Avr_Value -> _Current_Frq `ui ]
"22
[e ++ _Avr_Index -> -> 1 `i `uc ]
[e $ < -> _Avr_Index `i -> 4 `i 6 ]
[e :U 7 ]
[; ;mtouch1.c: 30: }
[; ;mtouch1.c: 31: Freq_Avr_Value=Avr_Value>>2;
"31
[e = _Freq_Avr_Value -> >> _Avr_Value -> 2 `i `uc ]
[; ;mtouch1.c: 32: Avr_Value=Avr_Index=0;
"32
[e = _Avr_Value -> = _Avr_Index -> -> 0 `i `uc `ui ]
[; ;mtouch1.c: 33: Trip_Point=(10*100)/Freq_Avr_Value;
"33
[e = _Trip_Point -> / * -> 10 `i -> 100 `i -> _Freq_Avr_Value `i `uc ]
"34
[; ;mtouch1.c: 34: }
[e :UE 5 ]
}
"36
[v _Abit_Avreage_Value_Loop `(v 1 ef ]
{
[; ;mtouch1.c: 35: void Abit_Avreage_Value_Loop(void)
[; ;mtouch1.c: 36: {
[e :U _Abit_Avreage_Value_Loop ]
[f ]
[; ;mtouch1.c: 37: OPTION=11110110;
"37
[e = _OPTION -> -> 11110110 `l `uc ]
[; ;mtouch1.c: 38: CMCON0=0B00001011;
"38
[e = _CMCON0 -> -> 11 `i `uc ]
[; ;mtouch1.c: 39: TMR0=0;
"39
[e = _TMR0 -> -> 0 `i `uc ]
[; ;mtouch1.c: 40: CMPON=1;
"40
[e = _CMPON -> -> 1 `i `b ]
[; ;mtouch1.c: 41: Abit_Delay(5000);
"41
[e ( _Abit_Delay (1
-> -> 5000 `i `ui ]
[; ;mtouch1.c: 42: CMPON=0;
"42
[e = _CMPON -> -> 0 `i `b ]
[; ;mtouch1.c: 43: Freq_Avr_Value=TMR0;
"43
[e = _Freq_Avr_Value _TMR0 ]
[; ;mtouch1.c: 44: Trip_Point=(10*100)/Freq_Avr_Value;
"44
[e = _Trip_Point -> / * -> 10 `i -> 100 `i -> _Freq_Avr_Value `i `uc ]
"45
[; ;mtouch1.c: 45: }
[e :UE 9 ]
}
"47
[v _Abit_Get_Frequency `(v 1 ef ]
{
[; ;mtouch1.c: 46: void Abit_Get_Frequency(void)
[; ;mtouch1.c: 47: {
[e :U _Abit_Get_Frequency ]
[f ]
[; ;mtouch1.c: 48: OPTION=11110110;
"48
[e = _OPTION -> -> 11110110 `l `uc ]
[; ;mtouch1.c: 49: CMCON0=0B00001011;
"49
[e = _CMCON0 -> -> 11 `i `uc ]
[; ;mtouch1.c: 50: TMR0=0;
"50
[e = _TMR0 -> -> 0 `i `uc ]
[; ;mtouch1.c: 51: CMPON=1;
"51
[e = _CMPON -> -> 1 `i `b ]
[; ;mtouch1.c: 52: Abit_Delay(2500);
"52
[e ( _Abit_Delay (1
-> -> 2500 `i `ui ]
[; ;mtouch1.c: 53: CMPON=0;
"53
[e = _CMPON -> -> 0 `i `b ]
[; ;mtouch1.c: 54: Current_Frq=TMR0;
"54
[e = _Current_Frq _TMR0 ]
[; ;mtouch1.c: 55: TMR0=0;
"55
[e = _TMR0 -> -> 0 `i `uc ]
[; ;mtouch1.c: 56: OPTION=0B11010111;
"56
[e = _OPTION -> -> 215 `i `uc ]
"57
[; ;mtouch1.c: 57: }
[e :UE 10 ]
}
"59
[v _main `(v 1 e ]
[p mainexit ]
{
[; ;mtouch1.c: 58: void main(void)
[; ;mtouch1.c: 59: {
[e :U _main ]
[f ]
[; ;mtouch1.c: 60: FOSC4=0;
"60
[e = _FOSC4 -> -> 0 `i `b ]
[; ;mtouch1.c: 61: Abit_Delay(50000);
"61
[e ( _Abit_Delay (1
-> -> 50000 `l `ui ]
[; ;mtouch1.c: 62: TRIS=0B00001001;
"62
[e = _TRIS -> -> 9 `i `uc ]
[; ;mtouch1.c: 63: Abit_Avreage_Value();
"63
[e ( _Abit_Avreage_Value .. ]
[; ;mtouch1.c: 64: Push_Flag=0;
"64
[e = _Push_Flag -> -> 0 `i `uc ]
[; ;mtouch1.c: 65: while(1)
"65
[e :U 13 ]
[; ;mtouch1.c: 66: {
[; ;mtouch1.c: 67: Abit_Get_Frequency();
"67
[e ( _Abit_Get_Frequency .. ]
[; ;mtouch1.c: 68: TMR0=0;
"68
[e = _TMR0 -> -> 0 `i `uc ]
[; ;mtouch1.c: 69: if(Current_Frq<(Freq_Avr_Value-Trip_Point))
"69
[e $ ! < -> _Current_Frq `i - -> _Freq_Avr_Value `i -> _Trip_Point `i 15 ]
[; ;mtouch1.c: 70: {
[; ;mtouch1.c: 71: Avr_Cnt=0;
"71
[e = _Avr_Cnt -> -> 0 `i `uc ]
[; ;mtouch1.c: 72: GP0=0;
"72
[e = _GP0 -> -> 0 `i `b ]
"74
[; ;mtouch1.c: 74: }
[e $U 16 ]
"75
[e :U 15 ]
[; ;mtouch1.c: 75: else
[; ;mtouch1.c: 76: {
[; ;mtouch1.c: 77: GP0=1;
"77
[e = _GP0 -> -> 1 `i `b ]
[; ;mtouch1.c: 79: if(Avr_Cnt++>59)
"79
[e $ ! > -> ++ _Avr_Cnt -> -> 1 `i `uc `i -> 59 `i 17 ]
[; ;mtouch1.c: 80: {
[; ;mtouch1.c: 81: Avr_Cnt =0;
"81
[e = _Avr_Cnt -> -> 0 `i `uc ]
[; ;mtouch1.c: 82: Abit_Avreage_Value_Loop();
"82
[e ( _Abit_Avreage_Value_Loop .. ]
"83
[e :U 17 ]
"84
[e :U 16 ]
[; ;mtouch1.c: 83: }
[; ;mtouch1.c: 84: }
[; ;mtouch1.c: 85: Current_Frq=0;
"85
[e = _Current_Frq -> -> 0 `i `uc ]
"86
[e :U 12 ]
"65
[e $U 13 ]
[e :U 14 ]
"87
[; ;mtouch1.c: 86: }
[; ;mtouch1.c: 87: }
[e :UE 11 ]
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -