1 / 13

Microcomputer Systems I ECE 3551 Fahad Alqasim Instructor: Dr. Kepuska

Microcomputer Systems I ECE 3551 Fahad Alqasim Instructor: Dr. Kepuska. Purpose:. To use the knowledge learned in ECE-3551, to make a final project. The project is to do the following : Mute the sound. Increase volume . Decrease volume. FIR High Pass filter and FIR low Pass filter.

Download Presentation

Microcomputer Systems I ECE 3551 Fahad Alqasim Instructor: Dr. Kepuska

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Microcomputer Systems IECE 3551Fahad AlqasimInstructor: Dr. Kepuska

  2. Purpose: • To use the knowledge learned in ECE-3551, to make a final project. The project is to do the following : • Mute the sound. • Increase volume . • Decrease volume. • FIR High Pass filter and FIR low Pass filter.

  3. Solution and Operation: • Press PF8 once: mute the sound and all LEDs off. Second press plays soundthe, and LED1 ON. • Press PF9 once: increase the volume, also LED1 and LED2 ON. Second press increases the volume more , Also, LED1to LED3 ON. Third press increases the volume more, also, LED1to LED4 ON. Fourth press increase the volume to the maximum. also, LED1 to LED5 ON • Press PF10 once: decrease the volume, also LED1 to LED 4 ON. The volume will decrease by pressing more until it is mute. Also, the LEDs decrease as well • Press PF11 once: a FIR low pass filter data is sent to the output, also, LED4, LED5, LED8 and LED9 ON . Second press a FIR high pass filter data is sent to the output. Also, LED6 and LED7 ON

  4. Code ISR .c Mute the sound { if (*pFIO_FLAG_D == 0x0100) // PF8 switch { *pFIO_FLAG_C = 0x100;// Confirm interrupt handling workaround pf8++; // Mute variable, self-increment if (pf8 == 2) //If mute =1, stop loading data. { pf8 = 0; } mute(); // apply the mute function if pf8=1 }

  5. ISR.c Increase volume if (*pFIO_FLAG_C == 0x0200) // PF89switch { *pFIO_FLAG_C = 0x0200; // Confirm interrupt handling workaround if (fahad < 5) // if fahad greater than 5 stop loading data { fahad++; // let fahad increase }

  6. ISR.c decrease volume { *pFIO_FLAG_C = 0x0400; // confirm PF10 interrupt handling if (fahad != 0) // if fahad = 0 stop loading data { fahad--; // decreases fahad } }

  7. ISR.c high pass and low pass filter else if (*pFIO_FLAG_C == 0x0800) { *pFIO_FLAG_C = 0x0800; // confirm PF11 interrupt handling pf11++; // filter variable, self-increment if (pf11 > 2) //If filter greater than 2, stop loading data. { pf11 = 0; } } }

  8. ISR.c high pass and low pass filter if(pf11==1) { iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; //Data from DAC left to left channel-in iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; //Data from DAC right to right channel-in Lowpass(); // apply low pass filter to the data iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; //Data from channel-out to DAC. iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; //Data from channel-out to DAC } if(pf11==2) { iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; //Data from DAC left to left channel-in iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; //Data from DAC right to right channel-in Highpass(); // apply high pass filter to the data iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; //Data from channel-out to DAC. iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; //Data from channel-out to DAC }

  9. Main.c int pf8 = 0; //The pf8 is a variable interger for the mute. intfahad = 1; //The fahadis a variable interger for decreasing and increasing . intpf11=0; //The pf11 is a variable interger for the filter short led= 0;

  10. Talkthrough.h • Global variables extern int iChannel0LeftIn; extern int iChannel0RightIn; extern int iChannel0LeftOut; extern int iChannel0RightOut; extern short hp; extern short led; extern intfahad; extern int volume1; extern short pf11; • Prototypes void Process_Data(void); void Lowpass(void); void Highpass(void);

  11. Problems • C++

  12. References • Dr. Keputska’s web page • http://my.fit.edu/~vkeputska/ece3551/

  13. Questions?

More Related