Presentation is loading. Please wait.

Presentation is loading. Please wait.

“Uber” Box Multifarious Systems 1 Pattarapong Rojanasthien Will Matthau.

Similar presentations


Presentation on theme: "“Uber” Box Multifarious Systems 1 Pattarapong Rojanasthien Will Matthau."— Presentation transcript:

1 “Uber” Box Multifarious Systems 1 Pattarapong Rojanasthien Will Matthau

2 Introduction We designed our Blackfin as an audio box with multiple effect changes such as an echo, bass boost and reduction We included an effect which would allow for our LEDs on the board to display a light equalizer based on the intensity of sound running into the board from an outside source

3 Programmable Flag Buttons In order to operate all four of the buttons on the Blackfin board, we needed to change their values to the hex value of 0x0F00 We assigned the values to the pointers: –*pFIO_INEN, *pFIO_EDGE, *pFIO_MASKA_D

4 Button Logic Example if (FlagRegister & 0x0400) { // confirm interrupt handling *pFIO_FLAG_C = 0x0400; ucActive_LED = 0x00; if (PF10_Count < 1) { PF10_Count= 1; PF8_Count = 0; PF9_Count = 0; PF11_Count = 0; outputChoice = 3; } else { PF8_Count = 0; PF9_Count = 0; PF10_Count = 0; PF11_Count = 0; outputChoice = 0; } When PF10 is pushed once it enables it to “1”, and if you press it again, then all are set to “0”

5 Procedure For Filter Design 1.We recorded.wav files for songs with solos for bass and for trebles 2.We used MATLAB function “wavread” to read the.wav files into an array 3.Then we used MATLAB function “spectrogram” to display the visual version of the.wav file 4.Then we used MATLAB function fdatool to generate the filter coefficients

6 How To Determine Filtering The interrupt will change based on which button was pressed The outputChoice variable will change after the interrupt goes through switch (outputChoice) { case 0: Process_Data(); break; case 1: Process_FIR_Bass(); break; case 2: Process_Uberecho(); break; case 3: Process_IIR_High(); break; case 4: Process_FIR_Light(); break; default: break; }

7 Echo Design

8 Echo Function void Process_Uberecho(void) { static short BufferL[4000],BufferR[4000]; int left, right; static int i = 0; BufferL[i] = (short)(iChannel1LeftIn>>8) + (BufferL[i]/1.5); <<< 1/1.5 is the amplitude BufferR[i] = (short)(iChannel1RightIn>>8) + (BufferR[i]/1.5); <<< 1/1.5 is the amplitude left = BufferL[i]; right = BufferR[i]; iChannel1LeftOut = left << 8; iChannel1RightOut = right << 8; if(i>=4000-1) i = 0; else i++; }

9 LED Logic Example The way we computed the values to turn the LED for PF8 through 10 are very similar switch (PF8_Count) { case 0: ucActive_LED = ucActive_LED | 0x00; break; case 1: ucActive_LED = ucActive_LED | 0x01; break; default: break; }

10 LED Logic For PF11 (cont) if (PF11_Count == 1) { if (abs(iChannel0LeftOut) >= 500000) ucActive_LED = 0x3F; // all LED ON else if (abs(iChannel0LeftOut) >= 400000) ucActive_LED = 0x1F; // LED4-LED8 else if (abs(iChannel0LeftOut) >= 300000) ucActive_LED = 0x0F; // LED4-LED7 else if (abs(iChannel0LeftOut) >= 200000) ucActive_LED = 0x07; // LED4-LED6 else if (abs(iChannel0LeftOut) >= 100000) ucActive_LED = 0x03; // LED4-LED5 else if (abs(iChannel0LeftOut) >= 50000) ucActive_LED = 0x01; // LED4 else ucActive_LED = 0x00; // all LED OFF }


Download ppt "“Uber” Box Multifarious Systems 1 Pattarapong Rojanasthien Will Matthau."

Similar presentations


Ads by Google