Digital Signal Processing Reference
In-Depth Information
if(sreg.bt.b0) //sequence{1,-1}based on bit b0
prnseq = -8000;
//scaled negative noise level
else
prnseq = 8000; //scaled positive noise level
fb =(sreg.bt.b0)^(sreg.bt.b1); //XOR bits 0,1
fb ^=(sreg.bt.b11)^(sreg.bt.b13);//with bits 11,13
->fb sreg.regval<<=1; //shift register 1 bit to left
sreg.bt.b0 = fb;
//close feedback path
output_sample(prnseq); //output scaled sequence
return;
//return from interrupt
}
void main()
{
//Noise_gen.h header file for pseudo-random noise
sequence
typedef struct BITVAL //register bits to be packed as
integer
{
unsigned int b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1;
unsigned int b7:1, b8:1, b9:1, b10:1, b11:1, b12:1,b13:1;
unsigned int dweebie:2;//Fills the 2 bit hole - bits 14-15
} bitval;
typedef union SHIFT_REG
{
unsigned int regval;
bitval bt;
} shift_reg;
E.6.2
Spectral Analysis Applications Using the 'C6711 DSK
FFT calculator application (Note that this application requires two
files: Main C file FFT256c.c file, which calls a callable FFT function
file FFT.c , both given below).
 
Search WWH ::




Custom Search