TRAXMOD is a lossless, portable digital audio player using the
Microchip PIC32
high speed microcontroller chip (an older version used the NXP LPC2103
ARM7TDMI). Currently, TRAXMOD-PIC32 can play raw and FLAC wave audio
streaming off of a FAT formatted MMC/SD Card at 44100Hz, 16 bits, stereo
using a Burr-Brown PCM1770 DAC with
integrated headphone amp. The old breadboarded TRAXMOD-ARM can
play raw wave audio and 4 channel MOD files streamed off of a FAT
formatted MMC/SD Card. Multichannel MOD playback is a future goal for the
TRAXMOD-PIC32 player.
For more information about TRAXMOD, please read the FAQ.
To see the TRAXMOD-ARM player in action, check out
our YouTube demonstration video. Firmware
source code, schematic diagrams, and board layout files can be found
in the Developer's Area.
News
03-24-2009
Firmware v0.7.15 released. A few minor bug fixes here and there. Nothing
major.
Spent a whole week trying to route a new PCB for the next hardware
revision, but still not done. This new hardware revision will have a
new power supply that is software controlled (hopefully it doesn't blow
up on me). Using a manufactured double layer PCB, it will
have a really tiny form factor so that the player can fit inside a
AA battery enclosure. And it may finally have a little LCD to navigate and
view song comments. Currently missing are surface mount LEDs
for backlighting the LCD, physical clearance testing, copper fills, and
of course, trying to pass DRC. And maybe some software testing on
the existing hardware to verify that we can really bit-bang the DAC/LCD
SPI this time instead of having to multiplex and route the MMC/SD Card SPI
signals all over the board.
03-08-2009
Firmware v0.7.14 released.
Fixed bug in MOD player code that would let a Note Delay effect attempt
to play a sample number that does not exist in the MOD file. This was causing
the player to crash on certain MOD files.
Fixed bug in MOD player that was overwriting sample finetune settings
with 0. This caused notes in some MOD files to play at the wrong frequency.
Moved all statically allocated MOD player variables to heap memory. This
allows the other players (FLAC, etc) to use all available RAM like they had
back in v0.7.12.
Modified the FLAC decoder to generate decoded sample data in interleaved
channel format instead of two separate output buffers for left and right
channels. Eventually, this may allow us to improve the FLAC player by using
the audio playback ring buffer directly in the decoder. Still need to add
support for ring buffering in the decoder before that can happen though.
03-01-2009
Firmware v0.7.13 released. This release adds some working, but
poor MOD playback functionality to the PIC32 firmware. This firmware is
basically a port of the old C only code from TRAXMOD-ARM v0.5, which does not
do any streaming of sample data off of the SD Card. As a result, it can only
play small MOD files where sample data fully fits inside the small 30KB of free
RAM inside the PIC32. It has lots of bugs, but at least it makes sounds now.
02-15-2009
Firmware v0.7.12 released.
Reverted some of the DMA code back to v0.7.8
code. For some reason, 16-bit audio transfers to the DAC cost about 2.5mA
more current than using 32-bit audio transfers, even though that reduces
the audio buffer size by 50%.
Gapless playback when playing across raw wave audio files is sometimes
working now. We can still get hosed by EFSL slowness, but often times it does
work. Only works when transistioning between files of the same type
(switching between raw audio and FLAC compressed audio does not work
gaplessly). Since FLAC leaves so little memory for the audio buffer,
gapless playback across FLAC files probably does not work very often right
now (if at all).
Total power consumption for the whole device, excluding power supply
losses, using my best Dane-Elec 2GB SD Card is: 15.5mA at 3.3V for raw audio
and somewhere around 31mA for FLAC compressed audio. Using these numbers, my
calculations indicate that a pair of 1000mAH AAA NiMH batteries could
theoretically last up to 24 hours playing FLAC files, and up to 46.9 hours
playing raw audio. Of course, real life is probably less than this, due to
losses in the switching power supply (which I haven't measured) and due
to most SD Cards drawing far more power than the Dane-Elec 2GB and Toshiba
2GB SD cards.
There is lots of room for improvement in the FLAC power consumption, but
even at this point we've got pretty good performance in my opinion. I
measured the power consumption of a cheap $9 Emprex MP3 SD card player
I've got, and my calculations indicate it would only last about 8 hours
on a single AAA (it only accepts one AAA battery). Even if you doubled that
for two batteries, 16 hours is still worse than our 24. I wonder how power
efficient more expensive players are. Anyone know?
02-08-2009
Firmware v0.7.11 released:
Play/Pause works when playing FLAC files.
Repeat mode works when playing FLAC files.
Switching files early while playing FLAC files no longer stutters.
Power management code added to FLAC playback loop. Still draws
a lot of power (around 25mA), but its a start.
02-03-2009
Firmware v0.7.10 released in the Developer's Area. This release adds
support for FLAC files encoded with "-blocksize 2048" (or less). Some
restructuring of the FLAC decoder software was begun for the goal of
reducing memory requirements low enough for possible 4096 block size
support at some point in the future. Not there yet, still a long way to
go.
This release brings forward all of the old MOD player source code from
the TRAXMOD-ARM firmware. While the code does compile, MOD playing is not
working yet as there is still some missing MMC/SD Card streaming routines
that haven't been written for the PIC32 port yet. And the inline
assembly language mixer code of course needs to be re-written for
MIPS architecture.
01-25-2009
Firmware v0.7.9 released in the Developer's Area for TRAXMOD-PIC32. This
release adds the first working FLAC playback support! Totally unoptimized
and plenty buggy controls, but it's great to have it up and running.
Currently, only supports 44.1KHz/16-bit FLAC files encoded using the
"-blocksize" setting of 1024 or lower. Larger block sizes consume too much
RAM to work right now. Since FLAC is lossless, you can easily transcode your
existing files to 1024 blocksize without any loss of quality, you just
get a slightly lower compression factor.
This release features a new SPI DAC left/right clock synchronization routine
that modulates the SPI CKE clock edge setting, forcing the SPI shift buffer
over until we read a perfectly aligned left/right clock signal on the SDI
input pin. Previously, we didn't attempt any forced synchronization
to the DAC left/right signal -- instead we relied on the DAC and SPI to stay
in sync from power on reset. Unfortunately, that always left the SPI off
by one bit, which we compenstated for by shifting audio data over one bit
before sending it to the SPIBUF. To accomodate that shift, we had to use
a 32-bit audio buffer, even though we really only have 16-bits of
actual data. Now that the SPI is perfectly aligned with the DAC, we can
use a 16-bit audio buffer, effectively doubling the apparent amount of RAM
for audio buffering.
I spent a lot of time trying to make this version play raw audio
gaplessly when switching files, but ultimately gave up. Its better than
last verison, but still has an occassional pop when switching files. EFSL
takes too much time between files for it to work right now. We either
need to re-write parts of EFSL for greater speed or start loading
information about the next song while the current song is still in the
middle of playing. Both are big projects that aren't worth the effort
right now.