This has yet to be my most complex Tutorial and I hope not the final one...I call it Audio Filter control. In fact it is many things in one. I have finally achieved UART immortality by being able to control everything from it. I can turn LED on and OFF. Set the BLINK Rate among many different rates, turn Audio ON and OFF and lastly, turn a Cross-Over filter ON or OFF. You might want to turn the LED OFF while the filter is executing or you might get weird feedback. I guess I'm not perfect, so nothing is stopping you from correcting my quickly written code that included the work of brilliant people here on the Forum. @PatrickG and @UweS to mention a few great minds...Lets move on, shall we ?!
This example can be a bit daunting, but it is really quite simple even underneath the surface. I have used Will Pirkle's excellent software called RackAFX to test my prototype whose simple parameters are passed passed in at the console. The only commands you need to know in this incarnation of the software are really: aud on / aud off /filt on / filt off.
Check out my other indepth tutorials for the other commands which are clearly obtained by typing term at the PUTTY terminal i.e.
The terminal is very self explanatory, so go ahead and experiment with the different terminal commands. The neat thing in this version is that you can simply engage a mode of the terminal that works for you by commenting or un-commenting one line at the top of the source! If you used the definition as you see below, it means you are running UART as DMA interrupt device. If you comment the line out you are only running interrupts RX and TX without DMA. The choice is yours!
// Comment out #define USE_UART_DMA to only engage UART in interrupt mode!#define USE_UART_DMA
One you turn audio on via terminal command aud on you are on your way to play around with various instruments to feed audio into the line intput port and feed the output port to a scope, or head phones...
while the aud on or filt on is immediately typed at the PUTTY terminal console, you should see something on your scope that looks similar to either an audio signal passed in or perhaps an oscillator pulse from RackAFX.
If you engage UweS cross-over FIR filters, it can be done with filt on / filt off.
I hope you found this tutorial useful. Let me know how it works out for you. As always I have attached the source code for it. If you can improve it and make it better also let me know how! I will evolve the terminal so that filter coefficients can be passed in automatically from a graphic environment. More on this later...
Thanks for sharing your thoughts here
Sure thing! I enjoy writing these tutorials for learning purposes...Cheers, Mario
Is there anything useful for me to start programming an equalizer, which is based on the IIR filter, on the BF706 platform. I found a book named "embedded signal processing with the micro signal architecture", and I can't get access to the tutorial for IIR graphic filter. So sad!
Why is it sad ? I found the exercises in a zip file on the author's page...You will have to do the porting yourself and I clearly show you how in my console examples...Sounds like a case of someone that is not willing to try and expand a little time and effort and wishes for everything to be handed to them ready to go. That book is clearly worth its weight in gold, but you have to expand a bit of effort to figure out how to port from the BF537 or BF533 platforms which I clearly have done for you in all of my port examples. I have already ported for you some of the harder stuff to deal with such as the buttons which don't exist on the BF706-EZMINI. The DMA for the SPORT has already been dealt with in prior examples from @PatrickG, @UweS and myself. I actually went one step further and bought the BF537-EZMINI so that I can work with the book in its native format. Almost all of the examples import into Cross-Core Embedded Studio from their native Visual DSP++ format. I have gone through a solid two dozen examples and had no issues for the most part running inside the modern coding environment from ADI. Let me know if you need more suggestions. If you are asking me to port it, it might take me a little while to do it, but I'll gladly help, but it might take a week, since I've been sick for a bit.
Book Source Code