Channels ▼

Embedded Systems

Interfacing Processors to Audio and Video Devices

Audio in, audio out
Connecting an audio source to the DSP is a fairly straightforward interface task. Figure 4 shows an example where a microphone's analog output is converted to digital through an A/D converter. Working as the master device, the DSP selects the A/D as an SPI slave peripheral. Data then gets transmitted using three of the four Blackfin SPORT pins in the receive direction. The reverse case shown in Figure 5—connecting the processor to a D/A converter—is equally easy. Again acting as the SPI interface master, the processor configures and controls the converter, with the data flowing in the other direction over the I²S SPORT interface to the D/A. The analog output subsequently feeds a speaker.

(Click to enlarge)

4. Connecting an audio A/D converter to an embedded processor

(Click to enlarge)

5. Connecting an audio D/A converter to an embedded processor

Audio interface tips and tricks
A few quick reminders will make an already easy application even easier. On the processor's TWI, it is important to remember to put pull-up resistors on both SCL and SDA lines, per the I²C specification. This is important because these pins are never actually driven high. (For that matter, you should use proper termination for all clock and your frame sync signals). And on the SPI, check that all MISO pins are connected to MISO pins, and MOSI pins to MOSI pins. Because the two signal names are very similar, it's easy to mistakenly swap the signal names and functionality.

A good way to simplify development is to take advantage of a vendor's device driver suites. For instance, the ADI VisualDSP++ tool suite includes peripheral device drivers for SPI, SPORT, TWI and others, that facilitate the configuration and control of these interfaces (via a standard API).

Also, a vendor's hardware platform offerings can be indispensable for evaluating and developing an embedded processing solution. For example, the Blackfin EZ-KITs and associated EZ-Extender cards come with integrated converters and numerous code examples. These offerings provide a useful framework for quickly learning how to interface audio to Blackfin devices. As another example, ADI's VisualAudio algorithm development tool helps streamline the design of audio systems using the Blackfin processor.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.