Download presentation
Presentation is loading. Please wait.
Published bySimon Patterson Modified over 9 years ago
2
To use the blackfin processor BF-533 to implement what we have learned about the blackfin processor. My approach for this project by : Input Audio will play throw 4 speakers and all LEDs will be turned off. PF8(once) : activate the IIR low pass filter, LED: 4 turn on (twice) : activate the FIR low pass filter. LED :4, 5 turn on PF9 (once) : activate the IIR High pass filter. LED :4,5,6,7 turn on (twice) : activate the FIR High pass filter. LED:4,5,6,7,8,9 turn on PF10: Activate / Deactivate the Mute function. LED :4,5,6,7,8,9
3
Input Audio will play throw 4 speakers and all LEDs will be turned off. EX_INTERRUPT_HANDLER(FlagA_ISR) { if (low==0 && high==0) { *pFlashA_PortB_Data=0x00; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1];//l iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; Original(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; }
4
Transfer function for IIR filter. we implement the Transfer function using the two formulas: Matlab Low pass filter frequencies : F stop = 5000 Hz F pass = 8000 Hz High pass filter frequencies : F stop = 1400 Hz F c = 2000 Hz Generate a Header file which include the filter coefficients.
5
Filter coefficient collapsed and corrupt every now and then since yesterday night. Redesign the filter in math lab and redo the coefficient. But it is not a permanent solution because the problem keeps coming back
6
pressing PF8(once): Activates IIR low pass filter. EX_INTERRUPT_HANDLER(FlagA_ISR) { if(*pFIO_FLAG_C == 0x0100) { *pFIO_FLAG_C = 0x0100; high=0; if(low<2) { low++; } else { low=0; }
7
EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(low==1) { high=0; *pFlashA_PortB_Data=0x01; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1]; iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; lowpassfilterIIR(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; } PF8(once) continue:
8
pressing PF8(twice): Activates FIR low pass filter. EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(low==2) { high=0; *pFlashA_PortB_Data=0x03; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1]; iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; highpassfilter_FIR(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; }
9
pressing PF9(ONCE): Activates IIR High pass filter. EX_INTERRUPT_HANDLER(FlagA_ISR) { if(*pFIO_FLAG_C == 0x0200) { *pFIO_FLAG_C = 0x0200; low=0; if(high<2) { high++; } else { high=0; }
10
EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(high==1) { low=0; *pFlashA_PortB_Data=0x0f; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1]; iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; HighpassfilterIIR(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; } PF9 (once)continue:
11
pressing PF9(twice): Activates FIR High pass filter. EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(high==2) //plays audio input through the high pass filter { low = 0; *pFlashA_PortB_Data=0x3f; iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; iChannel1LeftIn = iRxBuffer1[INTERNAL_ADC_L1]; iChannel1RightIn = iRxBuffer1[INTERNAL_ADC_R1]; lowpassfilter_FIR(); iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; iTxBuffer1[INTERNAL_DAC_L1] = iChannel1LeftOut; iTxBuffer1[INTERNAL_DAC_R1] = iChannel1RightOut; }
12
pressing PF10: Activates Mute function. EX_INTERRUPT_HANDLER(FlagA_ISR) { *pFIO_FLAG_C = 0x0400; if(mute<1) { mute++; } else { mute=0; } EX_INTERRUPT_HANDLER(Sport0_RX_ISR) { if(mute==1) { high=0; low=0; mute_b(); }
13
I got all other filters to work as expected in in this class. I re-design the IIR low pass many times since yesterday night and it continues to corrupt. Hopefully it will work during the demonstration. things I would change: If I have taken Signal and Systems I would be able to improve my filter and how they sound.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.