--- In c..., Jeff Brower wrote: >
> Tony-
>
> > Thanks for the reply. I'm not sure how to setup the McBSP to accept > > the external sample clock. The encoder would only
be used to trigger > > a sample to occur.
>
> Simple: the wheel shaft encoder pulse train triggers the ADC, and the ADC output > clock goes to the McBSP.
>
> One other thing: if the wheel is not rotating at constant speed, then your samples > do not have regular spacing and you can't
reliably apply algorithms that assume > linear time-invariant processing to that data. You
might want to limit your signal > processing to data where sample periods are
relatively unchanging.
>
> -Jeff
> Jeff,
Thanks for the info. I will give that a shot. I was stuck on the
idea that the clock needed to come from the DSP and not the ADC.
Tony
Reply by Jeff Brower●June 1, 20062006-06-01
Tony-
> Thanks for the reply. I'm not sure how to setup
the McBSP to accept
> the external sample clock. The encoder would only be used to trigger
> a sample to occur.
Simple: the wheel shaft encoder pulse train triggers the ADC, and the ADC
output
clock goes to the McBSP.
One other thing: if the wheel is not rotating at constant speed, then your
samples
do not have regular spacing and you can't reliably apply algorithms that
assume
linear time-invariant processing to that data. You might want to limit your
signal
processing to data where sample periods are relatively unchanging.
-Jeff
Reply by Jeff Brower●June 1, 20062006-06-01
Tony-
> I have seen many examples of connecting an ADC to the
McBSP port where
> the sampling rate is controlled by a clock generated by the DSP chip.
> I have an application where the clock will come from an encoder
> connected to the shaft of a motor. I am trying to figure out if there
> is an efficient way to do this with the DSP architecture. I don't
> think it can be done using the McBSP.
>
> The sampling rate is 3600 clocks per revolution of the motor. So at
> 6000 rpm the sample rate would be 360 kSPS and at 3000 rpm 180 kSPS.
> This sample rate with vary continuously based on the speed of the
> motor. I have access to a 6713 DSK to try any suggestions.
McBSP should work fine. A sampling rate of 360 kHz with 16-bit samples is about
5
Mbps rate, which is not going to cause serial port - DMA throughput problems.
With
DMA enabled, you can set an efficient buffer size (64? 256?), use dual buffers,
and
interrupt your code for new data processing on a buffer full status from DMA.
The only issue in this approach would be latency. If you are implementing a
control
system, and you need to output (DAC) based on DSP processing within a few
samples of
time, then it gets harder. But it gets harder in that case anyway, regardless
of
whether you use McBSP to get data on/off the chip.
-Jeff
Reply by tfountaine1●June 1, 20062006-06-01
I have seen many examples of connecting an ADC to the McBSP port where
the sampling rate is controlled by a clock generated by the DSP chip.
I have an application where the clock will come from an encoder
connected to the shaft of a motor. I am trying to figure out if there
is an efficient way to do this with the DSP architecture. I don't
think it can be done using the McBSP.
The sampling rate is 3600 clocks per revolution of the motor. So at
6000 rpm the sample rate would be 360 kSPS and at 3000 rpm 180 kSPS.
This sample rate with vary continuously based on the speed of the
motor. I have access to a 6713 DSK to try any suggestions.