Reply by Hocquet Franck January 9, 20022002-01-09
Hi Marlo,

Apparently, you missed an important point in digital signal processing :
sampling frequency must be a minimum of twice the max frequency of the
input analog signal, which means in your case that Fs(Min) = 600kHz * 2 =
1.2Mhz.
(because FIR filter linear phase transfert functions imply symetric impulse
responses,
which can be efficiently computed on a C54x fixed point DSP).

If you don't do that you will get aliasing and, of course, phase distorsion,
when converting your FIR filter output to analog signal.
So if you cannot do digital conversion at the necessary minimum frequency,
you will
have big troubles, sorry.

Regards,
Franck HOCQUET
Field Application Engineer - EBV Elektronik GmbH & Co. KG, Paris Office
E-mail: - Web: http://www.ebv.com -----Original Message-----
From: Marlo Flores [mailto:]
Sent: mardi 8 janvier 2002 12:08
To:
Subject: [c54x] Digital LoopBack Problem hi all,

I've been using the following sample piece of code
(given in ..\c5400\dsk\examples\dsp\codec to do a
digital loopback:

/* get data from input microphone */
data = *(volatile s16*)DRR1_ADDR(HANDSET_CODEC);

/* send data to output speaker */
*(volatile s16*)DXR1_ADDR(HANDSET_CODEC) = data;

the input data is a sine wave 600 kHz from the
function gen. and the output displayed on the
oscilloscope. Sampling rate was 16 Khz (set in
software). The code performed well. When I do a simple
multiplication or addition, the output was as
expected. However, when I implemented 12-tap filter
was inserted,(i.e.,

/* get data from input microphone */
in = *(volatile s16*)DRR1_ADDR(HANDSET_CODEC); out = FIR_filter(signals_in_array);

/* send data to output speaker */
*(volatile s16*)DXR1_ADDR(HANDSET_CODEC) = in;

the output did not give any sense

I checked whether the filter itself is a cause by
replacing the filter with a "blank" for loop (counter
until 300), the output is distorted. Is there a
problem with timing? Were there very important things
i missed?. Any solution to this? Where can I get a
sample c-code of real-time FIR filter in 'C54? Thanks,
marlo


Reply by Marlo Flores January 8, 20022002-01-08
hi all,

I've been using the following sample piece of code
(given in ..\c5400\dsk\examples\dsp\codec to do a
digital loopback:

/* get data from input microphone */
data = *(volatile s16*)DRR1_ADDR(HANDSET_CODEC);

/* send data to output speaker */
*(volatile s16*)DXR1_ADDR(HANDSET_CODEC) = data;

the input data is a sine wave 600 kHz from the
function gen. and the output displayed on the
oscilloscope. Sampling rate was 16 Khz (set in
software). The code performed well. When I do a simple
multiplication or addition, the output was as
expected. However, when I implemented 12-tap filter
was inserted,(i.e.,

/* get data from input microphone */
in = *(volatile s16*)DRR1_ADDR(HANDSET_CODEC); out = FIR_filter(signals_in_array);

/* send data to output speaker */
*(volatile s16*)DXR1_ADDR(HANDSET_CODEC) = in;

the output did not give any sense

I checked whether the filter itself is a cause by
replacing the filter with a "blank" for loop (counter
until 300), the output is distorted. Is there a
problem with timing? Were there very important things
i missed?. Any solution to this? Where can I get a
sample c-code of real-time FIR filter in 'C54? Thanks,
marlo