#define DN RA5 //Motor rise 2 DN
#define UP RA0 //Motor decline 13 UP
#define MOTA RC5 //Motor Forward 5
#define MOTB RC4 //Motor Reversal 6
bit rise; //正反轉(zhuǎn)標(biāo)志位
bit tmrl; //正反轉(zhuǎn)標(biāo)志位
bit tmrh; //正反轉(zhuǎn)標(biāo)志位
unsigned int num; //脈沖總個(gè)數(shù)
unsigned int cnnt; //脈沖計(jì)數(shù)
unsigned int timerl; //TMR1脈沖上升沿時(shí)間
unsigned int timerh; //TMR1脈沖下降沿時(shí)間
unsigned int cnnt_timer;//TMR1脈沖總時(shí)間
unsigned int cnnt_tmr2; //TMR2脈沖總時(shí)間
unsigned int signal_key();
unsigned int getkey() ;
void Delay_MS(unsigned int t);
void initial()
{
TRISA=0x3D;//3D;RA2=1,
TRISC=0X0E;
OPTION=0x87;//RA2內(nèi)部中斷時(shí)源