필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Value stored in buffer after serial communication

조회 수: 2 (최근 30일)
Prashant Funde
Prashant Funde 2016년 2월 9일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello everyone, I want to send some command to the FPGA through serial port. Command will be send from MATLAB GUI. To send a command, which function is most useful fprintf or fwrite? and to read data on serial port using GUI in a text file or in a list/Tabl, which function is better fscanf or fread?
How i will know, that command i send on serial port is written in FPGA?
Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2016년 2월 9일
fprintf() is most useful if you are sending text that needs to be human readable.
fwrite() is most useful if you are using a binary protocol, which would be more likely on an FPGA as it reduces the memory requirements and reduces the processing of the commands (and so saves time.)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by