📄 motor.p1
字号:
[; ;pic168xa.h: 353: volatile bit TX9 @ (unsigned)&TXSTA*8+6;
[; ;pic168xa.h: 354: volatile bit TXEN @ (unsigned)&TXSTA*8+5;
[; ;pic168xa.h: 355: volatile bit SYNC @ (unsigned)&TXSTA*8+4;
[; ;pic168xa.h: 356: volatile bit BRGH @ (unsigned)&TXSTA*8+2;
[; ;pic168xa.h: 357: volatile bit TRMT @ (unsigned)&TXSTA*8+1;
[; ;pic168xa.h: 358: volatile bit TX9D @ (unsigned)&TXSTA*8+0;
[; ;pic168xa.h: 361: volatile bit C2OUT @ (unsigned)&CMCON*8+7;
[; ;pic168xa.h: 362: volatile bit C1OUT @ (unsigned)&CMCON*8+6;
[; ;pic168xa.h: 363: volatile bit C2INV @ (unsigned)&CMCON*8+5;
[; ;pic168xa.h: 364: volatile bit C1INV @ (unsigned)&CMCON*8+4;
[; ;pic168xa.h: 365: volatile bit CIS @ (unsigned)&CMCON*8+3;
[; ;pic168xa.h: 366: volatile bit CM2 @ (unsigned)&CMCON*8+2;
[; ;pic168xa.h: 367: volatile bit CM1 @ (unsigned)&CMCON*8+1;
[; ;pic168xa.h: 368: volatile bit CM0 @ (unsigned)&CMCON*8+0;
[; ;pic168xa.h: 371: volatile bit CVREN @ (unsigned)&CVRCON*8+7;
[; ;pic168xa.h: 372: volatile bit CVROE @ (unsigned)&CVRCON*8+6;
[; ;pic168xa.h: 373: volatile bit CVRR @ (unsigned)&CVRCON*8+5;
[; ;pic168xa.h: 374: volatile bit CVR3 @ (unsigned)&CVRCON*8+3;
[; ;pic168xa.h: 375: volatile bit CVR2 @ (unsigned)&CVRCON*8+2;
[; ;pic168xa.h: 376: volatile bit CVR1 @ (unsigned)&CVRCON*8+1;
[; ;pic168xa.h: 377: volatile bit CVR0 @ (unsigned)&CVRCON*8+0;
[; ;pic168xa.h: 380: volatile bit ADFM @ (unsigned)&ADCON1*8+7;
[; ;pic168xa.h: 381: volatile bit ADCS2 @ (unsigned)&ADCON1*8+6;
[; ;pic168xa.h: 382: volatile bit PCFG3 @ (unsigned)&ADCON1*8+3;
[; ;pic168xa.h: 383: volatile bit PCFG2 @ (unsigned)&ADCON1*8+2;
[; ;pic168xa.h: 384: volatile bit PCFG1 @ (unsigned)&ADCON1*8+1;
[; ;pic168xa.h: 385: volatile bit PCFG0 @ (unsigned)&ADCON1*8+0;
[; ;pic168xa.h: 388: volatile bit EEPGD @ (unsigned)&EECON1*8+7;
[; ;pic168xa.h: 389: volatile bit WRERR @ (unsigned)&EECON1*8+3;
[; ;pic168xa.h: 390: volatile bit WREN @ (unsigned)&EECON1*8+2;
[; ;pic168xa.h: 391: volatile bit WR @ (unsigned)&EECON1*8+1;
[; ;pic168xa.h: 392: volatile bit RD @ (unsigned)&EECON1*8+0;
[; ;pic.h: 272: extern unsigned short _stringbase;
[; ;pic.h: 287: extern unsigned int flash_read(unsigned short addr);
[; ;pic.h: 317: extern void flash_copy(const unsigned char * source_addr,unsigned char length,unsigned short dest_addr);
[; ;eeprom_routines.h: 40: extern void eeprom_write(unsigned char addr, unsigned char value);
[; ;eeprom_routines.h: 41: extern unsigned char eeprom_read(unsigned char addr);
[; ;pic.h: 358: extern void _delay(unsigned long);
[; ;pic.h: 407: extern bit __timeout, __powerdown;
[; ;pic.h: 408: extern unsigned char __resetbits;
"4 F:\program\PIC-program\motor\motor1\motor.c
[v _init `(v 1 ef ]
{
[; ;motor.c: 3: void init(void)
[; ;motor.c: 4: {
[e :U _init ]
[f ]
[; ;motor.c: 5: TRISB=0;
"5
[e = _TRISB -> -> 0 `i `uc ]
[; ;motor.c: 6: PORTB=0xff;
"6
[e = _PORTB -> -> 255 `i `uc ]
[; ;motor.c: 7: }
"7
[e :UE 1 ]
}
[; ;motor.c: 9: unsigned char i,j;
[; ;motor.c: 10: unsigned int cnt,mst;
[; ;motor.c: 11: unsigned int gCnt,gCompCnt;
[i _zhenz
:U ..
"14
-> -> 1 `i `uc
-> -> 2 `i `uc
-> -> 4 `i `uc
-> -> 8 `i `uc
..
]
[; ;motor.c: 14: const unsigned char zhenz[]={0x01,0x02,0x04,0x08};
[i _fanz
:U ..
"15
-> -> 8 `i `uc
-> -> 4 `i `uc
-> -> 2 `i `uc
-> -> 1 `i `uc
..
]
[; ;motor.c: 15: const unsigned char fanz[] ={0x08,0x04,0x02,0x01};
[i _zhenz1
:U ..
"17
-> -> 5 `i `uc
-> -> 6 `i `uc
-> -> 10 `i `uc
-> -> 9 `i `uc
..
]
[; ;motor.c: 17: const unsigned char zhenz1[]={0x05,0x06,0x0a,0x09};
"20
[v _delay `(v 1 ef1`ui ]
{
[; ;motor.c: 19: void delay(unsigned int Ms)
[; ;motor.c: 20: {
[e :U _delay ]
[v _Ms `ui 1 r1 ]
[f ]
"22
[v _i `uc 1 a ]
[; ;motor.c: 22: unsigned char i;
[; ;motor.c: 24: for( ; Ms != 0; Ms-- )
"24
{
[e $ != _Ms -> -> 0 `i `ui 3 ]
[e $U 4 ]
"25
[e :U 3 ]
[; ;motor.c: 25: {
{
[; ;motor.c: 26: for(i = 1; i != 0; i-- );
"26
{
[e = _i -> -> 1 `i `uc ]
[e $ != -> _i `i -> 0 `i 6 ]
[e $U 7 ]
[e :U 6 ]
[e -- _i -> -> 1 `i `uc ]
[e $ != -> _i `i -> 0 `i 6 ]
[e :U 7 ]
}
"27
}
"24
[e -- _Ms -> -> 1 `i `ui ]
[e $ != _Ms -> -> 0 `i `ui 3 ]
[e :U 4 ]
"27
}
[; ;motor.c: 27: }
[; ;motor.c: 28: }
"28
[e :UE 2 ]
}
"31
[v _main `(v 1 ef ]
{
[; ;motor.c: 30: void main(void)
[; ;motor.c: 31: {
[e :U _main ]
[f ]
"32
[v _i `uc 1 a ]
[; ;motor.c: 32: unsigned char i;
[; ;motor.c: 33: init();
"33
[e ( _init .. ]
[; ;motor.c: 34: RBPU=1;
"34
[e = _RBPU -> -> 1 `i `b ]
[; ;motor.c: 36: TMR0=200;
"36
[e = _TMR0 -> -> 200 `i `uc ]
[; ;motor.c: 37: T0CS=0;
"37
[e = _T0CS -> -> 0 `i `b ]
[; ;motor.c: 38: PSA=0;
"38
[e = _PSA -> -> 0 `i `b ]
[; ;motor.c: 39: T0IF=0;
"39
[e = _T0IF -> -> 0 `i `b ]
[; ;motor.c: 40: PS2=1;
"40
[e = _PS2 -> -> 1 `i `b ]
[; ;motor.c: 41: PS1=0;
"41
[e = _PS1 -> -> 0 `i `b ]
[; ;motor.c: 42: PS0=1;
"42
[e = _PS0 -> -> 1 `i `b ]
[; ;motor.c: 43: T0IE=1;
"43
[e = _T0IE -> -> 1 `i `b ]
[; ;motor.c: 44: GIE=1;
"44
[e = _GIE -> -> 1 `i `b ]
[; ;motor.c: 45: while(1)
"45
[e :U 11 ]
[; ;motor.c: 46: {
"46
{
[; ;motor.c: 47: ;
"48
}
[e :U 10 ]
"45
[e $U 11 ]
[e :U 12 ]
[; ;motor.c: 48: }
[; ;motor.c: 49: }
"49
[e :UE 9 ]
}
"53
[v F535 `(v 1 tf ]
[v _time0 `IF535 1 e ]
{
[; ;motor.c: 52: void interrupt time0(void)
[; ;motor.c: 53: {
[e :U _time0 ]
[f ]
[; ;motor.c: 54: T0IF=0;
"54
[e = _T0IF -> -> 0 `i `b ]
[; ;motor.c: 55: TMR0=240;
"55
[e = _TMR0 -> -> 240 `i `uc ]
[; ;motor.c: 56: cnt++;
"56
[e ++ _cnt -> -> 1 `i `ui ]
[; ;motor.c: 68: switch(j)
"68
[e $U 15 ]
[; ;motor.c: 69: {
"69
{
[; ;motor.c: 70: case 0:PORTB=zhenz[0];
"70
[e :U 16 ]
[e = _PORTB *U + &U _zhenz * -> -> -> 0 `i `ui `ux -> -> # *U &U _zhenz `ui `ux ]
[; ;motor.c: 71: break;
"71
[e $U 14 ]
[; ;motor.c: 72: case 1:PORTB=zhenz[1];
"72
[e :U 17 ]
[e = _PORTB *U + &U _zhenz * -> -> -> 1 `i `ui `ux -> -> # *U &U _zhenz `ui `ux ]
[; ;motor.c: 73: break;
"73
[e $U 14 ]
[; ;motor.c: 74: case 2:PORTB=zhenz[2];
"74
[e :U 18 ]
[e = _PORTB *U + &U _zhenz * -> -> -> 2 `i `ui `ux -> -> # *U &U _zhenz `ui `ux ]
[; ;motor.c: 75: break;
"75
[e $U 14 ]
[; ;motor.c: 76: case 3:PORTB=zhenz[3];
"76
[e :U 19 ]
[e = _PORTB *U + &U _zhenz * -> -> -> 3 `i `ui `ux -> -> # *U &U _zhenz `ui `ux ]
[; ;motor.c: 77: break;
"77
[e $U 14 ]
"78
}
[; ;motor.c: 78: }
[e $U 14 ]
"68
[e :U 15 ]
[e [\ _j , $ -> -> 0 `i `uc 16
, $ -> -> 1 `i `uc 17
, $ -> -> 2 `i `uc 18
, $ -> -> 3 `i `uc 19
14 ]
"78
[e :U 14 ]
[; ;motor.c: 79: j++;
"79
[e ++ _j -> -> 1 `i `uc ]
[; ;motor.c: 80: if(j==4)j=0;
"80
[e $ ! == -> _j `i -> 4 `i 20 ]
[e = _j -> -> 0 `i `uc ]
[e :U 20 ]
[; ;motor.c: 81: }
"81
[e :UE 13 ]
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -