void Timer2Init() { OpenTimer2(T2_ON | T2_IDLE_CON | T2_SOURCE_INT | T2_PS_1_16 | T2_GATE_OFF, 625); // freq = 10M/16/625 = 1KHz mT2SetIntPriority(1); INTEnableSystemSingleVectoredInt(); mT2IntEnable(1); }
void init_interrup2(void){ // init interrupts mT2SetIntPriority( 1); INTEnableSystemSingleVectoredInt(); mT2IntEnable( 1); }