Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Ads

Discussion Groups

Discussion Groups | Matlab DSP | Serial Communication - Binary Data

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

Serial Communication - Binary Data - Ashwini V - Jul 17 8:17:11 2008



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



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )