HARDWARE
Failure
is a new success. When I originally built the
audio player, I didn’t have enough RAM, and
I failed to fully address the problem at the
time. Fortunately, I eventually came up with
a solution.
For
this project, there are a few requirements for
the microcontroller. You need at least 40 KB
of flash memory and at least 40 KB of RAM. You
also need one SPI for the SD card interface,
a fast SPI capable of handling at least 16-bit
data for the I2S interface, and one UART or
other communication channel for connecting to
an external system. A few different microcontrollers
will work. Philips’s LPC2148 and Atmel’s AT91SAM7S256
are the most popular. The latter has an SSI
module with built-in I2S mode. The Philips microcontroller
has a Texas Instruments DSP mode. It’s no surprise
that most audio codecs from Texas Instruments
support its data interface with a glueless interface
to the SSP on the LPC2148 microcontroller. For
more generic solutions, you have to modify it
to use the I2S. For that purpose, I’ve used
some of the microcontroller’s modules: Timer1
in Counter mode (with external input and output
to provide LRCK for DAC) and PWM to generate
MCLK for the audio DAC.
If
you want to use an operating system in your
application, then you’ll need an extra timer.
If your application has any other user interface,
you might need some extra I/O ports.
Two
extra prototype boards were attached to the
Olimex LPC2148 evaluation board. Let’s take
a closer look at each one.