I need to receive data from pc to Pos using serial port RS 232 . I am receiving data but garbage values and overlapping is occuring.
// data received //
/// 0 is comport, 1000=time in ms//
//********Explain me from here****////
// comparing the data//
// now i need to validate the data and again i should send////
thanks in advance
// data received //
Code:
ret=(PortRecvs(0,buff,sizeof(buff)-1,1000)<0);
//********Explain me from here****////
// comparing the data//
Code:
if(ret<0)
{
ScrCls();
Lcdprintf("Receive Fail..");
DelayMs(500);
}
else
{
ScrCls();
Lcdprintf("Receive Buff:\n%s\n",buff);//j=12
DelayMs(1000);
}
break;
}
// now i need to validate the data and again i should send////
thanks in advance
Comment