From: moshe on
Hi,
I am in a middle of my project, and I have some problem.
I connect to the PC some kind of ADC(ez430-rf2500),this kit sample in 1KHz sample/sec. the problem is that I want to read the data to matlab with the code :
s=serial('com3');
fopen(s)
while(1)
t{p}=fscanf(s);
p=p+1
end

the problem is that the command fscanf is very slow. this function read 100 sample/sec instead of 1000. I have overflow in the queue of the serial port.
How can I do this fast????
please help me.

moshe
From: us on
"moshe " <reubinoff(a)hotmail.com> wrote in message <i20njh$2pb$1(a)fred.mathworks.com>...
> Hi,
> I am in a middle of my project, and I have some problem.
> I connect to the PC some kind of ADC(ez430-rf2500),this kit sample in 1KHz sample/sec. the problem is that I want to read the data to matlab with the code :
> s=serial('com3');
> fopen(s)
> while(1)
> t{p}=fscanf(s);
> p=p+1
> end
>
> the problem is that the command fscanf is very slow. this function read 100 sample/sec instead of 1000. I have overflow in the queue of the serial port.
> How can I do this fast????
> please help me.
>
> moshe

a hint:
- did you set the baud rate(?)...

us
From: moshe on

>
> a hint:
> - did you set the baud rate(?)...
>
> us

the baud rate is 9600, as default.
the kit support this baud rate.
this is a slow rate?
moshe
From: moshe on
"moshe " <reubinoff(a)hotmail.com> wrote in message <i211eh$9g4$1(a)fred.mathworks.com>...
>
> >
> > a hint:
> > - did you set the baud rate(?)...
> >
> > us
>
> the baud rate is 9600, as default.
> the kit support this baud rate.
> this is a slow rate?
> moshe

someone know what to do??
I'm Lost...
From: us on
"moshe " <reubinoff(a)hotmail.com> wrote in message <i21gq8$b1p$1(a)fred.mathworks.com>...
> "moshe " <reubinoff(a)hotmail.com> wrote in message <i211eh$9g4$1(a)fred.mathworks.com>...
> >
> > >
> > > a hint:
> > > - did you set the baud rate(?)...
> > >
> > > us
> >
> > the baud rate is 9600, as default.
> > the kit support this baud rate.
> > this is a slow rate?
> > moshe
>
> someone know what to do??
> I'm Lost...

well...
did you try to change the baudrate(?) -or- is it the only baudrate the port allows for...

us
 |  Next  |  Last
Pages: 1 2 3
Prev: gate
Next: For loop iteration number?