Technical discussion about Matlab and issues related to Digital Signal Processing.
Hai Frnds,
I am trying to establish serial communication between 2
computers. I am able to send the binary data successfully
which i am able to receive properly in hyperterminal. But
when i tried to read it from matlab it showing empty array.
This is my code:
Computer 1:
s = serial('COM1')
s.BaudRate = 9600;
fopen(s);
a = dec2bin(1000001);
fwrite(s,'a','int16');
fclose(s)
delete(s)
clear s
Computer 2:
s = serial('COM1')
s.BaudRate = 9600;
fopen(s);
out = fread(s);
fclose(s)
delete(s)
clear s
Output:
Warning: The specified amount of data was not returned
within the Timeout period.
out =
Empty matrix: 1-by-0
How to read the data at 2nd computer ??? Can anybody help me
plz ..
Thanks,
Ashwini