Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Value stored in buffer after serial communication

2 vues (au cours des 30 derniers jours)
Prashant Funde
Prashant Funde le 9 Fév 2016
Clôturé : MATLAB Answer Bot le 20 Août 2021
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

Réponses (1)

Walter Roberson
Walter Roberson le 9 Fév 2016
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.)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by