Presentation is loading. Please wait.

Presentation is loading. Please wait.

– BlackAn – The Blackfin Analyzer by Jacob Zurasky and Paul Deffenbaugh.

Similar presentations


Presentation on theme: "– BlackAn – The Blackfin Analyzer by Jacob Zurasky and Paul Deffenbaugh."— Presentation transcript:

1 – BlackAn – The Blackfin Analyzer by Jacob Zurasky and Paul Deffenbaugh

2 Project Goals Display oscilloscope view of audio on TV screen Display oscilloscope view of audio on TV screen Compute and display Fourier Spectrum on TV Compute and display Fourier Spectrum on TV

3 Tasks Sample Audio Data Sample Audio Data Compute Fourier Spectrum Compute Fourier Spectrum Update Video Memory Update Video Memory Display Video Memory Display Video Memory

4 Displaying Graphics Memory requirements Memory requirements One Frame = [1716][525] elements One Frame = [1716][525] elements Two frames required to buffer video output Two frames required to buffer video output Active area on TV is 310 x 212 pixels Active area on TV is 310 x 212 pixels

5 Video Memory SDRAM holds first frame at 0x0000 0000 SDRAM holds first frame at 0x0000 0000 Second frame at 0x000D BF24 Second frame at 0x000D BF24 DMA0 sends data through PPI DMA0 sends data through PPI Video Codec creates the TV signal Video Codec creates the TV signal

6 SDRAM Problems Writing to SDRAM interrupts reading Writing to SDRAM interrupts reading This causes video glitches This causes video glitches Corrupts the timing of data sent to codec Corrupts the timing of data sent to codec

7 SDRAM Solution We found that 1-4 pixels can be written We found that 1-4 pixels can be written at the end of each TV line sent This method allows for 525-2100 pixels to This method allows for 525-2100 pixels to be written per frame sent to the TV

8 SDRAM Solution We changed the DMA0 interrupt to trigger We changed the DMA0 interrupt to trigger on the completion of inner loop (each line) State machine decides what pixels need to be written and blanked at the correct time State machine decides what pixels need to be written and blanked at the correct time

9 State Machine State 0 – Fill audio buffers State 0 – Fill audio buffers Capture 310 audio samples at 48 kHz Capture 310 audio samples at 48 kHz This is the width of the TV screen This is the width of the TV screen State is changed to 1 upon completion State is changed to 1 upon completion

10 State Machine State 1 – Process audio data State 1 – Process audio data Compute the DFT if necessary for display Compute the DFT if necessary for display Set to state 2 upon completion Set to state 2 upon completion

11 State Machine State 2 – Plot data to video memory State 2 – Plot data to video memory At the end of each line sent, draw a new pixel At the end of each line sent, draw a new pixel to the video buffer not being displayed When all current plotting is complete, switch to State 3 When all current plotting is complete, switch to State 3

12 State Machine State 3 – Swap Video Buffers State 3 – Swap Video Buffers At the end of a complete frame (DMA outer loop), the DMA start address is set to the other video buffer in SDRAM At the end of a complete frame (DMA outer loop), the DMA start address is set to the other video buffer in SDRAM The switch must occur while the DMA is disabled and after completing a frame The switch must occur while the DMA is disabled and after completing a frame

13 State Machine State 4 – Blank the previous video buffer State 4 – Blank the previous video buffer The buffer not being displayed now must be cleared for new data The buffer not being displayed now must be cleared for new data Write black pixels over the old data Write black pixels over the old data Reset back to State 0 Reset back to State 0

14 Sampling Audio Data DMA1 uses SPORT0 to receive audio data DMA1 uses SPORT0 to receive audio data DMA2 uses SPORT0 to transmit audio data DMA2 uses SPORT0 to transmit audio data

15 Sampling Audio Data On interrupt, if State = 0, fill audio buffers On interrupt, if State = 0, fill audio buffers Audio_BufferL[] and Audio_BufferR[] Audio_BufferL[] and Audio_BufferR[] Collect 310 samples of audio Collect 310 samples of audio

16 Compute the DFT Using this definition, the DFT is computed Using this definition, the DFT is computed

17 Compute DFT Sine and Cosine factors are pre-computed Sine and Cosine factors are pre-computed This greatly improved the speed of DFT This greatly improved the speed of DFT The lookup tables had to be implemented in SDRAM The lookup tables had to be implemented in SDRAM

18 Plotting Data to TV There are 4 display modes There are 4 display modes Left channel oscilloscope Left channel oscilloscope Left/Right channel oscilloscope Left/Right channel oscilloscope DFT DFT Left channel oscilloscope and DFT Left channel oscilloscope and DFT

19 Plotting Data to TV The data is scaled depending on the mode The data is scaled depending on the mode Data is plotted pixel by pixel at the end of each line sent to the TV Data is plotted pixel by pixel at the end of each line sent to the TV Video buffers are swapped once complete Video buffers are swapped once complete

20 Changing Display Modes Can only occur at the end of a frame Can only occur at the end of a frame Both video buffers must be cleared Both video buffers must be cleared Then change the display mode flag Then change the display mode flag

21 Future Improvements Add a title screen from a bitmap image Add a title screen from a bitmap image Fine tune the DFT results and scaling Fine tune the DFT results and scaling More display modes More display modes

22 Questions? Please email us at Please email us at jzurasky@fit.edu jzurasky@fit.edu jzurasky@fit.edu pdeffenb@fit.edu pdeffenb@fit.edu pdeffenb@fit.edu


Download ppt "– BlackAn – The Blackfin Analyzer by Jacob Zurasky and Paul Deffenbaugh."

Similar presentations


Ads by Google