Topic: Com Port Receive Buffer
Hello,
I have been using the COM port to receive data and it has been fine when receiving about 12 bytes of data, which is all I have required till now.
My new project consists of a microcontroller which is collecting telemetry, forming a text string about 50 bytes long, and that goes into the PC COM port. I started out using the standard COM port example from Dmitry as it receives COM port data and adds each newly received line into a Memo field. I did this to see how the data looks and to use it as a starting place.
Now when it receives 50 bytes of incoming data, it adds a line to the Memo field but it is only the first 31 bytes of the received data and then it adds the remaining 19 or so bytes in the following line. The entire string consists of 8 sections which are all comma delimited and when I use the SplitString function, it only splits up the data which appears in the second line of the newly added data in the memo field.
I know it is difficult to describe as I have hardware involved as well but I hope it makes some kind of sense.
Dmitry, is there some limit to the receive buffer size which could be causing this problem? Also is it possible to add a function that can report how many bytes of data are in the receive buffer? Some software allows being able to set the size of the receive buffer and that would be good too.
Thanks,
David