Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to send data through serial port using matlab?

Subject: how to send data through serial port using matlab?

From: mohan cp

Date: 11 Mar, 2009 10:00:19

Message: 1 of 7

i'm interfacing a microcontroller with pc. how to send data through serial port of pc, using matlab?

Subject: how to send data through serial port using matlab?

From: Trent Jarvi

Date: 11 Mar, 2009 15:16:26

Message: 2 of 7


"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

Subject: how to send data through serial port using matlab?

From: mohan cp

Date: 12 Mar, 2009 04:06:04

Message: 3 of 7

"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.......

Subject: how to send data through serial port using matlab?

From: mohan cp

Date: 12 Mar, 2009 04:06:07

Message: 4 of 7

"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

Subject: how to send data through serial port using matlab?

From: karlo gonzales

Date: 3 Jul, 2009 15:37:01

Message: 5 of 7

"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

Subject: how to send data through serial port using matlab?

From: Faizan FAisal

Date: 23 Mar, 2013 16:15:06

Message: 6 of 7

"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)

Subject: how to send data through serial port using matlab?

From: ravitej.madem@gmail.com

Date: 3 Apr, 2014 08:31:54

Message: 7 of 7

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

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us