フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

terrible error,problem,bad communication

1 回表示 (過去 30 日間)
anas qazaz
anas qazaz 2013 年 4 月 5 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
hi,all i have problem with the following code
Matrix1=[852.5385 752.9496 568.286 ];
s=serial('com3','baudrate',9600);
set(s,'flowcontrol','none');
set(s,'parity','none');
set(s,'databit',8);
set(s,'stopbit',1);
fopen(s)
for i=1:length(Matrix1)
A=Matrix1(i) ;
fwrite(s,A,'int8')
pause(5)
end
when i send matrix1 my 8051 read and display data as follow:
852.5385 read and display it 01111000b 752.9496 read and display it 10000110b
i know i receive 8bit because i use int8 but can any one tell me what the relation between 852.5385 and 01111000b and relation between 752.9496 and 10000110b what that terrible error what occur please can any one explain relation between these values before i become crazy
  1 件のコメント
Walter Roberson
Walter Roberson 2013 年 4 月 5 日
Please first experiment with
Matrix1 = [0 1 127 128 129 254 255 256 257]

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by