资源简介
DSP原理及其C编程开发技术的源码.

代码片段和文件信息
//AdaptIDFIR.c Adaptive FIR for system ID of an FIR (uses C67 tools)
#include “bp55.cof“ //fixed FIR filter coefficients
#include “noise_gen.h“ //support noise generation file
#define beta 1E-13 //rate of convergence
#define WLENGTH 60 //# of coefffor adaptive FIR
float w[WLENGTH+1]; //buffer coeff for adaptive FIR
int dly_adapt[WLENGTH+1]; //buffer samples of adaptive FIR
int dly_fix[N+1]; //buffer samples of fixed FIR
short out_type = 1; //output for adaptive/fixed FIR
int fb; //feedback variable
shift_reg sreg; //shift register
int prand(void) //pseudo-random sequence {-11}
{
int prnseq;
if(sreg.bt.b0)
prnseq = -8000; //scaled negative noise level
else
prnseq = 8000; //scaled positive noise level
fb =(sreg.bt.b0)^(sreg.bt.b1); //XOR bits 01
fb^=(sreg.bt.b11)^(sreg.bt.b13); //with bits 1113 -> fb
sreg.regval<<=1;
sreg.bt.b0=fb; //close feedback path
return prnseq; //return noise sequence
}
interrupt void c_int11() //ISR
{
int i;
int fir_out = 0; //init output of fixed FIR
int adaptfir_out = 0; //init output of adapt FIR
float E; //error=diff of fixed/adapt out
dly_fix[0] = prand(); //input noise to fixed FIR
dly_adapt[0]=dly_fix[0]; //as well as to adaptive FIR
for (i = N-1; i>= 0; i--)
{
fir_out +=(h[i]*dly_fix[i]); //fixed FIR filter output
dly_fix[i+1] = dly_fix[i]; //update samples of fixed FIR
}
for (i = 0; i < WLENGTH; i++)
adaptfir_out +=(w[i]*dly_adapt[i]); //adaptive FIR filter output
E = fir_out - adaptfir_out; //error signal
for (i = WLENGTH-1; i >= 0; i--)
{
w[i] = w[i]+(beta*E*dly_adapt[i]); //update weights of adaptive FIR
dly_adapt[i+1] = dly_adapt[i]; //update samples of adaptive FIR
}
if (out_type == 1) //slider position for adapt FIR
output_sample(adaptfir_out); //output of adaptive FIR filter
else if (out_type == 2) //slider position for fixed FIR
output_sample(fir_out); //output of fixed FIR filter
return;
}
void main()
{
int T=0 i=0;
for (i = 0; i < WLENGTH; i++)
{
w[i] = 0.0; //init coeff for adaptive FIR
dly_adapt[i] = 0; //init buffer for adaptive FIR
}
for (T = 0; T < N; T++)
dly_fix[T] = 0; //init buffer for fixed FIR
sreg.regval=0xFFFF; //initial seed value
fb = 1; //initial feevack value
comm_intr(); //init DSK codec McBSP
while (1); //infinite loop
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2008-11-28 08:56 dsp
文件 924 2001-10-29 19:40 dsp\readme.txt
..AD..R 0 2008-11-28 08:56 dsp\Twosumlasmfloat
文件 19456 2001-08-27 06:31 dsp\Twosumlasmfloat\twosumlasmfloat.doc
..AD..R 0 2008-11-28 08:56 dsp\Twosumlasmfix
文件 19456 2001-08-27 06:30 dsp\Twosumlasmfix\twosumlasmfix.doc
..AD..R 0 2008-11-28 08:56 dsp\Twosumfloat
文件 19456 2001-08-27 06:35 dsp\Twosumfloat\twosumfloat.doc
..AD..R 0 2008-11-28 08:56 dsp\Twosumfix
文件 19456 2001-08-27 06:33 dsp\Twosumfix\twosumfix.doc
..AD..R 0 2008-11-28 08:56 dsp\Twosum
文件 19456 2001-08-27 06:28 dsp\Twosum\twosum.doc
..AD..R 0 2008-11-28 08:56 dsp\two_tones
文件 3396 2001-08-17 15:30 dsp\two_tones\cc_build_Debug.log
文件 1614 2001-07-21 04:34 dsp\two_tones\two_tones.c
文件 15614 2001-05-06 18:56 dsp\two_tones\two_tones.out
文件 892 2001-08-17 15:36 dsp\two_tones\two_tones.pjt
..AD..R 0 2008-11-28 08:56 dsp\SweepDE
文件 22799 2001-08-22 03:38 dsp\SweepDE\SweepDE.out
文件 863 2001-08-22 03:41 dsp\SweepDE\SweepDE.pjt
文件 2531 2001-08-22 03:38 dsp\SweepDE\cc_build_Debug.log
文件 2015 2001-07-21 05:06 dsp\SweepDE\sweepDE.c
..AD..R 0 2008-11-28 08:56 dsp\sweep8000
文件 969 2001-07-09 06:00 dsp\sweep8000\Sweep8000.c
文件 30427 2001-08-22 03:35 dsp\sweep8000\Sweep8000.out
文件 872 2001-08-22 03:35 dsp\sweep8000\Sweep8000.pjt
文件 2415 2001-08-22 03:34 dsp\sweep8000\cc_build_Debug.log
文件 45702 2001-07-09 08:11 dsp\sweep8000\sine8000_table.h
..AD..R 0 2008-11-28 08:56 dsp\Support
文件 559 2001-08-15 05:18 dsp\Support\C6xdsk.cmd
............此处省略512个文件信息
相关资源
- Scratch源码
- E4A无障碍跨程序操作类库(带源码、
- 设备管理系统源码
- 安卓wifi直连app源码
- 我的世界源码(易语言版)
- Scratch 吃豆人追踪者.sb3
- labview编程软件滤波器以及编写程序设
- Scratch 变脸(将人物图片变成各种各样
- 我的界面(visual foxpro)源码
- 易语言:一键cf基址源码
- The Secret Path 3D 3D魔方迷宫[源码][scra
- scratch垃圾分类源码(最终版本).sb
- 安卓QQ6.71协议源码易语言,qq协议源码
- 编译原理实验工具及参考源码(lex&
- E盾偷后台工具源码
- UNIX/LINUX编程实践教程的源码
- 十以内加减法练习 powerbuilder源码
- Windows异步套接字网络编程
- 农场开发项目
- 编程实现二维DCT变换
- MT4编程 EA模板
- OCR源码
- 音乐代码转换软件 单片机编程时用
- PLC上位机编程软件
- 用foobar2000听google音乐[更新一下]
- 一种红外遥控编解码仿真
- 学生信息管理系统源码
- 用Socket编程实现FTP
- 用VC 编写的仿QQ聊天室程序源代码
- 毕业论文之温度传感器DS18B20(源码
评论
共有 条评论