void SetupPIT(void)
{
PITCE = 0x03; //enable PIT 0 and 1
PITMUX = 0x00; //MUX to micro couter0
PITMTLD0 = 99; //8 bits micro counter0
PITLD0 =3999; //PIT0 10ms
PITLD1=799; //PIT1 2ms there will be a problem when PIT1 times PIT0,
//but no problem when PIT0 times PIT1
PITCFLMT_PFLMT= 0x01; //load micro counter0
PITFLT = 0x03; //load counter0 and 1
PITINTE = 0x03; //enable INT
PITCFLMT_PITE = 1; //enable PIT module
}