The MAX9867 is an ultra-low power stereo audio codec
designed for portable consumer devices such as
mobile phones and portable gaming consoles.
The device features stereo differential microphone inputs
that can be connected to either analog or digital microphones. The single-ended line inputs, with configurable
preamplifier, can be sent to the ADC for record or routed
directly to the headphone amplifier for playback. An auxiliary ADC path can be used to track any DC voltage.
The stereo headphone amplifiers support differential,
single-ended, and capacitorless output configurations.
Using the capacitorless output configuration, the
device can output 10mW into 32Ω headphones.
Comprehensive click-and-pop circuitry suppresses
audible clicks and pops during volume changes and
startup or shutdown.
Utilizing Maxim’s proprietary digital circuitry, the device
can accept any available 10MHz to 60MHz system
clock. This architecture eliminates the need for an
external PLL and multiple crystal oscillators. The stereo
ADC and DAC paths provide user-configurable voiceband or audioband digital filters. Voiceband filters provide extra attenuation at the GSM packet frequency
and greater than 70dB stopband attenuation at f
S/2
.
The MAX9867 operates from a single 1.8V supply, and
supports a 1.65V to 3.6V logic level. An I
2
C 2-wire serial interface provides control for volume levels, signal
mixing, and general operating modes.
The MAX9867 is available in a tiny 2.2mm x 2.7mm,
0.4mm-ball-pitch, WLP package. A 32-pin 5mm x 5mm
TQFN package is also available.
= +1.8V, RL= ∞, headphone load (RL) connected between _OUTP and _OUTN in differential
mode, C
REF
= 2.2μF, C
MICBIAS
= C
PREG
= C
REG
= 1μF, AV
PRE
= +20dB, AV
PGAM
= 0dB, AV
DAC
= 0dB, AV
LINE
= +20dB, AV
VOL
=
0dB, MCLK = 13MHz, T
A
= T
MIN
to T
MAX
, unless otherwise noted. Typical values are at TA= +25°C.) (Note 2)
Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. These are stress ratings only, and functional
operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to
absolute maximum rating conditions for extended periods may affect device reliability.
(Voltages with respect to AGND.)
DVDD, AVDD, and PVDD .........................................-0.3V to +2V
DVDDIO.................................................................-0.3V to +3.6V
DGND and PGND..................................................-0.1V to +0.1V
PREG, REF, REG, MICBIAS ....................-0.3V to (AVDD + 0.3V)
MCLK, LRCLK, BCLK
SDOUT, SDIN .................................-0.3V to (DVDDIO + 0.3V)
SDA, SCL, IRQ ......................................................-0.3V to +3.6V
LOUTP, LOUTN, ROUTP,
ROUTN .................................(PGND - 0.3V) to (PVDD + 0.3V)
LINL, LINR, JACKSNS/AUX, MICLP/DIGMICDATA,
MICLN/DIGMICCLK, MICRP, MICRN..-0.3V to (AVDD + 0.3V)
Note 2: The MAX9867 is 100% production tested at TA= +25°C. Specifications over temperature limits are guaranteed by design.
Note 3: Clocking all zeros into the DAC, master mode, and differential headphone mode.
Note 4: DAC performance measured at the headphone outputs.
Note 5: Dynamic range measured using the EIAJ method. -60dBFS 1kHz output signal, A-weighted, and normalized to 0dBFS.
f = 20Hz to 20kHz.
Note 6: Performance measured using microphone inputs, unless otherwise stated.
Note 7: Performance measured using line inputs.
Note 8: Performance measured using DAC, unless otherwise stated. LRCLK = 8kHz, unless otherwise stated.
Note 9: In master-mode operation, the accuracy of the MCLK input proportionally determines the accuracy of the sample clock rate.
Note 10: C
B
is in pF.
ELECTRICAL CHARACTERISTICS (continued)
(V
AVDD
= V
PVDD
= V
DVDD
= V
DVDDIO
= +1.8V, RL= ∞, headphone load (RL) connected between _OUTP and _OUTN in differential
mode, C
REF
= 2.2μF, C
MICBIAS
= C
PREG
= C
REG
= 1μF, AV
PRE
= +20dB, AV
PGAM
= 0dB, AV
DAC
= 0dB, AV
LINE
= +20dB, AV
VOL
=
0dB, MCLK = 13MHz, T
A
= T
MIN
to T
MAX
, unless otherwise noted. Typical values are at TA= +25°C.) (Note 2)
2B3SCLI2C Serial-Clock Input. Connect a pullup resistor to a 1.7V to 3.3V supply.
3A3SDAI2C Serial-Data Input/Output. Connect a pullup resistor to a 1.7V to 3.3V supply.
4C3 IRQ
5A4AVDDAnalog Power Supply. Bypass to AGND with a 1μF capacitor.
6B4REFConverter Reference. Bypass to AGND with a 2.2μF capacitor (1.23V nominal).
7A5PREG
8B5REGPREG/2 Voltage Reference. Bypass to AGND with a 1μF capacitor (0.8V nominal).
9A6AGNDAnalog Ground
10B6MICBIAS
11C5
12C6
13C4MICRP
14D6MICRN
15D5LINLLeft-Line Input. AC-couple analog audio signal to LINL with a 1μF capacitor.
16E6LINRRight-Line Input. AC-couple analog audio signal to LINR with a 1μF capacitor.
17D4JACKSNS/AUX
18E5PGNDHeadphone Power Ground
19D3ROUTP
20E4ROUTN
21D2LOUTN
NAMEFUNCTION
Hardware Interrupt Output. IRQ can be programmed to pull low when bits in
status register 0x00 are set. Read status register 0x00 to clear IRQ once set.
Repeat faults have no effect on IRQ until it is cleared by reading register 0x00.
Connect a 10kΩ pullup resistor to a 1.7V to 3.3V supply.
Positive Internal Regulated Supply. Bypass to AGND with a 1μF capacitor (1.6V
nominal).
Low-Noise Microphone Bias. Connect a 2.2kΩ to 470Ω resistor to the positive
output of a microphone (1.525V nominal). Bypass to AGND with a 1μF capacitor.
Left Negative Differential Microphone Input or Digital Microphone Clock Output.
MICLN/
DIGMICCLK
MICLP/
DIGMICDATA
For analog microphones, AC-couple to the negative output of a microphone with a
1μF capacitor. For digital microphones, connect to the clock input of the
microphone.
Left Positive Differential Microphone Input or Digital Microphone Data Input. For
analog microphones, AC-couple to the positive output of a microphone with a 1μF
capacitor. For digital microphones, connect to the data output of the
microphone(s). Up to two digital microphones can be connected.
Right Positive Differential Microphone Input. AC-couple to the positive output of a
microphone with a 1μF capacitor.
Right Negative Differential Microphone Input. AC-couple to the negative output of
a microphone with a 1μF capacitor.
Jack Sense or Auxiliary ADC Input. When configured for jack detection, JACKSNS
detects the presence or absence of a jack. See the Mode Configuration section
for details. When configured as an auxiliary ADC input, AUX is used to measure
DC voltages.
Positive Right-Channel Headphone Output. Connect directly to the load in
differential and capacitorless mode. AC-couple to the load in single-ended mode.
Negative Right-Channel Headphone Output. Inverting output in differential mode.
Leave unconnected in capacitorless and fast turn-on single-ended mode. Bypass
with a 1μF capacitor to AGND in clickless, single-ended mode.
Negative Left-Channel Headphone Output. Noninverting output in differential
mode. Common headphone return in capacitorless mode. Leave unconnected in
fast turn-on single-ended mode. Bypass with a 1μF capacitor to AGND in clickless
single-ended mode.
Detailed Description
The MAX9867 is a low-power stereo audio codec
designed for portable applications requiring minimum
power consumption.
The stereo playback path accepts digital audio through
a flexible interface compatible with I2S, TDM, and leftjustified signals. An oversampling sigma-delta DAC
converts the incoming digital data stream to analog
audio and outputs the audio through the stereo headphone amplifier. The headphone amplifier can be configured in differential, single-ended, and capacitorless
output modes.
The stereo record path has two analog microphone
inputs with selectable gain. An integrated microphone
bias can be used to power the microphones. The left
analog microphone inputs can also accept data from
up to two digital microphones. An oversampling sigmadelta ADC converts the microphone signals and outputs the digital bit stream over the digital audio
interface.
Integrated digital filtering provides a range of notch and
highpass filters for both the playback and record paths
to limit undesirable low-frequency signals and GSM
transmission noise. The digital filtering provides attenuation
of out-of-band energy by over 70dB, eliminating audible aliasing. A digital sidetone function allows audio
from the record path to be summed into the playback
path after digital filtering.
The MAX9867 also includes two stereo, single-ended
line inputs with gain adjustment, which can be recorded by the ADCs and/or output by the headphone amplifiers. An auxiliary ADC accurately measures a DC
voltage by utilizing the right audio ADC and reporting
the DC voltage through the I
2
C interface. A jack detection function allows the detection of headphone, microphone, and headset jacks. Insertion and removal
events can be programmed to trigger a hardware interrupt and flag an I2C register bit.
The MAX9867’s flexible clock circuitry utilizes a programmable clock divider and a digital PLL, allowing the DAC
and ADC to operate at maximum dynamic range for all
combinations of master clock (MCLK) and sample rate
(LRCLK) without consuming extra supply current. Any
master clock between 10MHz and 60MHz is supported
as are all sample rates from 8kHz to 48kHz. Master and
slave modes are supported for maximum flexibility.
23E2PVDDHeadphone Power Supply. Bypass to PGND with a 1μF capacitor.
24, 25—N.C.No Connection
26E1DVDDIODigital Audio Interface Power Supply. Bypass to DGND with a 1μF capacitor.
27D1SDOUTDigital Audio Serial-Data ADC Output
28C2SDINDigital Audio Serial-Data DAC Input
29C1LRCLK
30B1BCLK
31B2MCLKMaster Clock Input. Acceptable input frequency range: 10MHz to 60MHz.
32A1DVDD
——EPExposed Pad. Connect the exposed thermal pad to AGND.
NAMEFUNCTION
Positive Left-Channel Headphone Output. Connect directly to the load in
differential and capacitorless mode. AC-couple to the load in single-ended mode.
Digital Audio Left-Right Clock Input/Output. LRCLK is the audio sample rate clock
and determines whether the audio data on SDIN is routed to the left or right
channel. In TDM mode, LRCLK is a frame synchronization pulse. LRCLK is an
input when the MAX9867 is in slave mode and an output when in master mode.
Digital Audio Bit Clock Input/Output. BCLK is an input when the MAX9867 is in
slave mode and an output when in master mode.
Digital Power Supply. Supply for the digital circuitry and I
DGND with a 1μF capacitor.
2
C interface. Bypass to
MAX9867
I2C Registers
The MAX9867 audio codec is completely controlled
through software using an I2C interface. The power-on
default setting is complete shutdown, requiring that the
internal registers be programmed to activate the device.
See Table 1 for the device’s complete register map.
I2C Slave Address
The MAX9867 responds to the slave address 0x30 for
all write commands and 0x31 for all read operations.
System ShutdownSHDNLNLENLNREN0DALENDARENADLENADREN0x170x00
RevisionREV0xFF0x42
PLLNI[14:8]0x060x00
NI[7:1]
RLK/
NI[0]
REGISTER
ADDRESS
0x070x00
POWER-
ON RESET
STATE
Device Status
Status registers 0x00 and 0x01 are read-only registers
that report the status of various device functions. The
status register bits are cleared upon reading the status
register and are set the next time the event occurs.
Registers 0x02 and 0x03 report the DC level applied to
AUX. See the
Jack S ense ( Read O nl y) LSNSJKSNSJKMIC000000x01
AUX High (Read Only)AUX[15:8]0x02
AUX Low (Read Only)AUX[7:0]0x03
BITSFUNCTION
CLD
SLD
ULK
JDET
LSNS
JKSNS
JKMIC
AUX
Clip Detect Flag
Indicates that a signal has reached or exceeded full scale in the ADC or DAC.
Slew Level Detect Flag
When volume or gain changes are made, the slewing circuitry smoothly steps through all intermediate
settings. When SLD is set high, all slewing has completed and the volume or gain is at its final value. SLD
is also set when soft-start or stop is complete.
Digital PLL Unlock Flag
Indicates that the digital audio PLL has become unlocked and digital signal data is not reliable.
Headset Configuration Change Flag
JDET is set whenever there is a change in register 0x01, indicating that the headset configuration has
changed.
LOUTP State (Valid if SHDN = 0, JDETEN = 1)
LSNS is set when the voltage at LOUTP exceeds AVDD - 0.4V. An internal pullup from AVDD to LOUTP
causes this condition whenever there is no load on LOUTP. LSNS is only valid in differential and
capacitorless output modes.
JACKSNS State (Valid if JDETEN = 1)
JKSNS is set when the voltage at JACKSNS exceeds AVDD - 0.4V. An internal pullup from AVDD to
JACKSNS causes this condition whenever there is no load on JACKSNS.
Microphone Detection (Valid if PALEN or PAREN ≠ 00 and JDETEN = 1)
JKMIC is set when JACKSNS exceeds 0.95 x V
Auxiliary Input Measurement
AUX is a 16-bit signed two’s complement number representing the voltage measured at JACKSNS/AUX.
Before reading a value from AUX, set AUXCAP to 1 to ensure a stable reading. After reading the value,
set AUXCAP to 0.
Use the following formula to convert the AUX value into an equivalent JACKSNS/AUX voltage:
AUX
⎛
VoltageV
K = AUX value when AUXGAIN = 1. See the ADC section for complete details.
=×
0 738.
⎞
⎜
⎟
⎝
⎠
K
MICBIAS
.
REGISTER
ADDRESS
MAX9867
Hardware Interrupts
Hardware interrupts are reported on the open-drain IRQ
pin. When an interrupt occurs, IRQ remains low until the
interrupt is serviced by reading the status register 0x00.
If a flag is set, it is reported as a hardware interrupt only
if the corresponding interrupt enable is set. Each bit
enables interrupts for the status flag in the respective
bit location in register 0x00. See Table 3.
SDODLY is used to control the SDOUT timing. See the
Digital Audio Interface
section for a detailed description.
Clock Control
The MAX9867 can work with a master clock (MCLK)
supplied from any system clock within the 10MHz-to60MHz range. Internally, the MAX9867 requires a
10MHz-to-20MHz clock. A prescaler divides MCLK by
1, 2, or 4 to create the internal clock (PCLK). PCLK is
used to clock all portions of the MAX9867. See Table 4.
The MAX9867 is capable of supporting any sample rate
from 8kHz to 48kHz, including all common sample rates
(8kHz, 16kHz, 24kHz, 32kHz, 44.1kHz, and 48kHz). To
accommodate a wide range of system architectures,
the MAX9867 supports three main clocking modes:
• Normal: This mode uses a 15-bit clock divider coeffi-
cient to set the sample rate relative to the prescaled
MCLK input (PCLK). This allows high flexibility in both
the MCLK and LRCLK frequencies and can be used
in either master or slave mode.
• Exact Integer: In both master and slave mode, com-
mon MCLK frequencies (12MHz, 13MHz, 16MHz,
and 19.2MHz) can be programmed to operate in
exact integer mode for both 8kHz and 16kHz sample
rates. In these modes, the MCLK and LRCLK rates
are selected by using the FREQ bits instead of the NI
and PLL control bits.
• PLL: When operating in slave mode, a PLL can be
enabled to lock onto externally generated LRCLK
signals that are not integer related to PCLK. Prior to
enabling the interface, program NI to the nearest
desired ratio and set the NI[0] = 1 to enable the
PLL’s rapid lock mode. If NI[0] = 0, then NI is ignored
and PLL lock time is slower.
Divides MCLK to generate a PCLK between 10MHz and 20MHz.
PSCLK
00 = Disable clock for low-power shutdown.
01 = Select if MCLK is between 10MHz and 20MHz.
10 = Select if MCLK is between 20MHz and 40MHz.
11 = Select if MCLK is between 40MHz and 60MHz.
Note: Bolded values are exact integers that provide maximum full-scale performance.
Table 5. Common NI Values
BITSFUNCTION
Exact Integer Modes
Allows integer sampling for specific PCLK (prescaled MCLK) frequencies and 8kHz or 16kHz sample rates.
FREQ[3:0]PCLK (MHz)LRCLK (kHz)PCLK/LRCLK
0x00Normal or PLL mode
0x1–0x7ReservedReservedReserved
FREQ
PLL
0x8
0x9
0xA
0xB
0xC
0xD
0xE
0xF
Modes 0x8–0xF are available in either master or slave mode. In slave mode, if the indicated PCLK/LRCLK ratio
cannot be guaranteed, use PLL mode instead.
PLL Mode Enable
0 = Valid for slave and master mode. The frequency of LRCLK is set by the NI divider bits. In master mode, the
MAX9867 generates LRCLK using the specified divide ratio. In slave mode, the MAX9867 expects an
LRCLK as specified by the divide ratio.
1 = Valid for slave mode only. A digital PLL locks on to any externally supplied LRCLK signal.
Rapid Lock Mode
To enable rapid lock mode, set NI to the nearest desired ratio and set NI[0] = 1 before enabling the interface.
Normal Mode LRCLK Divider
When PLL = 0, the frequency of LRCLK is determined by NI. See Table 5 for common NI values.
12
12
13
13
16
16
19.2
19.2
16
16
16
16
8
8
8
8
1500
750
1625
812.5
2000
1000
2400
1200
LRCLK
)/f
PCLK
NI
NI = (65536 x 96 x f
f
= LRCLK frequency
LRCLK
f
= Prescaled MCLK internal clock frequency (PCLK)
PCLK
LRCLK > 24kHz is only valid for MODE = 0 (stereo audio mode). MODE = 1 (voice mode) requires LRCLK ≤
24kHz.
The MAX9867’s digital audio interface supports a wide
range of operating modes to ensure maximum compatibility. See Figures 1–4 for timing diagrams. In master
mode, the MAX9867 outputs LRCLK and BCLK, while in
slave mode they are inputs. When operating in master
mode, BCLK can be configured in a number of ways to
ensure compatiblity with other audio devices.
LVOLFIX is used to fix the line input playback volume to
0dB regardless of VOLL and VOLR. See the
Line Inputs
section for complete details and Table 6.
REGISTERB7B6B5B4B3B2B1B0
Interface ModeMASWCIBCIDLYHIZOFFTDM000x08
Interface Mode000LVOLFIXDMONOBSEL0x09
BITSFUNCTION
Master Mode
MAS
WCI
BCI
SDODLY
DLY
HIZOFF
LVOLFIXSee the Line Inputs section.
0 = The MAX9867 operates in slave mode with LRCLK and BCLK configured as inputs.
1 = The MAX9867 operates in master mode with LRCLK and BCLK configured as outputs.
LRCLK Invert
0 = Left-channel data is input and output while LRCLK is low.
1 = Right-channel data is input and output while LRCLK is low.
Note: WCI is ignored when TDM = 1.
BCLK Invert
In master and slave modes:
0 = SDIN is latched into the part on the rising edge of BCLK.
SDOUT transitions after the rising edge of BCLK as determined by SDODLY.
1 = SDIN is latched into the part on the falling edge of BCLK.
SDOUT transitions after the falling edge of BCLK as determined by SDODLY.
In master mode:
0 = LRCLK changes state immediately after the rising edge of BCLK.
1 = LRCLK changes state immediately after the falling edge of BCLK.
SDOUT Delay
0 = SDOUT transitions one half BCLK cycle after SDIN is latched into the part.
1 = SDOUT transitions on the same BCLK edge as SDIN is latched into the part.
See Figures 1–4 for complete details. See Register 0x04 (interrupt registers).
Delay Mode
0 = SDIN/SDOUT data is latched on the first BCLK edge following an LRCLK edge.
1 = SDIN/SDOUT data is assumed to be delayed one BCLK cycle so that it is latched on the 2nd BCLK edge
following an LRCLK edge (I
Note: DLY is ignored when TDM = 1.
SDOUT High-Impedance Mode
0 = SDOUT goes to a high-impedance state after all data bits have been transferred out of the MAX9867,
allowing SDOUT to be shared by other devices.
1 = SDOUT is set either high or low after all data bits have been transferred out of the MAX9867.
Note: High-impedance mode is intended for use when TDM = 1.
Table 6. Digital Audio Interface Registers (continued)
BITSFUNCTION
TDM Mode Select
0 = LRCLK signal polarity indicates left and right audio.
TDM
DMONO
BSEL
1 = LRCLK is a framing pulse that transitions polarity to indicate the start of a frame of audio data consisting
of multiple channels.
When operating in TDM mode, the left channel is output immediately following the frame sync pulse. If rightchannel data is being transmitted, the 2nd channel of data immediately follows the 1st channel data.
Mono Playback Mode
0 = Stereo data input on SDIN is processed separately.
1 = Stereo data input on SDIN is mixed to a single channel and routed to both the left and right DAC.
BCLK Select
Configures BCLK when operating in master mode. BSEL has no effect in slave mode. Set BSEL = 010, unless
sharing the bus with multiple devices:
000 = Off
001 = 64x LRCLK (192x internal clock divided by 3)
010 = 48x LRCLK (192x internal clock divided by 4)
011 = Reserved for future use.
100 = PCLK/2
101 = PCLK/4
110 = PCLK/8
111 = PCLK/16
Figure 1. Digital Audio Interface Audio Master Mode Example (Sheet 1 of 2)
NOTE: THE DELAY FROM A BCLK EDGE AND AN LRCLK EDGE IS DETERMINED BY LENGTH OF TIME THAT PCLK (THE INTERNALLY DIVIDED DOWN VERSION OF MCLK AS DEFINED BY THE PSCLK BITS) IS HIGH DURING ONE PERIOD OF
MCLK PLUS THE INTERNAL DELAY. FOR EXAMPLE: IF PCLK = 12.288MHZ, THEN THE DELAY BETWEEN BCLK AND LRCLK IS TYPICALLY 45ns.
NOTE: THE DELAY FROM A BCLK EDGE AND AN LRCLK EDGE IS DETERMINED BY LENGTH OF TIME THAT PCLK (THE INTERNALLY DIVIDED DOWN VERSION OF MCLK AS DEFINED BY THE PSCLK BITS) IS HIGH DURING ONE PERIOD OF
MCLK PLUS THE INTERNAL DELAY. FOR EXAMPLE: IF PCLK = 12.288MHZ, THEN THE DELAY BETWEEN BCLK AND LRCLK IS TYPICALLY 45ns.
The MAX9867 incorporates both IIR (voice) and FIR
(audio) digital filters to accomodate a wide range of
audio sources. The IIR fiilters provide over 70dB of
stopband attenuation as well as selectable highpass filters. The FIR filters provide low-power consumption and
are linear phase to maintain stereo imaging. Table 7 is
the digital filtering register.
Table 7. Digital Filtering Register
Table 8. IIR Highpass Digital Filters
REGISTERB7B6B5B4B3B2B1B0
Codec FiltersMODEAVFLT0DVFLT0x0A
BITSFUNCTION
Digital Audio Filter Mode
MODE
AVFLT
DVFLT
0 = IIR Voice Filters
1 = FIR Audio Filters
ADC Digital Audio Filter
MODE = 0
Select the desired digital filter response from Table 8. See the Frequency Responsegraph in the Typical
Operating Characteristics section for details on each filter.
MODE = 1
0x0 = DC-blocking filter is disabled. Any other setting = DC-blocking filter is enabled.
DAC Digital Audio Filter
MODE = 0
Select the desired digital filter response from Table 8. See the Frequency Responsegraph in the Typical
Operating Characteristics section for details on each filter.
MODE = 1
0x0 = DC-blocking filter is disabled. Any other setting = DC-blocking filter is enabled.
The MAX9867 includes digital gain adjustment for the
playback and record paths. Independent gain adjustment is provided for the two record channels. Sidetone
gain adjustment is also provided to set the sidetone
level relative to the playback level. Table 9 is the digital
gain registers.
Table 9. Digital Gain Registers
REGISTERB7B6B5B4B3B2B1B0
SidetoneDSTS0DVST0x0B
DAC Level0DACMDACGDACA0x0C
ADC LevelAVLAVR0x0D
BITSFUNCTION
Digital Sidetone Source Mixer
00=No sidetone is selected.
DSTS
DVST
DACM
01=Left ADC
10=Right ADC
11=Left + right ADC
Digital Sidetone Level Control
All gain settings are relative to the ADC input voltage.
Two differential microphone inputs and a low-noise microphone bias for powering the microphones are provided
by the MAX9867. In typical applications, the left microphone records a voice signal and the right microphone
records a background noise signal. In applications that
require only one microphone, use the left microphone
input and disable the right ADC. The microphone signals
are amplified by two stages of gain and then routed to
the ADCs. The first stage offers selectable 0dB, 20dB,
or 30dB settings. The second stage is a programmable
gain amplifier (PGA) adjustable from 0dB to 20dB in
1dB steps. Zero-crossing detection is included on the
PGA to minimize zipper noise while making gain
changes. See Figure 5 for a detailed diagram of the
microphone input structure. Table 12 is the microphone
input register.
Table 12. Microphone Input Register
BITSFUNCTION
Left/Right Playback Mute
VOLLM and VOLRM mute both the DAC and line input audio signals.
VOLLM/VOLRM
VOLL/VOLR
0 = Audio playback is unmuted.
1 = Audio playback is muted
Note: VSEN has no effect on the mute function. When VOLLM or VOLRM is set, the output is muted
immediately (ZDEN = 1) or at the next zero-crossing (ZDEN = 0).
Left/Right Playback Volume
VOLL and VOLR control the playback volume for both the DAC and line input audio signals.
Note: Gain settings apply when the headphone amplifier is configured in differential mode. In the singleended and capacitorless modes, the actual gain is 5dB lower for each setting.
The MAX9867 includes two 16-bit ADCs. The first ADC
is used to record left-channel microphone and line-input
audio signals. The second ADC can be used to record
right-channel microphone and line-input signals, or it
can be configured to accurately measure DC voltages.
When measuring DC voltages, both the left and right
ADCs must be enabled by setting ADLEN and ADREN
in register 0x17. The input to the second ADC is JACKSNS/AUX and the output is reported in AUX (registers
0x02 and 0x03). Since the audio ADC is used to perform the measurement, the digital audio interface must
be properly configured. If the left ADC is being used to
convert audio, the DC measurement is performed at the
same sample rate. When not using the left ADC, configure the digital interface for a 48kHz sample rate to
ensure the fastest possible settling time.
To ensure accurate results, the MAX9867 includes two
calibration routines. Calibrate the ADC each time the
MAX9867 is powered on. Calibration settings are not
lost if the MAX9867 is placed in shutdown. When making a measurement, set AUXCAP to 1 to prevent AUX
from changing while reading the registers.
Setup Procedure
1) Ensure a valid MCLK signal is provided and configure PSCLK appropriately.
2) Choose a clocking mode. The following options are
possible:
• Slave mode with LRCLK and BCLK signals pro-vided. The measurement sample rate is determined by the external clocks.
• Slave mode with no LRCLK and BCLK signalsprovided. Configure the device for normal clock
mode using the NI ratio. Select fS= 48kHz to allow
for the fastest settling times.
• Master mode with audio. Configure the device in
normal mode using the NI ratio or exact integer
mode using FREQ as required by the audio signal.
• Master mode without audio. Configure the
device in normal mode using the NI ratio. Select f
S
= 48kHz to allow for the fastest settling times.
3) Ensure JACKSNS is disabled.
4) Enable the left and right ADC; take the MAX9867 out
of shutdown.
Offset Calibration Procedure
Perform the following steps before the first DC measurement is taken after applying power to the
MAX9867:
1) Enable the AUX input (AUXEN = 1).
2) Enable the offset calibration (AUXCAL = 1).
3) Wait the appropriate time (see Table 13).
4) Complete calibration (AUXCAL = 0).
Gain Calibration Procedure
Perform the following steps the first time a DC measurement is taken after applying power to the MAX9867 or if
the temperature changes significantly:
1) Enable the AUX input (AUXEN = 1).
2) Start gain calibration (AUXGAIN = 1).
3) Wait the appropriate time (see Table 13).
4) Freeze the measurement results (AUXCAP = 1).
5) Read AUX and store the value in memory to correct
all future measurements (k = (AUX[15:0], k is typically 19500).
6) Complete calibration (AUXGAIN = AUXCAP = 0).
DC Measurement Procedure
Perform the following steps after offset and gain calibration are complete:
1) Enable the AUX input (AUXEN = 1).
2) Wait the appropriate time (see Table 13).
3) Freeze the measurement results (AUXCAP = 1).
4) Read AUX and correct with the gain calibration
value:
MCLK = 13MHz, slave mode, BCLK and LRCLK not
externally supplied:
1) Configure the digital audio interface for f
S
= 48kHz
(PSCLK = 01, FREQ = 0x0, PLL = 0, NI = 0x5ABE,
MAS = 0).
2) Disable JACKSNS (JDETEN = 0).
3) Enable the left and right ADC; take the MAX9867 out
of shutdown (ADLEN = ADREN = SHDN = 1).
4) Calibrate the offset:
a. Enable the AUX input (AUXEN = 1).
b. Enable the offset calibration (AUXCAL = 1).
c. Wait 40ms.
d. Complete calibration (AUXCAL = 0).
5) Calibrate the gain:
a. Start gain calibration (AUXGAIN = 1).
b. Wait 40ms.
c. Freeze the measurement results (AUXCAP = 1).
d. Read AUX and store the value in memory to cor-
rect all future measurements (k = (AUX[15:0]).
e. Complete calibration (AUXGAIN = AUXCAP =
AUXEN = 0).
6) Measure the voltage on JACKSNS/AUX:
a. Enable the AUX input (AUXEN = 1).
b. Wait 40ms.
c. Freeze the measurement results (AUXCAP = 1).
d. Read AUX and correct with the gain calibration
value.
e. Complete measurement (AUXCAP = 0).
7) DC measurement complete.
Table 14. ADC Input Register
REGISTERB7B6B5B4B3B2B1B0
ADC InputMXINLMXINRAUXCAP AU X GAIN AUXCALAUXEN0x14
REGISTER
ADDRESS
BITSFUNCTION
Left/Right ADC Audio Input Mixer
00 = No input is selected.
01 = Left/right analog microphone
MXINL/MXINR
AUXCAP
AUXGAIN
AUXCAL
AUXEN
10 = Left/right line input
11 = Left/right analog microphone + line input
Note: If the right-line input is disabled, then the left-line input is connected to both mixers. Enabling the
left and right digital microphones disables the left and right audio mixers, respectively. See DIGMICL/
DIGMICR in Table 15 for more details.
Auxiliary Input Capture
0 = Update AUX with the voltage at JACKSNS/AUX.
1 = Hold AUX for reading.
Auxiliary Input Gain Calibration
0 = Normal operation
1 = The input buffer is disconnected from JACKSNS/AUX and connected to an internal voltage reference.
While in this mode, read the AUX register and store the value. Use the stored value as a gain
calibration factor, K, on subsequent readings.
Auxiliary Input Offset Calibration
0 = Normal operation
1 = JACKSNS/AUX is disconnected from the input and the ADC automatically calibrates out any internal
offsets.
Auxiliary Input Enable
0 = Use JACKSNS/AUX for jack detection.
1 = Use JACKSNS/AUX for DC measurements.
Note: For AUXEN = 1, set MXINR = 00, ADLEN = 1, and ADREN = 1.
The MAX9867 can accept audio from up to two digital
microphones. When using digital microphones, the left
analog microphone input is retasked as a digital micro-
phone input. The right analog microphone input is still
available to allow a combination of analog and digital
microphones to be used. Figure 6 shows the digital
microphone interface timing diagram. See Table 15.
Table 15. Digital Microphone Input Register
Figure 6. Digital Microphone Timing Diagram
REGISTERB7B6B5B4B3B2B1B0
MicrophoneMICCLKDIGMICL DIGMICR00000x15
BITSFUNCTION
Digital Microphone Clock
00 = PCLK/8
MICCLK
DIGMICL/DIGMICR
01 = PCLK/6
10 = Reserved
11 = Reserved
Digital Left/Right Microphone Enable
DIGMICLDIGMICRLeft ADC InputRight ADC Input
00ADC input mixerADC input mixer
01
10Left digital microphoneADC input mixer
11Left digital microphoneRight digital microphone
Note: The left analog microphone input is never available when DIGMICL or DIGMICR = 1.
The MAX9867 includes circuitry to minimize click-andpop during volume changes, detect headsets, and configure the headphone amplifier mode. Both volume
slewing and zero-crossing detection are included to
ensure click-and-pop free volume transitions. Table 16
is the mode configuration register.
Headset Detection Overview
The MAX9867 features headset detection that can detect
the insertion and removal of a jack as well as the load
type. When a jack is detected, an interrupt on IRQ can be
triggered to alert the microcontroller of the event. Figure 7
shows the typical configuration for jack detection.
Sleep-Mode Headset Detection
When the MAX9867 is in shutdown and the power supply
is available, sleep-mode headset detection can be
enabled to detect jack insertion. Sleep mode applies a
4μA pullup current to JACKSNS/AUX and LOUTP that
forces the voltage on JACKSNS/AUX and LOUTP to
AVDD when no load is applied. When a jack is inserted,
either JACKSNS, LOUTP (assuming the headphone
amplifier is not configured in single-ended mode), or both
are loaded sufficiently to reduce the output voltage to
nearly 0V and clear the JKSNS or LSNS bits, respectively.
The change in the LSNS and JKSNS bits sets JDET and
triggers an interrupt on IRQ if IJDET is set. The interrupt
signals the microcontroller that a jack has been inserted,
allowing the microcontroller to respond as desired.
Powered-On Headset Detection
When the MAX9867 is in normal operation and the microphone interface is enabled, jack insertion and removal can
be detected through the JACKSNS/AUX pin. As shown in
Figure 7, V
MIC
is pulled up by MICBIAS. When a micro-
phone is connected, V
MIC
is assumed to be between 0V
and 95% of V
MICBIAS
. If the jack is removed, V
MIC
increas-
es to V
MICBIAS
. This event causes JKMIC to be set, alerting the system that the headset has been removed.
Alternatively, if the jack is inserted, V
MIC
decreases to
below 95% of V
MICBIAS
and JKMIC is cleared, alerting the
system that a jack has been inserted. The JKMIC bit can
be configured to create a hardware interrupt that alerts the
microcontroller of jack removal and insertion events.
Headphone Modes
The headphone amplifier supports differential, singleended, and capacitorless output modes, as shown in
Figure 8. In each mode, the amplifier can be configured
for stereo or mono operation. The differential and
capacitorless modes are inherently click and pop free.
The single-ended mode optionally includes click-andpop reduction to eliminate the click and pop that would
normally be caused by the output coupling capacitor.
When click-and-pop reduction is not required in the single-ended configuration, leave LOUTN and ROUTN
unconnected.
Figure 7. Typical Configuration for Headset Detection
Figure 8. Headphone Amplifier Modes
GNDMICHPRHPL
LOUTN
LOUTP
MICBIAS
ROUTP
JACKSNS/AUX
MICLP
DIFFERENTIAL
LOUTP
LOUTN
ROUTP
ROUTN
OPTIONAL COMPONENTS REQUIRED FOR CLICK AND POP SUPPRESSION ONLY
0 = Digital volume changes are slewed over 10ms.
1 = Digital volume changes are slewed over 80ms.
Volume Change Smoothing
0 = Volume changes slew through all intermediate values.
1 = Volume changes occur in one step.
Line Input Zero-Crossing Detection
0 = Line input volume changes occur at zero crossings in the audio waveform or after 62ms if no zero
crossing occurs.
1 = Line-input volume changes occur immediately.
Jack Detection Enable
SHDN = 0: Sleep Mode
Enables pullups on LOUTP and JACKSNS/AUX to detect jack insertion. LSNS and JKSNS are valid.
LOUTP detection is only valid in differential and capacitorless output modes.
SHDN = 1: Normal Mode
Enables the comparator circuitry on JACKSNS/AUX to detect voltage changes. JKMIC is valid if the
microphone circuitry is enabled.
Note: AUXEN must be set to 0 for jack detection to function.
Headphone Amplifier Mode
HPMODEMode
000Stereo differential (clickless)
001Mono (left) differential (clickless)
010Stereo capacitorless (clickless)
011Mono (left) capacitorless (clickless)
100Stereo single-ended (clickless)
101Mono (left) single-ended (clickless)
110Stereo single-ended (fast turn-on)
111Mono (left) single-ended (fast turn-on)
Note: In mono operation, the right amplifier is disabled.
The MAX9867 includes complete power management
control to minimize power usage. The DAC and both
ADC can be independently enabled so that only the
required circuitry is active. Toggle the SHDN bit whenever a configuration change is made. Table 17 is the
power-management register.
Table 17. Power-Management Register
Revision Code
The MAX9867 includes a revision code to allow easy
identification of the device revision. The revision code is
0x42. See Table 18 for the revision code register.
Table 18. Revision Code Register
REGISTERB7B6B5B4B3B2B1B0
System ShutdownSHDNLNLENLNREN0DALENDARENADLENADREN0x17
BITSFUNCTION
SHDN
LNLEN
LNREN
DALEN
DAREN
ADLENLeft ADC Enable
ADREN
Shutdown
Places the device in low-power shutdown mode.
Left-Line Input Enable
Enables the left-line input preamp and automatically enables the left and right headphone amplifiers.
If LNREN = 0, the left-line input signal is also routed to the right ADC input mixer and right headphone
amplifier.
Note: Control of the right headphone amplifier can be overridden by HPMODE.
Right-Line Input Enable
Enables the right-line input preamp and automatically enables the right headphone amplifier.
Note: Control of the right headphone amplifier can be overridden by HPMODE.
Left DAC Enable
E nab l es the l eft D AC and autom ati cal l y enab l es the l eft and r i g ht head p hone am p l i fi er s. If D ARE N = 0, the
l eft D AC si g nal i s al so r outed to the r i g ht head p hone am p l i fi er .
Note: Control of the right headphone amplifier can be overridden by HPMODE.
Right DAC Enable
Enabling the right DAC must be done in the same I
DAC operation requires DALEN = 1.
Right ADC Enable
Enabling the right ADC must be done in the same I
ADC can be enabled while the left ADC is running if used for DC measurements. SHDN must be toggled
to disable the right ADC in this case. Right ADC operation requires ADLEN = 1.
2
C write operation that enables the left DAC. Right
2
C write operation that enables the left ADC. The right
The MAX9867 features an I2C/SMBus-compatible,
2-wire serial interface consisting of a serial-data line
(SDA) and a serial-clock line (SCL). SDA and SCL facilitate communication between the MAX9867 and the master at clock rates up to 400kHz. Figure 9 shows the
2-wire interface timing diagram. The master generates
SCL and initiates data transfer on the bus. The master
device writes data to the MAX9867 by transmitting the
proper slave address followed by the register address
and then the data word. Each transmit sequence is
framed by a START (S) or REPEATED START (Sr) condition and a STOP (P) condition. Each word transmitted to
the MAX9867 is 8 bits long and is followed by an
acknowledge clock pulse. A master reading data from
the MAX9867 transmits the proper slave address
followed by a series of nine SCL pulses. The MAX9867
transmits data on SDA in sync with the master-generated
SCL pulses. The master acknowledges receipt of each
byte of data. Each read sequence is framed by a START
or REPEATED START condition, a not acknowledge, and
a STOP condition. SDA operates as both an input and an
open-drain output. A pullup resistor, typically greater
than 500Ω is required on SDA. SCL operates only as an
input. A pullup resistor, typically greater than 500Ω, is
required on SCL if there are multiple masters on the bus,
or if the single master has an open-drain SCL output.
Series resistors in line with SDA and SCL are optional.
Series resistors protect the digital inputs of the
MAX9867 from high-voltage spikes on the bus lines, and
minimize crosstalk, and undershoot of the bus signals.
Bit Transfer
One data bit is transferred during each SCL cycle. The
data on SDA must remain stable during the high period
of the SCL pulse. Changes in SDA while SCL is high
are control signals. See the
START and STOP
Conditions
section.
START and STOP Conditions
SDA and SCL idle high when the bus is not in use. A
master initiates communication by issuing a START condition. A START condition is a high-to-low transition on
SDA with SCL high. A STOP condition is a low-to-high
transition on SDA while SCL is high (Figure 10). A START
condition from the master signals the beginning of a
transmission to the MAX9867. The master terminates
transmission, and frees the bus, by issuing a STOP condition. The bus remains active if a REPEATED START
condition is generated instead of a STOP condition.
Figure 9. 2-Wire Interface Timing Diagram
Figure 10. START, STOP, and REPEATED START Conditions
The MAX9867 recognizes a STOP condition at any
point during data transmission except if the STOP condition occurs in the same high pulse as a START condition. For proper operation, do not send a STOP
condition during the same SCL high pulse as the
START condition.
Slave Address
The slave address is defined as the 7 most significant
bits (MSBs) followed by the read/write bit. For the
MAX9867, the 7 most significant bits are 0011000.
Setting the read/write bit to 1 (slave address = 0x31)
configures the MAX9867 for read mode. Setting the
read/write bit to 0 (slave address = 0x30) configures
the MAX9867 for write mode. The address is the first
byte of information sent to the MAX9867 after the
START condition.
Acknowledge
The acknowledge bit (ACK) is a clocked 9th bit that the
MAX9867 uses to handshake receipt each byte of data
when in write mode (see Figure 11). The MAX9867 pulls
down SDA during the entire master-generated 9th clock
pulse if the previous byte is successfully received.
Monitoring ACK allows for detection of unsuccessful
data transfers. An unsuccessful data transfer occurs if
a receiving device is busy or if a system fault has
occurred. In the event of an unsuccessful data transfer,
the bus master retries communication. The master pulls
down SDA during the 9th clock cycle to acknowledge
receipt of data when the MAX9867 is in read mode. An
acknowledge is sent by the master after each read byte
to allow data transfer to continue. A not acknowledge is
sent when the master reads the final byte of data from
the MAX9867, followed by a STOP condition.
Write Data Format
A write to the MAX9867 includes transmission of a
START condition, the slave address with the R/W bit set
to 0, 1 byte of data to configure the internal register
address pointer, 1 or more bytes of data, and a STOP
condition. Figure 12 illustrates the proper frame format
for writing 1 byte of data to the MAX9867. Figure 10
illustrates the frame format for writing n bytes of data to
the MAX9867.
The slave address with the R/W bit set to 0 indicates
that the master intends to write data to the MAX9867.
The MAX9867 acknowledges receipt of the address
byte during the master-generated 9th SCL pulse.
The second byte transmitted from the master configures the MAX9867’s internal register address pointer.
The pointer tells the MAX9867 where to write the next
byte of data. An acknowledge pulse is sent by the
MAX9867 upon receipt of the address pointer data.
The third byte sent to the MAX9867 contains the data
that is written to the chosen register. An acknowledge
pulse from the MAX9867 signals receipt of the data byte.
The address pointer autoincrements to the next register
address after each received data byte. This autoincrement feature allows a master to write to sequential registers within one continuous frame. Figure 13 illustrates
how to write to multiple registers with one frame. The
master signals the end of transmission by issuing a
STOP (P) condition. Register addresses greater than
0x17 are reserved. Do not write to these addresses.
Read Data Format
Send the slave address with the R/W bit set to 1 to initiate a read operation. The MAX9867 acknowledges
receipt of its slave address by pulling SDA low during
the 9th SCL clock pulse. A START (S) command followed by a read command resets the address pointer
to register 0x00.
The first byte transmitted from the MAX9867 is the content of register 0x00. Transmitted data is valid on the
rising edge of SCL. The address pointer autoincrements after each read data byte. This autoincrement
feature allows all registers to be read sequentially within
one continuous frame. A STOP condition can be issued
after any number of read data bytes. If a STOP condition is issued followed by another read operation, the
first data byte to be read is from register 0x00.
The address pointer can be preset to a specific register
before a read command is issued. The master presets
the address pointer by first sending the MAX9867’s
slave address with the R/W bit set to 0 followed by the
register address. A REPEATED START (Sr) condition is
then sent followed by the slave address with the R/W bit
set to 1. The MAX9867 then transmits the contents of
the specified register. The address pointer autoincrements after transmitting the first byte.
The master acknowledges receipt of each read byte
during the acknowledge clock pulse. The master must
acknowledge all correctly received bytes except the
last byte. The final byte must be followed by a not
acknowledge from the master and then a STOP condition. Figure 14 illustrates the frame format for reading 1
byte from the MAX9867. Figure 15 illustrates the frame
format for reading multiple bytes from the MAX9867.
Figure 13. Writing n Bytes of Data to the MAX9867
Figure 14. Reading 1 Byte of Data from the MAX9867
ACKNOWLEDGE FROM MAX9867
ACKNOWLEDGE FROM MAX9867
S
SLAVE ADDRESS
R/W
ACKNOWLEDGE FROM MAX9867
S
R/W
ACKNOWLEDGE FROM MAX9867
A
REGISTER ADDRESS
ACKNOWLEDGE FROM MAX9867
0
A
DATA BYTE 1
1 BYTE
ACKNOWLEDGE FROM MAX9867
Sr1SLAVE ADDRESSREGISTER ADDRESSSLAVE ADDRESS DATA BYTE
Figure 15. Reading n Bytes of Data from the MAX9867
Applications Information
Proper layout and grounding are essential for optimum
performance. When designing a PCB for the MAX9867,
partition the circuitry so that the analog sections of the
MAX9867 are separated from the digital sections. This
ensures that the analog audio traces are not routed
near digital traces.
Use a large continuous ground plane on a dedicated
layer of the PCB to minimize loop areas. Connect
AGND and DGND directly to the ground plane using
the shortest trace length possible. Proper grounding
improves audio performance, minimizes crosstalk
between channels, and prevents any digital noise from
coupling into the analog audio signals.
Ground the bypass capacitors on MICBIAS, REG,
PREG, and REF directly to the ground plane with minimum trace length. Also be sure to minimize the path
length to AGND. Bypass AVDD directly to AGND.
Connect all digital I/O termination to the ground plane
with minimum path length to DGND. Bypass DVDD and
DVDDIO directly to DGND.
Route microphone signals from the microphone to the
MAX9867 as a differential pair, ensuring that the positive and negative signals follow the same path as closely as possible with equal trace length. When using
single-ended microphones or other single-ended audio
sources, ground the negative microphone input as near
as possible to the audio source and then treat the positive and negative traces as differential pairs.
The MAX9867 TQFN package features an exposed
thermal pad on its underside. Connect the exposed
thermal pad to AGND.
An evaluation kit (EV Kit) is available to provide an
example layout for the MAX9867. The EV kit allows
quick setup of the MAX9867 and includes easy-to-use
software, allowing all internal registers to be controlled.
ACKNOWLEDGE FROM MAX9867
ACKNOWLEDGE FROM MAX9867
R/W
0
REPEATED START
S
Sr1SLAVE ADDRESSREGISTER ADDRESSSLAVE ADDRESS DATA BYTE
For the latest package outline information and land patterns, go to www.maxim-ic.com/packages.
QFN THIN.EPS
MAX9867
Ultra-Low Power Stereo Audio Codec
Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are
implied. Maxim reserves the right to change the circuitry and specifications without notice at any time.
54
____________________Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408-737-7600