Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microcomputer Systems I ECE 3551 MOHAMMED ALYAMANI Instructor: Dr. Kepuska.

Similar presentations


Presentation on theme: "Microcomputer Systems I ECE 3551 MOHAMMED ALYAMANI Instructor: Dr. Kepuska."— Presentation transcript:

1 Microcomputer Systems I ECE 3551 MOHAMMED ALYAMANI Instructor: Dr. Kepuska

2 Purpose: To use the knowledge learned in ECE- 3551, to make a final project. The project is to do the following : 1. Mute the sound. 2. Increase volume. 3. Decrease volume.

3 Solution and Operation: Press PF8 once: mute the sound and all LEDs off. Second press plays sound the, 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

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 (Mohammed < 5) // if Mohammed greater than 5 stop loading data { Mohammed++; // let Mohammed increase }

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

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

8 Talkthrough.h Global variables extern int iChannel0LeftIn; extern int iChannel0RightIn; extern int iChannel0LeftOut; extern int iChannel0RightOut; extern short hp; extern short led; extern int Mohammed; extern int volume1; extern short pf11; Prototypes void Process_Data(void);

9 Problems C++

10 References Dr. Keputska’s web page ◦

11 Questions Questions?


Download ppt "Microcomputer Systems I ECE 3551 MOHAMMED ALYAMANI Instructor: Dr. Kepuska."

Similar presentations


Ads by Google