Archive

Posts Tagged ‘LED’

LED based graphic equalizer for xmms

September 18th, 2008

I was recently looking at a how-to to create visualization plugins for xmms.(http://www.xmms.org/docs/vis-plugin.html) And suddenly I had this idea of interfacing 8 LEDs to re-create a ‘Hardware’ graphic equalizer of sorts.

Well, I had my 8051 development system at my disposal and I started hacking onto my code immediately.

First, I tried to get my development environment ready for writing my plugin. Unfortunately, when I followed the steps in the above tutorial, I was getting a compilation error and I was not able to build my plugin code. So I aborted that line of attack.

Then I had this idea of downloading and then compiling xmms and along with that, hopefully my environment would also get set up. And sure enough! I just compiled xmms after downloading and there it was, all the default plugins were compiled. Now all I needed to do was cannibalize one of the available plugins and write my code over it.

I picked up sanalyzer(or simple spectrum analyser) and after a few hacking sessions, I was able to come up with the code for my plugin.

Next, I had to write the assembly code for my AT89S52 micro. This was a very simple program where I have simply read the data from the serial port and then dumped the same data over the PORT1 of the micro.

And with the breadboard, It just took another few minutes to rig a temporary LED graphic analyzer. One obvious thing missing in this equalizer is that rather than render all the 16 frequency components, it renders only 1 component. This is because, I had only 8 LEDs with me, and would need extra acrobatics to come up with a complete 16-channel equalizer. (Well, to tell the truth, I was damn sleepy as it was 2 AM in the morning, and I just wanted to see it work before I went to bed)

So with the hardware of 8 red LEDs connected to my PORT1 of the micro, and the plugin compiled and ready for xmms and my PC serial port connecting my micro and my plugin, I was all set to go!

So there it was! It worked! Of course, there were a few hiccups but those were ironed out easily. At last, I went bed a satisfied man, with the assurance that I created something nice, if not useful :-).

Here is a youtube video of the same. Do post in your comments. I shall post my other creations over here soon.

admin Embedded Hobbyist, My Creations, Tech , , , , ,