Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microcomputer 1 Final Phantom Speakers Patrick Marinelli Matt Hopkins.

Similar presentations


Presentation on theme: "Microcomputer 1 Final Phantom Speakers Patrick Marinelli Matt Hopkins."— Presentation transcript:

1 Microcomputer 1 Final Phantom Speakers Patrick Marinelli Matt Hopkins

2 Project Abstract The main concept of the project was to create multiple configurations of phantom speakers in order have a rotational effect. The project would correspond with the speaker configurations with the LED’s of the board. Each speaker configuration was hard coded with exponents for a rough estimate of where they would be.

3 Phantom Speaker Configuration

4 Merging Labs 4 and 9 We had to have all the included header files and variables We also had to configure the IVG to have all three ISR void Init_Interrupts(void) { // Set Sport0 RX (DMA1) interrupt priority to 2 = IVG9 *pSIC_IAR0 = 0xffffffff; *pSIC_IAR1 = 0xffffff2f; *pSIC_IAR2 = 0xffff5ff4; // This allows for space for the timer // assign ISRs to interrupt vectors // Sport0 RX ISR -> IVG 9 register_handler(ik_ivg9, Sport0_RX_ISR); register_handler(ik_ivg12, FlagA_ISR);// FlagA ISR -> IVG 12 register_handler(ik_ivg11, Timer0_ISR);// Sound before time before flags // enable Sport0 RX interrupt *pSIC_IMASK = 0x00090200;//also to enable FlagA }

5 Merging the LED’s and the Sound //LED 4 Plays if(*pFlashA_PortB_Data == 0x01) { iChannel0LeftOut = iChannel1LeftIn; iChannel0RightOut = iChannel1RightIn; iChannel1LeftOut = iChannel1LeftIn; iChannel1RightOut = iChannel1RightIn; }

6 Stopping the Timer We had to figure out a way to stop the timer in order to show each speaker configuration. By setting the period = to 0 it basically froze the clock timer and stopped the scrolling of the LED’s We used the code: *pTIMER0_PERIOD= 0x00000000;

7 Creating a counter with PF8 button if(*pFIO_FLAG_C == 0x0100) { if(counter<7)//toggles master counter between 1 and 0 { counter++; } else { counter=0; *pFlashA_PortB_Data=0x00; } *pFIO_FLAG_C = 0x0100;//reset flag

8 Creating a Case Value for each counter value This is an example of what happens with each counter value. We had trouble using if statements for all, so else if was used. if(counter==1) { *pTIMER0_PERIOD= 0x00000000; //TIMER_ENABLE= 0x0001; *pFlashA_PortB_Data=0x01; } else if(counter==2) { *pTIMER0_PERIOD= 0x00000000; //TIMER_ENABLE= 0x0001; *pFlashA_PortB_Data=0x02; }

9 Setting up speaker configurations We did this for all the LED’s void Process_Data(void) { //LED 4 Plays Front Left if(*pFlashA_PortB_Data == 0x01) { iChannel0LeftOut = iChannel1LeftIn *2; iChannel0RightOut = iChannel1RightIn; iChannel1LeftOut = iChannel1LeftIn; }

10 Known Errors  When trying to divide our audio inputs by a half to help increase the effect of the phantom speaker we in turn turned if off. Which was not what we originally intended. We wanted the speaker volume to be halved.  We also were unable to restart the timer. We tried to reinitialize it, but it did not work.

11 Possible improvements Some improvements that we would like to see happen is to in turn increase the amount of buttons we can push. There are only 4 buttons we can push, but ideally I would like to rework the code so that if for instance we were to set values to PF9-PF11 that if we push PF8 It would open up a second set of options for PF9- PF11, and so on, so that we may add additional functions to the buttons. One of the benefits of merging Lab 9 was that it incorporated the IIR and FIR filters and their coefficients which were unused in the program, but allows for expansion. We also noticed that if we decreased the DAC_Volume values the was more of a clean sound. Finding the true values for the coefficients, which would really depend on the room they were placed in.

12 Questions and Answers Q&A


Download ppt "Microcomputer 1 Final Phantom Speakers Patrick Marinelli Matt Hopkins."

Similar presentations


Ads by Google