f



how to send data through serial port using matlab?

i'm interfacing a microcontroller with pc. how to send data through serial port of pc, using matlab?
0
e_rockerz (6)
3/11/2009 10:00:19 AM
comp.soft-sys.matlab 210173 articles. 11 followers. lunamoonmoon (258) is leader. Post Follow

6 Replies
589 Views

Similar Articles

[PageSpeed] 40

"mohan cp" <e_rockerz@yahoo.com> wrote in message 
news:gp823j$quk$1@fred.mathworks.com...
> i'm interfacing a microcontroller with pc. how to send data through serial 
> port of pc, using matlab?

s=serial('com1');
fopen(s);
fwrite(s,'12345');
fclose(s);

http://www.mathworks.com/serial 


0
tjarvi (224)
3/11/2009 3:16:26 PM
"Trent Jarvi" <tjarvi@mathworks.com> wrote in message <gp8kka$ai$1@fred.mathworks.com>...
> 
> "mohan cp" <e_rockerz@yahoo.com> wrote in message 
> news:gp823j$quk$1@fred.mathworks.com...
> > i'm interfacing a microcontroller with pc. how to send data through serial 
> > port of pc, using matlab?
> 
> s=serial('com1');
> fopen(s);
> fwrite(s,'12345');
> fclose(s);
> 
> http://www.mathworks.com/serial 
> 
thank u.......
0
e_rockerz (6)
3/12/2009 4:06:04 AM
"Trent Jarvi" <tjarvi@mathworks.com> wrote in message <gp8kka$ai$1@fred.mathworks.com>...
> 
> "mohan cp" <e_rockerz@yahoo.com> wrote in message 
> news:gp823j$quk$1@fred.mathworks.com...
> > i'm interfacing a microcontroller with pc. how to send data through serial 
> > port of pc, using matlab?
> 
> s=serial('com1');
> fopen(s);
> fwrite(s,'12345');
> fclose(s);
> 
> http://www.mathworks.com/serial 
> 
thank u
0
e_rockerz (6)
3/12/2009 4:06:07 AM
"Trent Jarvi" <tjarvi@mathworks.com> wrote in message <gp8kka$ai$1@fred.mathworks.com>...
> 
> "mohan cp" <e_rockerz@yahoo.com> wrote in message 
> news:gp823j$quk$1@fred.mathworks.com...
> > i'm interfacing a microcontroller with pc. how to send data through serial 
> > port of pc, using matlab?
> 
> s=serial('com1');
> fopen(s);
> fwrite(s,'12345');
> fclose(s);
> 
> http://www.mathworks.com/serial 
> 

Hi,
Concerning this issue, i have two question:

1- Using "INSTRFIND" show me all ports, but all statue are close. How can i open them?
2-I did not get from above-mentioned code, how to send a data (e.g *.txt format)
to com1, would you give me some more helps!

thanks 
0
jeff_dubi (28)
7/3/2009 3:37:01 PM
"karlo gonzales" wrote in message <h2l8is$deu$1@fred.mathworks.com>...
> "Trent Jarvi" <tjarvi@mathworks.com> wrote in message <gp8kka$ai$1@fred.mathworks.com>...
> > 
> > "mohan cp" <e_rockerz@yahoo.com> wrote in message 
> > news:gp823j$quk$1@fred.mathworks.com...
> > > i'm interfacing a microcontroller with pc. how to send data through serial 
> > > port of pc, using matlab?
> > 
> > s=serial('com1');
> > fopen(s);
> > fwrite(s,'12345');
> > fclose(s);
> > 
> > http://www.mathworks.com/serial 
> > 
> 
> Hi,
> Concerning this issue, i have two question:
> 
> 1- Using "INSTRFIND" show me all ports, but all statue are close. How can i open them?
> 2-I did not get from above-mentioned code, how to send a data (e.g *.txt format)
> to com1, would you give me some more helps!
> 
> thanks 


use this commend first 
delete(instrfindall)
0
3/23/2013 4:15:06 PM
On Wednesday, March 11, 2009 8:46:26 PM UTC+5:30, Trent Jarvi wrote:
> "mohan cp" <e_rockerz@yahoo.com> wrote in message 
> news:gp823j$quk$1@fred.mathworks.com...
> > i'm interfacing a microcontroller with pc. how to send data through serial 
> > port of pc, using matlab?
> 
> s=serial('com1');
> fopen(s);
> fwrite(s,'12345');
> fclose(s);
> 
> http://www.mathworks.com/serial

you have given code to send data through serial cable in matlab.
how can i receive the same data in micro controller(Im using ARM 7 micro controller which runs with keil software).
please help me as soon as possible
0
ravitej
4/3/2014 8:31:54 AM
Reply: