I tried to make communicate an UNO board and a program wrote with Lazarus 1.8.4 using serial line.
I use TLazSerial on PC side and .
Problem : Most of the time, when UNO board send (for example) "8110010000", using Serial.print("8110010000"), the same string is received in the RxData event but sometimes the string is split into 2 part and the two parts are transmit.
Example : Printing the received string in a memo I see :
The characters in the string are sent one at a time. It is the receiving application that is making invalid assumptions about that constitutes a complete packet. Fix the receiving code.
Have a look at the 3rd example in Serial Input Basics and note how the start- and end-markers are used to inform the Arduino that it has the complete message.The same technique can be used in your PC program.
Your Arduino can send data in a compatible format with code like this