sending data using Matlab

Status
Not open for further replies.

saurabh17g

New Member
I am using Matlab to send data to ATmega32 using serial RS232 communication.


s = serial('COM1');
set(s,'BaudRate',9600);
fopen(s);
fprintf(s,<data>);

out = fscanf(s);
fclose(s);

expected output: <data>

but the output is coming as : 00001010 <data> 00001010
need some help in fixing it!
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…