Professional Documents
Culture Documents
This document extracts only the essential information from the manufacturers datasheet for the
Wolfson WM8731/WM8731L audio codec device. In its entirety, the full datasheet is long and
complex, and it includes descriptions of modes and functions that are not relevant to the Fall
2031 DDL project. Students should be able to find everything they need here, but are welcome to
access the full datasheet if they are interested in learning about other capabilities.
Introduction
Throughout this document, any text enclosed in quotation marks is directly taken from the full
datasheet titled WM8731 / WM8731L Portable Internet Audio CODEC with Headphone Driver
and Programmable Sample Rates, version 3.4, by Wolfson Microelectronics plc 2004. Figures
taken from the same document are noted as such. Text or figures enclosed in a shaded block
near the right margin deviates from a specific description of the CODEC and instead notes very
specific implementation details related to either the DE2 hardware, the SCOMP implementation
provided as a starting point, or both. Thus, the document without the shaded blocks should read
roughly like a simplified generic datasheet for the CODEC. As the CODEC is introduced in the
following paragraph, an example of all of these formatting features is immediately given.
A CODEC is any device, including possibly a software
module, that performs the function of encoding or
decoding information. For example, movie player
software employs one or more codecs to play movies
encoded in different compressed formats.
The WM8731 or WM8731L (WM8731/L) are low
power stereo CODECs with an integrated headphone
driver. The WM8731/L is designed specifically for
portable MP3 audio and speech players and recorders.
The WM8731 is also ideal for MD, CD RW machines
and DAT recorders.
Stereo line and mono microphone level audio inputs are provided, along with a mute function,
programmable line level volume control and a bias voltage output suitable for an electret type
microphone.
Internal analog-to-digital converters (ADCs) and digital-to-analog converters (DACs) allow the
device to convert at sampling rates from 8kHz to 96kHz, supporting digital word lengths from
16-32 bits.
Stereo audio outputs are buffered for driving headphones from a programmable volume control,
line level outputs are also provided along with anti-thump mute and power up/down circuitry.
The device is controlled via a 2 or 3 wire
serial interface. The interface provides
access to all features including volume
controls, mutes, de-emphasis and
extensive power management facilities.
Figure 1: Block diagram (from WM8731 / WM8731L Portable Internet Audio CODEC with Headphone Driver and
Programmable Sample Rates, version 3.4, by Wolfson Microelectronics plc 2004).
Only certain aspects of the device, shown in its entirety in Figure 1, are necessary to utilize it as
an analog waveform generator, driven by a sequence of digital inputs. Specifically, the
DACDAT (DAC Digital Audio Input) pin needs to be driven with digital data, in a serial format
to be described, and various clocks are used as inputs and outputs, including MCLK (Master
Clock), DACLRC (DAC Sample Rate Left/Right Clock), and BCLK (Digital Audio Bit Clock).
With the Control Interface suitably preconfigured, manipulating this relatively small number of
pins is sufficient for generating analog signals at the left and right headphone outputs (LHPOUT,
RHPOUT).
ADC
The WM8731/L uses a multi-bit oversampled
sigma-delta ADC.
Analog Outputs
The WM8731/L provides two low impedance line
outputs LLINEOUT and RLINEOUT, suitable for
driving typical line loads of impedance 10K and
capacitance 50pF.
The WM8731/L has a stereo headphone output
available on LHPOUT and RHPOUT. The output is
designed specifically for driving 16 or 32 ohm
headphones with maximum efficiency and low power
consumption. The headphone output includes a high
quality volume level adjustment and mute function.
Clocking Schemes
In a typical digital audio system there is only one
central clock source producing a reference clock to
which all audio data processing is synchronised. This
clock is often referred to as the audio systems Master
Clock. [An external clock signal can be applied]
directly through the XTI/MCLK input pin with no
software configuration necessary.
After optionally being divided by two, the Master
Clock becomes what is called the Core Clock.
The digital audio interface also receives the digital audio data for
the internal DAC digital filters on the DACDAT input. DACDAT
is the formatted digital audio data stream output to the DAC digital
filters with left and right channels multiplexed together. DACLRC
is an alignment clock that controls whether Left or Right channel
data is present on DACDAT. DACDAT and DACLRC are
synchronous with the BCLK signal with each data bit transition
signified by a BCLK high to low transition. DACDAT is always
an input. BCLK and DACLRC are outputs generated from the
Master Clock as noted above.
DSP mode is where the left channel MSB is available on either
the 1st or 2nd rising edge of BCLK (selectable by LRP) following
a LRC transition high. Right channel data immediately follows left
channel data.
DACLRC must always change on the falling edge of
BCLK.
Figure 2: DSP mode (from WM8731 / WM8731L Portable Internet Audio CODEC with Headphone Driver and
Programmable Sample Rates, version 3.4, by Wolfson Microelectronics plc 2004).
Operating the digital audio interface in DSP mode allows ease of use for supporting the various
sample rates and word lengths. The only requirement is that all data is transferred within the
correct number of BCLK cycles to suit the chosen word length.
It is possible to change the polarity of various signals (e.g., change boundary of data bit to be a
low-to-high transition of BCLK), but there is no obvious reason to do so. It is also possible, but
similarly unlikely, to change the order of left vs. right channel data.
DACDAT is always an input. It is expected to be set low by the audio interface controller when
the WM8731/L is powered off or in standby.
the DACLRC and BCLK signals are outputs that default low.
The preconfigured
code is set for USB
mode. As already
noted, the required 12
MHz clock is
provided for MCLK.
All needed clocks in
Figure 2 are provided
BY THE CODEC, so
there is minimal work
done by the student
here.
the digital interface at a rate of 12 MHz (16-bit values for both the left and right channels), which
is 250 times the rate required to generate a 48 kHz-sampled signal.