Use the Binary Writer Instead of Stream Writer.., Because SerialPort can read Binary Data Also..,
Here is the code for write Binary file using the byte array
byte[] temp = new byte[100];
FileStream fs = new FileStream("c:\\temp.txt", FileMode.Create);
BinaryWriter Bw = new BinaryWriter(fs);
Bw.Write(temp);
Bw.Close();
fs.Close ();