Digital Signal Processing Reference
In-Depth Information
1
0.8
0.6
0.5
0.4
0.2
0
0
0.9
0.95
1
1.05
1.1
x 10 5
0
2000
4000
6000
8000
Frequency (Hz)
Frequency (Hz)
2
1
1.5
1
0.5
0.5
0
0
0
0.005
0.01
0
2000
4000
6000
8000
Time (s ec . )
Frequency (Hz)
FIGURE 12.45B
Sampled AM signal and spectrum for f c ¼ 100 kHz.
for (j ¼ 0;j<M;j þþ )
{
for(i ¼ 66; i>0; i--) // Update input buffer
{ x[i] ¼ x[i-1]; }
x[0] ¼ lc; // Load new sample
sum
0.0;
for(i
¼
¼
0;i<67;i
þþ
)
// FIR filtering
{ sum
¼
sum
þ
x[i]*b[i]; }
if (j
¼¼
0)
{ y[0]
¼
sum; } // Update DAC with processed sample (decimation)
}
// End of the DSP algorithm
lcnew
y[0]; /* Send to DAC */
rcnew ¼ y[0];
AIC23_data.channel[LEFT] ¼ (short) lcnew;
AIC23_data.channel[RIGHT] ¼ (short) rcnew;
output_sample(AIC23_data.combo);
¼
}
 
Search WWH ::




Custom Search