Hi.
I am trying to develop an application as part of an assignment.
The assignment requires that we use the serial compatibility mode (and
we have a stripped down serial link with no hardware handshaking).
The problem I have is quite straight forward.
One computer builds a string (a packet) and sends it byte by byte over
the serial line.
The other computer sits in a while loop, and waits for a special
character to signify the start of a string... (it is looking for a
"["). When it sees this, it moves to the next frame of a sequence,
and reads byte by byte appending to a string, until it sees the end
character (which is a "]").
If I run the receving end in highlight execution mode, everything
works as expected. If however,
I run the programs in normal mode, I
lose random characters from the start of the string..
So if I should receive "[a1:b1:test]" I might only receive "[:test]".
Can anyone suggest why this is happening, or another possible solution
which wont have this problem.
I have tried putting a 100ms delay in each loop, which seems to solve
this problem, but a 100ms delay is not acceptable for the purpose of
this application.
I am not asking for help completing the assignment, I am merely stuck
with this issue and cant continue until this problem is solved.
Any help is greatly appreciated,
Jason