The event that finally pushed me
over the edge and down this
slippery slope was I saw an ad for a
microcontroller development kit
from Texas Instruments (TI) called
the eZ430-F2013 that could be
had for $20 plus shipping. At first I
didn’t believe it was possible. I
thought the ad was a misprint but it
wasn’t. That did it. I had to have
one. It turns out this development
kit is an incredible deal, perfect for
experimentation with what turns
out to be the “world’s lowest
power” microcontroller family. A
$20 development kit does truly
bring microcontroller programming
and experimentation to the
masses. See the sidebar for more
information about the eZ430-
F2013 development kit.
Then the only question was,
“What will I do with it?” It turns out
the answer to this question came
about as fast as the development
kit came in the mail. For years, I
have wanted to design a state-of-the-art color organ similar to the
ones I built in my younger days, but
this time do it to the extent
possible in the digital domain
(instead of the analog).
For those not familiar with
what a color organ is, it is a device
that splits music up into numerous
frequency bands and modulates
colored lights according to the
musical content. Typical color
organs are three or four channels
with one color of light associated
with each frequency band. With a
color organ, you can see the music,
as well as hear it.
Further fueling the desire for a
state-of-the-art color organ was the availability
of inexpensive super bright LEDs. The color
organs I built in the past used incandescent
lights which introduced a time lag into the
musical response as the light’s filaments had to
heat up and cool down. If LEDs were used
instead, not only would this time lag be
eliminated, but due to the life expectancy of
today’s LEDs, you would probably never have
to replace one.
So, I had my development kit in hand
which included a bunch of documentation, a
single target board, an emulator, C compiler,
assembler, linker, and debugger and I had my
idea of building a digital color organ. Could
TABLE 1. MSP430-F2012 CAPABILITIES
Clock speed Up to 16 MHz with many instructions executing in one clock cycle.
Flash memory 2K bytes
A 10 bit ADC is onboard with built-in voltage references.
TimerA can be configured for pulse width modulation that can
be routed to selected pins of the device.
TimerA and a watchdog timer are onboard. The watchdog
timer can be used as an interval timer if the watchdog function
isn’t required by the application.
Claimed to be the world’s lowest power device.
A single eight bit port is available with individual control over
direction and function of each pin in the port.
Hardware Multiplication No
TABLE 2. APPLICATION REQUIREMENTS
At least four This would require at least four digital filters to achieve. The
channels of filters would need to be at least third order for adequate
frequency selective separation between channels. Digital filters require floating
lighting control point arithmetic for their implementation.
Noise gate A noise gate will be required to eliminate room and/or circuit noise in the absence of musical material.
An automatic gain control (AGC) is needed to allow the color
AGC organ to adjust itself to changes in musical content. I didn’t
want any user controls being necessary.
I wanted a built-in microphone with preamp in addition to
a stereo line input for direct connection of the color organ
Audio inputs to any sound source. An analog-to-digital (ADC) converter is a requirement of the microcontroller used. The ADC converts
the mic or line analog signals into digital samples for
processing by the microcontroller.
I wanted to drive at least 10 super bright LEDs per channel
for the size display box I had in mind. This equates to about
Output lighting 200 mA output drive capability per channel. The application
required PWM capabilities so the brightness of the LEDs in
each channel could be controlled independently.
Multiple hardware timers would be required for control of
functions internal to the color organ. This includes display
sequencing and PWM generation.
my grandiose idea be implemented on such a
small microcontroller? My initial answer to
this question was a definite maybe. Take a
look at Tables 1 and 2 and let’s compare
the capabilities of the MSP430-F2012
microcontroller to the requirements of my
application and see.
After contrasting the controller’s capabilities with my application’s requirements, it
was immediately apparent that if all of the
required functionality were going to fit in
the Flash memory, the overhead imposed by
use of a high level language (HLL) could not
be tolerated. This was true both in terms
of the space required by a runtime library
September 2007 59