I'm try reading data from COM port. i used PL2303TA Convertor that increases data transfer speed. my data transfer speed is 3Mpbs and I'm looking for sample to read data at this Speed. i wrote a program by C# and use "while" loop to read receiving data. but some data has been lost.
int _max = 50000; // max sample
SerialPort port = new SerialPort("COM4",
3000000, Parity.None, 8, StopBits.One);
port.Open();
List<string> slist = new List<string>();
while(true)
{
string sdata = port.ReadLine();
slist.Add(sdata);
if (slist.Count > _max)
break;
}
my device sending data sequence like this:
1,2,3,...,7000,1,2,3...,7000,1,2,3
and by this code i receive data like this:
1,3,5,...,6999,1,3,5,...,6999,1,3,5
(my device is "ARM Micro-controller AT91SAM7S64-AU" and send each number by newline Character: "\n" )
how can i improve reading speed?
thanks.
PL2303TA USB to Serial Bridge Controller http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=153&pcid=41