void main(void)
{
InitSysCtrl(); // In this function watchdog is disabled
DINT; //Disable interrupts,this has been done in the "InitPieCtrl();"function
InitPieCtrl(); //Initial PIE,in this function,interrupts are disabled,Clear all PIEIER registers,Clear all PIEIFR registers
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable(); //Initialize the PIEvectable,let the interrupts point to their own ISR