microcontroller for simple audio project

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
hi, i'm looking for a uC for a simple portable audio project.  the
basic specifications i'm looking for are:

- 8/16 bit datapath
- hardware multiply (8x8 ok, more bits the merrier)
- 20+ MHZ instruction execution
- onboard flash/SRAM (8kbytes+ FLASH, 1kbyte+ SRAM)
- onboard DAC (mono ok, stereo better)
- free build tools
- cheap!

right now i'm looking at the SI Labs C8051F330.  it's right at the low
end of most of my criteria, but it's the only inexpensive uC ($4.27
quantity 100) i've seen with an onboard DAC.  does anyone out there
have experience with this part?  also, is there something else i should
be looking at?  SI Labs have some larger FLASH variants (for example
the C8051F017) but they sell for $12 in similar quantities, so that's
out.  the atmel AVRs are appealing for a number of reasons, but they
don't have a DAC.  anyone aware of a cheaper option than the C8051F330
for a full uC/flash/DAC system?  is there a good very cheap DAC one
could easily interface with an AVR?

i'd love to use a DSP, but i believe they're just too pricy and don't
come with the level of integration i need.  feel free to prove me wrong
on this assumption.

thanks a lot for the help!


Re: microcontroller for simple audio project

Quoted text here. Click to load it

I use some of the higher end SI-Labs parts and am relatively happy with
them. One thing to watch out for: The 'free' compiler that comes with the
development kit is only good up to 4K of code. The uncrippled version is
over a KBuck.


Re: microcontroller for simple audio project
thanks for the warning and the info.  if i choose an 8051 i'll probably
use SDCC (or another free compiler, any advice?) for development

Re: microcontroller for simple audio project

Quoted text here. Click to load it

Theres a huge choice out there. What resolution DAC were you looking
for? 16 bit audio grade might be pushing it a bit!

TI have their MSC series, 33MHz 32KB Flash, 1.2KB RAM. Not sure what
their dev tools are like though, and I think the DACs are only 8 bit.

What about Analog Devices  ADUC841? 20MIPS 62KB Flash, 2304bytes RAM,
built in 12 bit ADCs and DACs $6:56

I'm not sure that an 8052-based system will have enough power for an
audio app, so something like the the Analog Devices ADUC702x ARM based
chips might be better: 45MIPS 62KB Flash 8KB RAM, 32 bit Multiply
(also has 12 bit ADCs and DACs).

They seem to be having production problems with this family though, as
it was announced in August but production quantities aren't yet

Continuing on up the ARM scale, Atmel have a wide choice of devices,
most of which have more horsepower and memory than you specify. Not
many have a ADC/DAC built in, but there is a huge range of converters
out there to choose from.


Re: microcontroller for simple audio project
thanks for the reply!

DAC resolution:  basically just something that matches the native
datatype of the processor.  since i'm pretty sure i'll be using an 8
bitter, 8+ bits of precision should be fine.

TI MSC:  hmmm, this might be worth looking into.  the MSC1202Y3 is
pretty similar to the SI Labs part i'm considering.  that said, i'd
rather not pick a TI part since i work for analog devices.  ;)

ADUC841:  speaking of analog devices, that one looks pretty good.  lots
of memory for the price.  if 8k FLASH won't cut it, this looks like a
viable option.

ADUC702x:  those look great, but i bet the price is going to be too
high.  plus there's that whole not existing thing to contend with.

atmel ARM7 uC:  i like these, but i think they were going to be too
pricy.  plus there's no integrated DAC and i'm trying to keep this as
simple as possible.

as for whether an 8052 will have the power for an audio app, i suppose
that really remains to be seen.  i have some synthesis code written for
an ADSP-218x DSP, need to try porting a bit of it to find out just much
i'll be able to get done.

Re: microcontroller for simple audio project
For audio outputs why not do it the way a cd does with a single digital output
through a low pass filter. This is the same as the sigma part of a sigma delta
You can get a surprising amount of resolution with just a single resistor and

The code to drive such a D/A is a few lines of C


ethan wrote:

Quoted text here. Click to load it

Re: microcontroller for simple audio project
i've thought about this, but am concerned about MIPS and power
consumption.  any idea on the processor overhead to implement this?  is
this something that could be implemented with PWM or a typical uC timer
allowing for very low overhead?  i want as many cycles as possible to
calculate new outputs, so i'd rather not be stuck shifting bits.  an
onboard parallel DAC seems like the easy choice, but since i'm trying
to be very cheap, i might not have the luxury of going the easy route!

Re: microcontroller for simple audio project
snipped-for-privacy@gmail.com says...
Quoted text here. Click to load it
Yes, this chore is something that many MCUs with a hardware PWM
capability could handle.  Changing the output voltage then becomes a
matter of storing the new value in a register.

The output sample rate is then limited by the timer clock rate and
the number of bits resolution.   For a timer with an 8MHz clock and
8 bits output resolution,  the  PWM period is 256 cycles, or
about  31,250 steps per second.  That, and the acceptable
distortion,  will limit your maximum output frequency.

If you only need 5KHz output response,  you could use a
slower clock speed or  more bits of resolution.  The PWM
generation will probably not be the limiting factor in
determining your maximum frequency.  It will take only
a microsecond or two to adjust the output.   You still
have to calculate the next output before the next
output sampling point.

Mark Borgerson

Re: microcontroller for simple audio project

Quoted text here. Click to load it

Somewhere ( Fujitsu ? ) was application note about using 2 PWM channels to
get 16 bit resolution,
"extra" hardware has 2 resistors, R for high byte pwm channel and 256*R for
low byte.


Re: microcontroller for simple audio project

Quoted text here. Click to load it

Just in case you aren't aware, Circuit Cellar issue 174 has an article
on using the 1MIP ADuC812 as a digital filter. Unfortunately their
single channel FIR/IIR filter has a Nyquist limit of 250Hz. The slow
multiply instruction seems to cripple it somewhat.


Re: microcontroller for simple audio project
Quoted text here. Click to load it


I think more useful information could be given if you said what this
'simple audio project' was.  What exactly does your micro need to
do with audio?



Re: microcontroller for simple audio project
sure no problem.  basically i'm looking to create an extremely simple
autonomous synthesizer.  waveforms would be generated through wavetable
synthesis (with linear interpolation if i can afford it) and others
through simple bitshifting algorithms and reading noise buffers.  there
will also be some simple FX (FIR filters and other more novel but cheap
functions), envelopes, and a basic sequencer.  as for sampling rate,
it's TBD.  i just need to be able to generate enough channels of audio
to make something interesting, then i'll set the sample rate as high as
my MIPS with allow.  no MIDI, at most some rudimentary interaction via
knobs or pushbuttons.  i've implemented all of this on a DSP (see
www.dspmusic.org or www.dsperado.com/chiclet for some info), but the
total manufacturing cost is going to be too high, so i need to move to
a uC.  i know i can make reasonably good music with a 33MHz ADSP-2181;
i'm hoping that if i cut some corners i can make something passable
with a 20MHz 8052.  ideally the processor would have a DAC and flash
onchip for lower system cost.  the DAC is proving to be the tough
request; only a couple manufacturers include them in low cost
processors.  once i start looking at things like a standard product
ARM7 the price difference between them and a DSP is pretty small, so
there's little advantage to port.  however getting a whole system on
chip (like the C8051F330) for ~$4 is quite enticing.

Re: microcontroller for simple audio project
Quoted text here. Click to load it

  Then start with the F330, and get it operating. If you have some time
headroom, but need more flash, the ADI family has obvious appeal to you...
  If when you are finished, you find more speed would help,
look at the upcomming C8051F410. 66MHz core, Dual 12 bit DACs,
up to 32K Flash, wide Vcc


  Perhaps include a SO8 SPI memory option, as the newest ones can read
continually up to 50MHz, and give some MBytes of storage.


Re: microcontroller for simple audio project
Quoted text here. Click to load it

wow the 410 looks great!  too bad it doesn't seem to exist quite yet.
any idea when this will be in production?  the advance datasheet is
dated almost a year ago (assuming they use DD/MM/YYYY nomenclature) -
not that that really means anything in the world of microprocessor

Re: microcontroller for simple audio project

This message is intended to be my own personal view and it
may or may not be shared by my employer Atmel Nordic AB
Quoted text here. Click to load it

May not meet you price tharget but the AT89C51SND2
has both MP3 player decompression and a DAC.
If you store lots of audio,
then the compression may allow you to save on memory.

You can use rsiastors or PWM to generate a DAC.
The new AT90PWM parts (which are hard to get) have
12 bit Resolution enhanced PWM  from a 64 MHz input source
which could be useful to generate a DAC.
The high frequency allows you to use small components..

The 5V ATmega88 should meet your requirements if you use an 8 bit port
and an external resistor ladder.

Best Regards,
Ulf Samuelsson
We've slightly trimmed the long signature. Click to see the full one.
Re: microcontroller for simple audio project
i'm looking more for audio generation as opposed to audio
decompression, so the AT89C51SND2 is probably out.  do you know of an
app note that explains how to use PWM to generate audio output?

the atmel AVRs are appealing for a number of reasons, i guess i need to
figure out if the DAC is a requirement or not...

Re: microcontroller for simple audio project
Quoted text here. Click to load it
Well, I don't know what your idea of cheap is, but you could look at the
Cirrus Logic EP9302, you need a lot of extra components, but these
things were designed for media output I believe.
Experimental boards from www.embeddedarm.com and other people are available.
This one in particular has a math coprocessor.
It really depends on where you want to expand to.

Re: microcontroller for simple audio project
Quoted text here. Click to load it
I think I reversed the spec, this thing has AtoD not Dto A.
Its a big chip, my guess is you don't want to bother with an operating
system either.

Site Timeline