Jump to content

serial Read/ Write Synchronisation


Recommended Posts

Is a sequence structure the best to ensure a serial read/write between two pc's does not get mixed up?

PC1 will send to PC 2

PC2 does something with the data and sends back to PC1

so

PC1 PC2

Write --> Read

Read <-- Write

Do i need ad a delay anywhere in the loops to ensure synchronisation??

or am i going down the wrong track al together??

Also, as part of the read, i have a concenate string function. It only write to the serial when the string is complete. Once its complete, the string is written to serial port and then i want to move onto the next sequence in the structure.

How to terminate a while loop when the string is written??

Regards

Jason

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.