AnsweredAssumed Answered

block based talk through example adsp21369 - modfy blocks, amplify, filtering

Question asked by mettym on Jun 4, 2014
Latest reply on Jul 7, 2017 by apple_srf

Hello everybody

I am new in the DSP world. I'm programmed a lot of C with microcontrollers and have now a few problems.

In the file 'blocProcess.c' there I will to begin make easy modifications with the data. First I tried to make a simple amplification with the data:

void processBlockAmp(unsigned int *block_ptr, int amp)

{

     int i;

     float temp_out;

     /*Clear the Block Ready Semaphore*/

     blockReady = 0;

     /*Set the Processing Active Semaphore before starting processing*/

     isProcessing = 1;

 

      for(i=0;i<NUM_SAMPLES;i++)

     {

          *(block_ptr+i) =  *(block_ptr+i) * amp;

     }

      Block_Float_To_Fixed(block_ptr, f_block_l, f_block_r );

     /*Clear the Processing Active Semaphore after processing is complete*/

     isProcessing = 0;

}

But there the result was not the expectet one.. then I read in this forum a little bit about this example and foundet here to functions to convert the block from int to a floating point block. So I had:

Block_Fixed_To_Float(block_ptr, f_block_l, f_block_r );

      for(i=0;i<NUM_SAMPLES;i++)

     {

          f_block_l[i] *=amp;

          f_block_r[i] *=amp;

     }

      Block_Float_To_Fixed(block_ptr, f_block_l, f_block_r );

But I could no see any changes of the signal. Firstly I wanted to play with the gain, then built in any filters. How can I make that?

Outcomes