We have a platform based around the LPC1313 -- 72Mhz M3. This, and many other microcontrollers with similar specs look limited to 10 or 12 bit A2D.
If I want to sample single channel 16 bit (16kHz) audio, what are my design options?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
At a system design level, there are four basic ways to do audio:
The first is to use the onboard ADC and/or DACs included with your microcontroller. On your LPC1313, you don't have a DAC; you'd have to upgrade to an LPC17xx to get this. You could also choose a different controller (scrap the LPC1313) which has the required onboard peripherals. This is a good choice if audio quality isn't a big deal for your project, space is a major constraint, and your processor has the required peripherals. This isn't a good choice if audio quality is extremely important, if you can't change microcontrollers. I'm not sure what your target application is, but if you're doing anything other than reproducing music, the 12-bit ADC on the LPC1313 should be fine.
The second would be to use a microprocessor which has the required peripherals as a slave processor, and communicate with the master over SPI or other protocol. This is a good idea if you need to do some preprocessing of your audio and your host doesn't have the bandwidth to do so: even cheap DSPs can efficiently and transparently do basic filtering before your host sees the data. This isn't a good idea if you're space or cost constrained, you'll likely waste a lot of silicon and board space on unused components on the slave chip. Parts like the Analog Devices ADAU17xx line blur the distinction between DSPs and codecs; an ADAU1781 would be a good choice for an audio frontend controller.
The third method is to build your own from discrete ADCs, DACs, and op-amps. This gives you the best control over the results, and if you want to spend the money you can build a 'perfect' system, but it's going to be difficult and expensive. You may be able to find an ADC specifically designed for audio, TI has 18 dedicated to this purpose.
The fourth and IMO best solution is to use a dedicated audio encoder/decoder. This type of chip is known as a "codec". The chip will integrate ADCs and DACs which are ideally suited for stereo audio into a single package, and you can address it over a serial link from your microcontroller. You may or may not need an amplifier, depending on your output. Examples would be parts like the NXP UDA1344 or the TI AIC3104. These are almost always a good choice, because they're simple to design for, conserve board space over discrete components, and offer very high quality. There's probably a codec chip in most of the audio devices you use. They can be expensive (though not when compared to an equivalent-quality system), and they don't do much without a dedicated host processor, but they're the standard choice.
Incidentally, one thing worth noting about digital-to-analog converters is that while a 16-bit converter (ADC or DAC) should in theory have a ~90dB signal-to-noise ratio regardless of signal content (with more than one LSB of noise, one may as well have a 15-bit or smaller converter), a lot of converter chips designed for things like PC audio have characteristics that will vary with the signal being produced. For example, when gain is set for one volt full scale, they may be able to reproduce a 1mv signal with only 0.05mV of noise or other deviation from "ideal", but when reproducing a one-volt signal, there may be more than 5mV of noise or deviation. When sampling or generating audio for the purpose of having someone listen to it, such behavior is probably fine. It may be problematic, however, if you are intending to use an audio-frequency signal for other purposes.