niddss
Newbie level 1
hi!
I am trying to transmit data from MATLAB to PIC16F887 microccontroller...
Data is being transmitted to Microcontroller through hyperterminal without any error, but when I run following code in MATLAB:
s = serial('COM1');
set(s,'DataBits',8);
set(s,'BaudRate',9600);
set(s,'Parity','none');
set(s,'StopBits',1);
set(s,'FlowControl','none');
fopen(s)
fwrite(s,5);
fclose(s)
delete s
clear s
...I get the error 'Empty state-space model.'
Is there any error in the above code??
kindly help!
I am trying to transmit data from MATLAB to PIC16F887 microccontroller...
Data is being transmitted to Microcontroller through hyperterminal without any error, but when I run following code in MATLAB:
s = serial('COM1');
set(s,'DataBits',8);
set(s,'BaudRate',9600);
set(s,'Parity','none');
set(s,'StopBits',1);
set(s,'FlowControl','none');
fopen(s)
fwrite(s,5);
fclose(s)
delete s
clear s
...I get the error 'Empty state-space model.'
Is there any error in the above code??
kindly help!