필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

error in matlab function

조회 수: 1 (최근 30일)
anas qazaz
anas qazaz 2013년 4월 6일
마감: MATLAB Answer Bot 2021년 8월 20일
hi,all i read matlab help about fwrite function it say write binary data to device.i want use this function to transfer binary data to 8051 via serial port the problem when i use the following code:
s=serial('com3','baudrate',9600);
set(s,'parity','none');
set(s,'databit',8);
set(s,'stopbit',1);
fopen(s)
fwrite(s,00000001,'uint8')
i receive in 8051 00000110
>> fwrite(s,11111111,'uint8')
>> i receive in 8051 11111110
fwrite(s,11110000,'uint8')
i receive also 11111110 are there errors in this matlab function,what this problem?note i use usb to rs232 adapter .how i can transfer binary byte of data in matlab. please help,suggest,idea thanks in advance

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by