How to transmit 96 bits using RS232?
Ältere Kommentare anzeigen
I try to divide the 96 bits in groups of 8 bits and sent them using RS232, after the 96 bits have been sent to a FPGA and it done some operations, I need transmit from the fpga to a computer, a group of 32 bits. Somebody can help me. I try to use the following code in a loop
>>hpo=serial ('COM4','BaudRate',115200,'DataBits',8, 'Parity','none','StopBits',1,'ReadAsyncMode','continuous');
>>DataC=fread(hpo,1);
But I got the following error
Warning: Unsuccessful read: The specified amount of data was not returned within
Thanks
Antworten (2)
Ganesh Gaonkar
am 31 Mär. 2015
Some hardware requires hardware-handshaking for communication. This is done by setting the "flowcontrol" to hardware like below:
set(hpo,'FlowControl','hardware');
You can try adding this command after your first command and see if that can solve the issue.
1 Kommentar
Ana
am 1 Apr. 2015
Ana
am 1 Apr. 2015
Kategorien
Mehr zu Data Acquisition Toolbox Supported Hardware finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!