Unformatted text preview: BlackAn The Blackfin Analyzer
by Jacob Zurasky and Paul Deffenbaugh Project Goals Display oscilloscope view of audio on TV screen Compute and display Fourier Spectrum on TV Tasks Sample Audio Data Compute Fourier Spectrum Update Video Memory Display Video Memory Displaying Graphics Memory requirements One Frame =  elements Two frames required to buffer video output Active area on TV is 310 x 212 pixels Video Memory SDRAM holds first frame at 0x0000 0000 Second frame at 0x000D BF24 DMA0 sends data through PPI Video Codec creates the TV signal SDRAM Problems Writing to SDRAM interrupts reading This causes video glitches Corrupts the timing of data sent to codec SDRAM Solution We found that 14 pixels can be written at the end of each TV line sent This method allows for 5252100 pixels to be written per frame sent to the TV SDRAM Solution 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 State 0 Fill audio buffers Capture 310 audio samples at 48 kHz This is the width of the TV screen State is changed to 1 upon completion State Machine State 1 Process audio data Compute the DFT if necessary for display Set to state 2 upon completion State Machine State 2 Plot data to video memory 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 State Machine 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 The switch must occur while the DMA is disabled and after completing a frame State Machine State 4 Blank the previous video buffer The buffer not being displayed now must be cleared for new data Write black pixels over the old data Reset back to State 0 Sampling Audio Data DMA1 uses SPORT0 to receive audio data DMA2 uses SPORT0 to transmit audio data Sampling Audio Data On interrupt, if State = 0, fill audio buffers Audio_BufferL and Audio_BufferR Collect 310 samples of audio Compute the DFT Using this definition, the DFT is computed Compute DFT Sine and Cosine factors are precomputed This greatly improved the speed of DFT The lookup tables had to be implemented in SDRAM Plotting Data to TV There are 4 display modes Left channel oscilloscope Left/Right channel oscilloscope DFT Left channel oscilloscope and DFT Plotting Data to TV The data is scaled depending on the mode Data is plotted pixel by pixel at the end of each line sent to the TV Video buffers are swapped once complete Changing Display Modes Can only occur at the end of a frame Both video buffers must be cleared Then change the display mode flag Future Improvements Add a title screen from a bitmap image Fine tune the DFT results and scaling More display modes Questions? Please email us at [email protected] [email protected] ...
View Full Document
- Fall '10
- DFT, Pixel, Computer display standard, audio data