void PIT_Init(void)//定时中断初始化函数 0.01s=10ms定时中断设置
{
PITCFLMT_PITE=0;
PITCE_PCE0=1;
PITMTLD0=240-1;
PITLD0=2000-1;
PITINTE_PINTE0=1;
PITCFLMT_PITE=1;
}
/*void PWM_Init(void)
{
//CH01 Motor In1
//CH23 Motor In2
//SB,B for ch2367
//SA,A for ch0145
PWME = 0x00;
PWMCTL = 0x00;
PWMCAE = 0x00;
PWMPOL = 0xFF;
PWMPRCLK = 0x33; //8分频 A,B为6MHZ
PWMSCLA = 0x03; //6分频,SA为1MHZ
PWMSCLB = 0x03;
PWMCLK = 0xFF;
PWMPER1=1000;
PWMDTY1=0;
PWMPER3=1000;
PWMDTY3=0;
PWMCNT1 = 0;
PWMCNT3 = 0;
PWME = 0x2A;}*/
static void PWM_Init(void)
{