I am using matlab to read data from nexys2 board. Actually I am sending the range sensor data from nexys board to matlab through serial communication using the command below.
nexys = serial('COM1', 'BaudRate', 9600, 'Parity', 'odd', 'Terminator', '', 'Timeout', 1);
There are nine bits for representing sensor data. Because the maximum range can be represented using nine bits and the* serial communication I can do only in bytes.*
when I try to concatenating with zeros
The data I am sending is something like this in hexadecimal:
00 0A 00 1A 00 14 (2 BYTES)
But Matlab is unable to receive the data *from board through serial communication. *
Later* I tried to concatenating with ones*. then
The data I am sending is something like this in hexadecimal: FF 0A FF 1A FF 14 (2 BYTES)
*Now Matlab is able to receive this data.
Why the matlab is unable to receive zeros?*
If the data I am sending is more than 1 byte. Then how can I replace the ninth bit of 1(with zero)*bold*
Can anyone suggest something about this?
Thanks in advance