Synchronizing MATLAB with the Serial Port

7 views (last 30 days)
Hi All,
I am reading the data in the serial port using MATLAB, I was able to indicate the end of reading point using the terminator LF, but still I have a problem with the start-reading point because MATLAB isn't synchronized with my microprocessor, this result in reading the data from the middle or any other point but rarely from the beginning.
Any idea how to solve this problem?
Thanks in advance

Answers (1)

Walter Roberson
Walter Roberson on 30 Oct 2013
Have you using an application protocol with the device you are communicating with, so that the MATLAB session has to request that data be sent?
Is there any reason not to read until the first LF, discard, and then start reading and keeping data?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!