Serial Communication involving terminator in MATLAB
4 次查看(过去 30 天)
显示 更早的评论
Hi I am trying to read data from serial port in MATLAB at 115200 baudrate.Serial data has terminator character and i want to read data untill first terminator is reached. Then read data again untill next terminator character and so on.I have tried several function like fread, fgetl, fgets, fscanf etc. But on most occasions when i read data my last character is not terminator but some other character. When i used fgets and fgetl only three characters were read. please suggest solutions.
采纳的回答
Rushikesh Tade
2014-9-15
Use MATLAB Serial port object:
serialObj= serial('COM1','BaudRate',115200,'DataBits',7);
For more info and documentation you can visit:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!