void __attribute__ ((interrupt,no_auto_psv)) _U1RXInterrupt (void)
{
static unsigned char count1=0;
unsigned char data;
data=U1RXREG;
CalData[count1]=data;
count1++;
if((CalData[0]=='<')||(CalData[1]=='<')) //&&(CalData[114]=='>')&&(CalData[115]=='>'))//we have received right packet now set the flag
{
// CalData[count1++]=data;
if(((CalData[114]=='>')&&(CalData[115]=='>'))&&(count1>=116))
{
Rxr_Flag=1;
count1=0;
}//Received complete packet
// else
// {
// count1=0;
// } //There is something wrong with at the end of the packet
}
else
{
count1=0; //There is some missmatch with thwe data.
}
IFS0bits.U1RXIF=0;
}