i have done all the work successfully only when i start receiving the raw image data over serial port the Arduino should receive 19200 Bytes but around the 11000 byte the Arduino keeps receiving 0xFF and only 0xFF up for the rest of the loop
You have to wait for Serial1.available(). If you do a read when data is unavailable you get -1 and if you store that in an unsigned char you get 0xFF.
for (a=0;a<4096;a++)
{
for(int c=0;c<16;c++)
{
while (!Serial1.available()) ; // Wait until a character is available
rawimageresponse = Serial1.read(),HEX;
Serial.print(rawimageresponse, HEX);
}
Serial.println();
}
Is Serial running at a much faster rate than Serial1? If not you could be falling behind and running out of buffer space.
Serial.print(rawimageresponse, HEX); displays a byte as two characters. In order not to fall behind the Serial output will have to run at least twice as fast a Serial1 input.