Product Insight: Portable digital audio drives integration of more advanced analog features in microcontrollers

Whilst programmable analog may never attain the performance of the highest-end analog discretes, microcontrollers are beginning to take on more advanced analog functions. Haakon Skar, Atmel's marketing director for AVR32AP products, provides an insight into the company's16-bit DAC-endowed microcontroller, which tackles the digital audio space.

The standalone audio and multimedia player has dominated the digital audio market in recent years. Some vendors have tried to apply computer components in audio or multimedia players. But while excelling at their intended task of handling vast amounts of data in a multi-tasking computer, these components challenge the audio engineer with their relatively slow and unpredictable task switching and poor real time performance. Such systems suffer from high power consumption and demand significant overhead in central processing unit (cpu) speed before uninterrupted playback can be guaranteed. They also suffer from a poor level of integration; with most systems requiring three or four chips including the microprocessor, sdram, nand flash and audio codec.

Other vendors have adopted single chip application specific integrated chips (asics). Because traditional microcontrollers (mcu) offered only a fraction of the processing power required to decode the digital audio content, a custom MP3 or similar decoder was added to existing mcus. Portable audio player manufacturers have long viewed this solution as preferable because the single ic meant a smaller board could be designed. Another advantage to this solution was reduced power consumption, thanks to the digital signal processors (dsps) requiring a lower system clock speed and the elimination of the external memory busses. This in turn has enabled smaller batteries to be used. But while preferred for size and power consumption, this approach has proven risky because of the appearance of new standards and rapid shifts in consumer expectations – a new model could be outdated before the first shipments are made.

Atmel identified this as an ideal market for an off-the-shelf mcu with a cpu powerful enough to decode the audio content. This would offer the advantages of a single chip asic, but lack the risk of including hardware that would potentially become quickly outdated. In April 2009, Atmel launched the AT32UC3A3, a 32-bit mcu offering the required dsp performance, as well as a high quality audio decoder.

At the heart of the AT32UC3A3 is the AVR32 cpu core, which eliminates the need for the custom audio decoder hardware and is capable of decoding a stereo MP3 stream while strolling along just above 20 MHz. With a maximum speed of up to 72MHz, this means there is plenty of cpu performance left to handle 'heavier' audio formats such as AAC and AAC+. There will also still be plenty of performance left to run an operating system, and the necessary file storage and communication.

Of critical importance, however, is the stage after which the digital audio is decompressed; when the digital audio is converted to analog audio before it can be played back through the speakers. For stereo output, the AVR32 mcu offers a Hi-Fi stereo 16-bit bit stream digital-to-analog converter (dac). This requires only a small external power amplifier to generate the output voltages required for line, headphones or external speakers. Playback in four channel audio or full surround sound requires an external audio codec, which much be connected to the microcontroller's IIS interface.

The AT32UC3A3's 16-bit stereo dac provides a digital bit stream output optimised to match a low cost Class-D stereo amplifier. The dac comprises two 3rd order sigma delta d/a converters with an oversampling ratio of 128. Sampling is carried out with a 4th order Sinc interpolation filter (Comb4) before being input to the sigma delta modulator. In order to compensate for the pass band frequency response of the interpolation filter and flatten the overall frequency response, the input to the interpolation filter is first filtered with a simple 3-tap FIR filter. The total frequency response of the equalisation FIR filter and the interpolation filter meets the basic tone control requirements of standard audio equipment. The digital output bit streams from the sigma delta modulators should be low-pass filtered to remove high frequency noise inserted by the modulation process.

Correct analog filtering of the bit stream is required to achieve the best signal to noise ration (snr) quality. The dac output can be connected to a class D amplifier output stage, or it can be low pass filtered and connected to a high input impedance amplifier. The AVR32 dac enables very high carrier frequencies to be used, allowing use of a simple 1st order or higher low pass filter to remove frequencies above 50 kHz. The result is a good output capable of achieving good snr ratios.

While the AVR32 mcu has enough flash and sram to store the firmware, decode the audio, and buffer the communication, more on-chip memory is needed to buffer the audio content. The AVR32 offers a selection of memory storage options, the three most popular being sd/mmc cards, usb mass storage, or and nand flash.

An important feature for digital audio devices is the speed at which music and other digital content can be transferred in and out of the system. Streaming a single digital audio track may require a bandwidth of just 200kbit/s or less. But for applications with mass storage of an audio library, consumers demand faster communication in order to synchronise a large music library. For this purpose, the AVR32 AT32UC3A3 device has a high speed usb interface, and an mmc/sd port to support wlan over sdio. Designed with more than just the mainstream consumer device in mind, all AVR32 devices offer a selection of traditional usart, spi, and i2c interfaces, plus plenty of timers capable of running dc and stepper motors.

The high-speed communication interfaces offered by the AVR32 mcus means a single sram would quickly become the bottleneck of the system. Predicting this, Atmel has added four srams to the AT32UC3A3 – two offering dual port access to further speed up communication and avoid collisions. This ensures that the sram bandwidth doesn't limit transfer speeds throughout the system. And most importantly, it guarantees that audio playback quality isn't compromised when high speed communication is running in the background.

A multi-layer high-speed bus is the backbone of the AVR32. This allows the cpu and peripherals to share much more data every cycle by allowing simultaneous access between multiple masters and slaves. Exploiting the possibilities of the multi-layer bus, Atmel's engineers have split the main 128Kbytes sram of the AT32UC3A3 into three blocks, with each block given a separate memory interface to the bus. This allows up to three high-speed communication interfaces to access the sram simultaneously without waiting for data. Half of the sram is high speed sram embedded into the cpu itself, giving it dual port access performance. The other half is low power sram for which the cpu and peripherals share the available bandwidth.

The device's power consumption is less than 2.0mW/MHz, allowing this device to deliver more than 150 hours of audio playback from two AA batteries. In standby mode with only the real time clock running, a device can stay in the drawer for more than nine years.

Atmel has designed two reference designs named EVK1104 (AT32UC3A3) and EVK1105 (AT32UC3A0) to demonstrate the digital audio capabilities of the AVR32 microcontrollers. The kits demonstrate playback from usb mass storage device, sd card or nand flash, and also shows how music can be downloaded or streamed from a pc through the usb interface. An upgrade kit will add wlan, Bluetooth, and Zigbee rf connectivity to the kits in time.

Author profile: Haakon Skar, Atmel Corporation Marketing Director for AVR32AP products at Atmel.

Digital-to-analog Conversion is everywhere

0 comments on “Product Insight: Portable digital audio drives integration of more advanced analog features in microcontrollers

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.