void _ISR _T1Interrupt( void)
{
	/*	volatile unsigned long sampling_rate;	
		volatile unsigned long sampling_count;			
	*/

	sampling_rate = ((sampling_count*5)/2);

	_T1IE  = 0;	//Disable the interrupt, measurement is done
	_T1IF  = 0;	//clear interrupt flag
}



------------------


//configure Timer1 module
	TMR1 = 0;
	sampling_count = 0;		//number of samples counted in 0.4 s
	sampling_rate  = 0;
	PR1 = TMR1_PERIOD-1;
	T1CON = 0b1000000000110000;	//1:256 Prescale
	
// init Timer1 Interrupts, clear the flag

	_T1IF  = 0; _T1IE  = 1;