I wrote a small program that writes on serial port. I use SerialPort class (.NET Framework). When I write to serial port, immediately PortRecieved event was raised. Why program do that, when we know that serial port have input and output buffer. Write method writes to output buffer, read method reads from input buffer.
1
votes
1 Answers
0
votes
You'll need to check out the DataReceivedThreshold
property. It defines how many bytes will accumulate in the buffer before firing the DataReceived
event, and defaults to 1.
See also this Dev Center thread, which notes there may be some unexpected behavior with DataReceivedThreshold
in some cases.