ECE 3551 Microcomputer Systems 1 Final Project by Rashid Alhilal Date submitted: 05/01/2009 Instructor: Dr. Kepuska Objective: How to process audio data in ADSP-BF533 EZ-Kit Lite. Design Infinite Impulse Response (IIR) filters with MATLAB. Design finite Impulse Response (FIR) filters with MATLAB. Control the audio input/output. Hardware/Software Used: VisualDSP++ 4.5. ADSP-BF533 EZ-KIT Lite board. stereo speakers. MATLAB. Source Code: see the attached Zip file in the Angel. Discussion: In this project we used four buttons (PF8, PF9, PF10, and PF11) to control the input and output. And also, we used a MATLAB for highpass and low pass filters. we used two LEDs (LED4-9) as fallowing: By pressing on PF8: In the first time, system will be on , by pressing on it again the system will be off. (LED4 on) . By pressing on PF9: high pass filtered data is sent to the output. First press hp IIR filter on. Second press hp FIR filter on. Third press It begins as it started. (LED4 , LED5, and LED7 are on) By pressing on PF10: Low pass filtered data is sent to the output. First press LP IIR filter on. Second press LP FIR filter on. Third press It begins as it started. (LED4 , LED6, and LED8 are on) By pressing on PF11: It is about the control the input/output. First time input 1 will be active. Second time input 2 will be active. Third time it goes back as it started. (LED4 and LED9 are on) In the main file, we include four files as following: "BF533 Flags.h" "ccblkfn.h" "sysreg.h" "Talkthrough.h" After that, we added the variables ( short system ON/OFF, input, and output). Then, we set up the functions as following: sysreg_write(reg_SYSCFG, 0x32); Init_Flags(); Init_EBIU(); Init_Flash(); Init1836(); Init_Sport0(); Init_DMA(); Init_Interrupts(); Enable_DMA_Sport0(); In initialization file, it defines two flashes : the first one is *pFlashA_PortA_Dir = 0x1 to clear all in portA pins because of the input, and second flash is pFlashA_PortB_Dir = 0x3f port B to set all the pins in port B because of the output. Moreover, we declared the direction register controls that is IO pins that contains an eight bits (read-write ), so that means when the bit is 0, the corresponding function is an input, but if it is 1 the corresponding function is an output. So we end with interrupts as it appears in initialize.c like: *pSIC_IAR0 = 0xffffffff; *pSIC_IAR1 = 0xffffff2f; *pSIC_IAR2 = 0xffff5ff4; declared 9 to enable (Timer 0 Interrupt and PF Interrupt) , and 2 to enable (DMAI Interrupt (SPORT0 RX)) . In ISR file, there are two files are included which are "Talkthrough.h" and "BF533 Flags.h". after that , we insert EX_INTERRUPT_HANDLER(Sport0_RX_ISR) this handle means to receive the audio inputs , the send them to the output. And also , we defined them as channels as it appears in the code. Then we did an if statement for the low pass which means if the low pass ==1 turn on the LED4. after that, we go to FlagA handler, we did two if statements for low pass and high passas it appears as follow: if (*pFIO_FLAG_C == 0x0100) { *pFIO_FLAG_C = 0x0100; lp++; if(lp == 2) lp=0; } if (*pFIO_FLAG_C == 0x0200) { *pFIO_FLAG_C = 0x0200; hp++; if(hp == 2) hp=0; } } In process data file, there are two files included same as ISR file. It is for the function that passes the input audio data to the output. We used the MTLAB coefficients to control the low pass and high pass filters. Moreover, we declared float (5) for low pass, and float(7) for high pass as it appears by following: float LPb0[5]={0.03183943778,1,1, 1, 2.644753933}; float LPb1[5]={0,-1.876213074, 0, -1.372309208,0}; float LPb2[5]={0,1,0,1,0}; float LPa0[5]={1.1,1,1,1}; float LPa1[5]={0,-1.809119105 ,0, -1.444216251,0 }; float LPa2[5]={0,0.8749185205, 0,0.5436533689,0}; float HPb0[7]={1,1,1}; float HPb1[7]={-1,-1.965208292,-1.986638904}; float HPb2[7]={0,1, 1}; float HPa0[7]={1,1,1}; float HPa1[7]={-0.8822702169,-1.878196359,-1.791189313}; float HPa2[7]={0,0.9264635444,0.8174005151}; float D0[5]={0}; float D1[5]={0}; float D2[5]={0}; float B0[7]={0}; float B1[7]={0}; float B2[7]={0}; In high pass and low pass files, we got the numbers from the MATLAB to control the frequency. Discussion questions: 1- What are filters? A filter is a method of searching for certain features or text within an email message and instructing the system to act with regards to that message. Filters allow you to check the content for common spam terms and reject the message, flag the importance of a message depending on sender or content, or simply assist managing your inbox by moving specific incoming messages automatically to the correct folders. For example, some of the email goes to junk because you blocked it before. 2- How do filters work? Filters provide an additional layer of customization that helps streamline your report with values-based settings for up to four types of attributes. By filtering out irrelevant results for specific types of data, you are better able to focus on the relationships and correlations among keywords, CTR, ad positioning, cost or other attributes of interest. 4- Explain IIR filter? In general, a causal IIR filter is represented by a different equations where the output signal at a given instant is obtained like a linear combination of the samples of the input and output signals at previous time instants. They have an impulse response function which is non-zero over an infinite length of time.