FEATURES
Single-Chip Integrated ∑∆ Digital Audio Stereo Codec
Microsoft® and Windows® Sound System Compatible
MPC Level-2+ Compliant Mixing
16 mA Bus Drive Capability
Supports Two DMA Channels for Full Duplex Operation
On-Chip Capture and Playback FIFOs
Advanced Power-Down Modes
Programmable Gain and Attenuation
Sample Rates from 4.0 kHz to 50 kHz Derived from a
Single Clock or Crystal Input
68-Lead PLCC, 100-Lead TQFP Packages
Operation from +5 V Supplies
Byte-Wide Parallel Interface to ISA and EISA Buses
Pin Compatible with AD1848, AD1846, CS4248, CS4231
PRODUCT OVERVIEW
The Parallel Port AD1845 SoundPort Stereo Codec integrates
key audio data conversion and control functions into a single
integrated circuit. The AD1845 provides a complete, single chip
computer audio solution for business audio and multimedia
applications. The codec includes stereo audio converters, com-
SoundPort® Stereo Codec
AD1845
plete on-chip filtering, MPC Level-2 compliant analog mixing,
programmable gain, attenuation and mute, a variable sample
frequency generator, FIFOs, and supports advanced powerdown modes. It provides a direct, byte-wide interface to both
ISA (“AT”) and EISA computer buses for simplified implementation on a computer motherboard or add-in card.
The AD1845 SoundPort Stereo Codec supports a DMA request/grant architecture for transferring data with the host computer bus. One or two DMA channels can be supported.
Programmed I/O (PIO) mode is also supported for control
register accesses and for applications lacking DMA control.
Two input control lines support mixed direct and indirect addressing of thirty-seven internal control registers over this asynchronous interface. The AD1845 includes dual DMA count
registers for full duplex operation enabling the AD1845 to capture data on one DMA channel and play back data on a separate
channel. The FIFOs on the AD1845 reduce the risk of losing
data when making DMA transfers over the ISA/EISA bus. The
FIFOs buffer data transfers and allow for relaxed timing in
acknowledging requests for capture and playback data.
(Continued on Page 9)
FUNCTIONAL BLOCK DIAGRAM
ANALOG
L_MIC
R_MIC
L_LINE
R_LINE
L_AUX1
R_AUX1
L_OUT
M_OUT
R_OUT
M_IN
L_AUX2
R_AUX2
SoundPort is a registered trademark of Analog Devices, Inc.
Microsoft and Windows are registered trademarks of Microsoft Corporation.
0 dB/
20 dB
MUTE
ANALOG SUPPLY
GAM
S
S
SSS
DIGITAL SUPPLYCLOCK SOURCE
L
M
GAIN
U
X
R
GAIN
GAMGAM
SS
GAMGAM
GAM = GAIN
ATTENTUATE
MUTE
L
ATTENUATE
MUTE
R
ATTENUATE
MUTE
VARIABLE SAMPLE
FREQUENCY GENERATOR
SD A/D
CONVERTER
SD A/D
CONVERTER
DIGITAL MIX
ATTENUATE
SD D/A
CONVERTER
SD D/A
CONVERTER
REFERENCE
V
REF_F
S
V
REF
POWER DOWNRESET
AD1845
m-LAW
A-LAW
LINEAR
m-LAW
A-LAW
LINEAR
S
FIFO
FIFO
P
A
R
A
L
L
E
L
P
O
R
T
CONTROL
REGISTERS
DIGITAL
PLAYBACK REQ
PLAYBACK ACK
CAPTURE REQ
CAPTURE ACK
ADR1:0
DATA7:0
CS
RD
WR
BUS DRIVER
CONTROL
HOST DMA
INTERRUPT
EXTERNAL
CONTROL
REV. C
Information furnished by Analog Devices is believed to be accurate and
reliable. However, no responsibility is assumed by Analog Devices for its
use, nor for any infringements of patents or other rights of third parties
which may result from its use. No license is granted by implication or
otherwise under any patent or patent rights of Analog Devices.
Line Inputs (Input L, Ground R, Read R; Input R, Ground L, Read L)–90–80dB
Line to MIC (Input LINE, Ground and Select MIC, Read ADC)–90–80dB
Line to AUX1–90–80dB
Line to AUX2–90–80dB
Gain Error (Full-Scale Span Relative to Nominal Input Voltage)–18.5+10%
Interchannel Gain Mismatch (Difference of Gain Errors)±0.9dB
ADC Offset Error10mV
DIGITAL-TO-ANALOG CONVERTERS
MinTypMaxUnits
Resolution16Bits
Dynamic Range (–60 dB Input, THD+N Referenced to Full Scale, A-Weighted)7482dB
THD+N (Referenced to Full Scale)0.032%
–78–70dB
Signal-to-Intermodulation Distortion90dB
Gain Error (Full-Scale Span Relative to Nominal Output Voltage)–14.5+10%
Interchannel Gain Mismatch (Difference of Gain Errors)±0.6dB
DAC Crosstalk* (Input L, Zero R, Measure R_OUT; Input R, Zero L, Measure L_OUT)–80dB
Total Out-of-Band Energy (Measured from 0.6 × F
Audible Out-of-Band Energy (Measured from 0.6 × FS to 20 kHz)*–70dB
to 100 kHz)*–50dB
S
DAC ATTENUATOR
MinTypMaxUnits
Step Size (0 dB to –22.5 dB)1.31.51.7dB
Step Size (–22.5 dB to –94.5 dB)*1.01.52.0dB
Output Attenuation Range Span*93.594.595.5dB
ANALOG OUTPUT
MinTypMaxUnits
Full-Scale Output Voltage
OL = 01.72.02.2V p-p
OL = 12.42.833.11V p-p
Output Impedance*600Ω
External Load Impedance10kΩ
Output Capacitance*15pF
External Load Capacitance100pF
V
REF
V
Current Drive100µA
REF
V
Output Impedance4kΩ
REF
2.052.252.60V
Mute Attenuation of 0 dB Fundamental* (L_OUT, R_OUT, M_OUT)–80dB
Mute Click (Muted Output Minus Unmuted Midscale DAC Output)*±5mV
*Guaranteed, not tested.
REV. C
–3–
AD1845
SYSTEM SPECIFICATIONS
MinTypMaxUnits
System Frequency Response Ripple (Line In to Line Out)*1.0dB
Differential Nonlinearity*± 1LSB
Phase Linearity Deviation*5Degrees
STATIC DIGITAL SPECIFICATIONS
MinMaxUnits
High Level Input Voltage (V
Digital Inputs2.4V
XTAL1I2.4V
Low Level Input Voltage (V
High Level Output Voltage (V
Low Level Output Voltage (V
Input Leakage Current–1010µA
Output Leakage Current–1010µA
TIMING PARAMETERS (GUARANTEED OVER OPERATING TEMPERATURE RANGE, VDD = VCC = 5.0 V)
WR/RD Strobe Width(t
WR/RD Rising to WR/RD Falling(t
Write Data Setup to
WR Rising(t
RD Falling to Valid Read Data(t
CS Setup to WR/RD Falling(t
CS Hold from WR/RD Rising(t
Adr Setup to
Adr Hold from
WR/RD Falling(t
WR/RD Rising(t
DAK Rising to WR/RD Falling(t
DAK Falling to WR/RD Rising(t
DAK Setup to WR/RD Falling(t
Data Hold from
Data Hold from
DRQ Hold from
RD Rising(t
WR Rising(t
WR/RD Falling(t
DAK Hold from WR Rising(t
DAK Hold from RD Rising(t
DBEN/DBDIRDelay from WR/RD Falling(t
PWRDWN and RESET Low Pulsewidth300ns
*Guaranteed, not tested.
)
IH
)0.8V
IL
) IOH = –2 mA2.4V
OH
) IOL = 2 mA0.4V
OL
MinMaxUnits
)100ns
STW
)80ns
BWND
)10ns
WDSU
)40ns
RDDV
)10ns
CSSU
)0ns
CSHD
)10ns
ADSU
)10ns
ADHD
)20ns
SUDK1
)0ns
SUDK2
)10ns
DKSU
)20ns
DHD1
)15ns
DHD2
)25ns
DRHD
)10ns
DKHDa
)10ns
DKHDb
)30ns
DBDL
–4–
REV. C
AD1845
WARNING!
ESD SENSITIVE DEVICE
POWER SUPPLY
MinTypMaxUnits
Power Supply Range–Digital and Analog4.755.25V
Power Supply Current130mA
Analog Supply Current45mA
Digital Supply Current85mA
Power Dissipation
(At Both Analog and Digital Supply Pins, both ADCs and DACs)40dB
CLOCK SPECIFICATIONS*
MinMaxUnits
Input Clock Frequency33MHz
Recommended Clock Duty Cycle1090%
Power Up Initialization Time512ms
*Guaranteed, not tested.
Specifications subject to change without notice.
ORDERING GUIDE
TemperaturePackagePackage
ModelRangeDescriptionOption
AD1845JP0°C to +70°C68-Lead PLCCP-68A
AD1845JP-REEL
AD1845JST0°C to +70°C100-Lead TQFPST-100
NOTES
1
P = Plastic Leaded Chip Carrier; ST = Thin Quad Flatpack.
2
13" Reel, multiples of 250 pcs.
2
0°C to +70°C68-Lead PLCCP-68A
ABSOLUTE MAXIMUM RATINGS*
1
Power Supplies
Digital (V
Analog (V
)–0.36.0V
DD
)–0.36.0V
CC
Input Current
(Except Supply Pins)±10.0mA
Analog Input Voltage (Signal Pins)–0.3V
Digital Input Voltage (Signal Pins)–0.3V
Ambient Temperature (Operating)0+70°C
ENVIRONMENTAL CONDITIONS
Ambient Temperature Rating:
T
= T
AMB
T
= Case Temperature in °C
CASE
– (PD ×θCA)
CASE
PD = Power Dissipation in W
θ
= Thermal Resistance (Case-to-Ambient)
CA
θ
= Thermal Resistance (Junction-to-Ambient)
JA
θ
= Thermal Resistance (Junction-to-Case)
JC
Packageu
JA
u
JC
u
CA
Storage Temperature–65+150°C
*Stresses greater than those listed under Absolute Maximum Ratings may cause
permanent damage to the device. This is a stress rating only; functional operation
of the device at these or any other conditions above those indicated in the
operational section of this specification is not implied. Exposure to absolute
maximum rating conditions for extended periods may affect device reliability.
PLCC38°C/W8°C/W30°C/W
TQFP44°C/W8 °C/W93°C/W
CAUTION
ESD (electrostatic discharge) sensitive device. Electrostatic charges as high as 4000 V readily
accumulate on the human body and test equipment and can discharge without detection.
Although the AD1845 features proprietary ESD protection circuitry, permanent damage may
occur on devices subjected to high energy electrostatic discharges. Therefore, proper ESD
precautions are recommended to avoid performance degradation or loss of functionality.
CDRQ127OCapture Data Request. The assertion of this signal HI indicates that the codec has a cap-
tured audio sample from the ADC ready for transfer. This signal will remain asserted
until the internal capture FIFO is empty.
CDAK116ICapture Data Acknowledge. The assertion of this active LO signal indicates that the RD
cycle occurring is a DMA read from the capture buffer.
PDRQ149OPlayback Data Request. The assertion of this signal HI indicates that the codec is ready
for more DAC playback data. The signal will remain asserted until the internal playback
FIFO is full.
PDAK138IPlayback Data Acknowledge. The assertion of this active LO signal indicates that the WR
cycle occurring is a DMA write to the playback buffer.
ADR1:09 & 10100 & 1ICodec Addresses. These address pins are asserted by the codec interface logic during a
control register/PIO access. The state of these address lines determine which direct
register is accessed.
RD6075IRead Command Strobe. This active LO signal defines a read cycle from the codec. The
cycle may be a read from the control/PIO registers, or the cycles could be a read from
the codec’s DMA sample registers.
WR6176IWrite Command Strobe. This active LO signal indicates a write cycle to the codec. The
cycle may be a write to the control/PIO registers, or the cycle could be a write to the
codec’s DMA sample registers.
CS5974IAD1845 Chip Select. The codec will not respond to any control/PIO cycle accesses
unless this active LO signal is LO. This signal is ignored during DMA transfers.
DATA7:03–6 &84–87 & I/OData Bus. These pins transfer data and control information between the codec and
65–6890–93the host.
DBEN6378OData Bus Enable. This pin enables the external bus drivers. This signal is normally HI.
For control register/PIO cycles,
DBEN = (WR or RD) and CS
For DMA cycles,
DBEN = (WR or RD) and (PDAK or CDAK).
DBDIR6277OData Bus Direction. This pin controls the direction of the data bus transceiver. HI
enables writes from the host bus to the AD1845; LO enables reads from the AD1845 to
the host bus. This signal is normally HI.
For control register/PIO cycles,
DBDIR =
For DMA cycles,
DBDIR = RDand (PDAK or CDAK).
RDandCS
REV. C
–7–
AD1845
Analog Signals
Pin NamePLCCTQFPI/ODescription
L_LINE3031ILeft Line Input.
R_LINE2728IRight Line Input.
L_MIC2930ILeft Microphone Input. This signal can be either line level or –20 dB from line level
(using the on-chip 20 dB gain block).
R_MIC2829IRight Microphone Input. This signal can be either line level or –20 dB from line level
(using the on-chip 20 dB gain block).
L_AUX13945ILeft Auxiliary #1 Line Input.
R_AUX14248IRight Auxiliary #1 Line Input.
L_AUX23844ILeft Auxiliary #2 Line Input.
R_AUX24349IRight Auxiliary #2 Line Input.
L_OUT4046OLeft Line Output.
R_OUT4147ORight Line Output.
M_IN4656IMono Input.
M_OUT4757OMono Output.
Miscellaneous
Pin NamePLCCTQFPI/ODescription
XTAL1I1712I24.576 MHz Crystal #1 Input.
XTAL1O1813O24.576 MHz Crystal #1 Output.
XTAL2I2116Not used on the AD1845.
XTAL2O2217Not used on the AD1845.
PWRDWN2318IPower Down Signal. Active LO places the AD1845 in its lowest power consumption
mode. All sections of the AD1845, including the digital interface, are shut down and
consume minimal power.
INT5772OHost Interrupt Pin. A host interrupt is generated to notify the host that a specified
event has occurred.
XCTL1:058 & 56 73 & 71OExternal Control. These signals reflect the current status of register bits inside the
AD1845. They can be used for signaling or to control external logic.
RESET2419IReset. Active LO resets all digital registers and filters, and resets all analog filters. Active
LO places the AD1845 in the lowest power consumption mode. XTAL1 is required to be
running during the minimum low pulsewidth of the reset signal.
V
REF
V
REF_F
L_FILT3133ILeft Channel Filter. This pin requires a 1.0 µF capacitor to analog ground for proper
R_FILT2625IRight Channel Filter. This pin requires a 1.0 µF capacitor to analog ground for proper
NC48–52, 2–5, 21–24No Connect.
3235OVoltage Reference. Nominal 2.25 volt reference available for dc-coupling and level-
shifting. V
should not be used to sink or source current.
REF
3338IVoltage Reference Filter. Voltage reference filter point for external bypassing only.
operation.
operation.
5526, 27, 32, 34,
36, 37, 39,
50–53, 58–66,
69, 70, 80–83,
94–97
–8–
REV. C
Power Supplies
Pin NamePLCCTQFPI/ODescription
V
CC
35 & 3641 & 42IAnalog Supply Voltage (+5 V).
GNDA34 & 3740 & 43IAnalog Ground.
V
DD
1, 7, 15,10, 14,IDigital Supply Voltage (+5 V).
19, 45,55, 68,
5488, 98
GNDD2, 8, 16,11, 15, 20,IDigital Ground.
20, 25,54, 67,
44, 53,79, 89,
6499
(Continued from page 1)
AD1845
AD1845
DATA7:0
DBDIR
DBEN
PDRQ
CDRQ
PDAK
CDAK
CS
A1
A0
WR
RD
INT
ADDRESS
DECODE
8
74_245
DIR
G
BA
AEN
18
SA19:2
SA1
SA0
IOWC
IORC
8
DATA7:0
DRQ <X>
DRQ <Y>
DAK <X>
DAK <Y>
IRQ <Z>
I
S
A
B
U
S
Figure 1. Interface to ISA Bus
External circuit requirements are limited to a minimal number
of low cost support components. Anti-imaging DAC output
filters are incorporated on-chip. Dynamic range exceeds 80dB
over the 20 kHz audio band. Sample rates from 4 kHz to 50kHz
are supported from a single external crystal or clock source.
The AD1845 has built-in 8/16 mA (user selectable) bus drivers.
If 24 mA drive capability is required, the AD1845 generates
enable and direction controls for IC bus buffers such as the
74
245.
The codec includes a stereo pair of ∑∆ analog-to-digital converters and a stereo pair of ∑∆ digital-to-analog converters. The
AD1845 mixer surpasses MPC Level-2 recommendations.
Inputs to the ADC can be selected from four stereo pairs of
analog signals: line (LINE), microphone (MIC), auxiliary line
#1 (AUX1), and post-mixed DAC output. A software-controlled programmable gain stage allows independent gain for
each channel going into the ADC. In addition, the analog mixer
allows the mono input (M_IN), MIC, AUX1, LINE and auxiliary line #2 (AUX2) signals to be mixed with the DACs’ output.
The ADCs’ output can be digitally mixed with the DACs’ input.
The pair of 16-bit outputs from the ADCs is available over a
byte-wide bidirectional interface that also supports 16-bit digital
input to the DACs and control information. The AD1845 can
accept and generate 16-bit twos complement PCM linear digital
data in both little endian or big endian byte ordering, 8-bit
unsigned magnitude PCM linear data, and 8-bit µ-law or A-law
companded digital data.
The ∑∆ DACs are preceded by a digital interpolation filter. An
attenuator provides independent user volume control over each
DAC channel. Nyquist images and shaped quantized noise are
removed from the DACs’ analog stereo output by on-chip
switched-capacitor and continuous-time filters.
The AD1845 supports multiple low power and power-down
modes to support notebook and portable computing multimedia
applications. The ADC, DAC, and mixer paths can be suspended independently allowing the AD1845 to be used for
capture-only or playback-only, lessening power consumption
and extending battery life.
The AD1845 includes a variable sample frequency generator,
that allows the codec to instantaneously change sample rates
with a resolution of 1 Hz without “clicks” and “pops.” Additionally, ∑∆ quantization noise is kept out of the 20 kHz audio
band regardless of the chosen sample rate. The codec uses the
variable sample frequency generator to derive all internal clocks
from a single external crystal or clock source.
Expanded Mode (MODE2)
MODE1 is the initial state of the AD1845. In this state the
AD1845 appears as an AD1848 compatible device. To access
the expanded modes of operation on the AD1845, the MODE2
bit should be set in the Miscellaneous Information Control
Register. When this bit is set to one, 16 additional indirect
registers can be addressed allowing the user to access the
AD1845’s expanded features. The AD1845 can return to
MODE1 operation by clearing the MODE2 bit. In both
MODE1 and MODE2, the capture and playback FIFOs are
active to prevent data loss.
The additional MODE2 functions are:
1. Full-Duplex DMA support.
2. MIC input mixer, mute and volume control.
3. Mono output with mute control.
4. Mono input with mixer volume control.
5. Software controlled advanced power-down modes.
6. Programmable sample rates from 4kHz to 50 kHz in 1 Hz
increments.
REV. C
–9–
AD1845
FUNCTIONAL DESCRIPTION
This section overviews the functionality of the AD1845 and is
intended as a general introduction to the capabilities of the
device. As much as possible, detailed reference information has
been placed in “Control Registers” and other sections. The
user is not expected to refer repeatedly to this section.
Analog Inputs
The AD1845 SoundPort Stereo Codec accepts stereo line-level
and microphone-level inputs. The LINE, MIC, AUX1, and
post-mixed DAC output are available to the ADC multiplexer.
The DAC output can be mixed with LINE, MIC, AUX1,
AUX2 and M_IN. Each channel of the MIC inputs can be
amplified by +20 dB to compensate for the difference between
line levels and typical condenser microphone levels.
Analog Mixing
The M_IN mono input signal, MIC, LINE, AUX1 and AUX2
analog stereo signals can be mixed in the analog domain with
the DAC output. Each channel of each AUX, LINE and MIC
analog input can be independently gained/attenuated from
+12 dB to –34.5 dB in 1.5 dB steps or completely muted.
M_IN can be attenuated from 0 dB to –45 dB in 3 dB steps or
muted. The post-mixed DAC outputs are available on L_OUT
and R_OUT and also to the ADC input multiplexer.
Even if the AD1845 is not playing back data from its DACs, the
analog mix function can still be active.
Analog-to-Digital Datapath
The PGA following the input multiplexer allows independent
selectable gains for each channel from 0dB to 22.5dB in
+1.5 dB steps. The codec can operate either in a global stereo
mode or in a global mono mode with left-channel inputs
appearing at both channel outputs.
The AD1845 ∑∆ ADCs incorporate a fourth-order modulator.
A single pole of passive filtering is all that is required for antialiasing the analog input because of the ADC’s high over sampling ratio. The ADCs include linear-phase digital decimation
filters that low-pass filter the input to 0.4 × F
. (“FS” is the
S
word rate or “sampling frequency.”) ADC input over range
conditions are reported on status bits in the Test and Initialization Register.
Digital-to-Analog Datapath
The ∑∆ DACs are preceded by a programmable attenuator and
a low-pass digital interpolation filter. The anti-imaging interpolation filter over samples and digitally filters the higher frequency images. The attenuator allows independent control of
each DAC channel from 0 dB to –94.5 dB in –1.5 dB steps plus
full mute. The DACs’ ∑∆ noise shapers also over sample and
convert the signal to a single-bit stream. The DAC outputs are
then filtered in the analog domain by a combination of switchedcapacitor and continuous-time filters. They remove the very
high frequency components of the DAC bit stream output. No
external components are required.
Changes in DAC output attenuation take effect only on zero
crossings, eliminating “zipper” noise on playback. Each channel has its own independent zero-crossing detector and attenuator change control circuitry. A timer guarantees that requested
volume changes will occur even in the absence of a zero crossing. The time-out period is 8 milliseconds at a 48 kHz sampling
rate and 48 milliseconds at an 8 kHz sampling rate. (Timeout
[ms] ≈ 384 ÷ F
[kHz].)
S
Digital Mixing
Stereo digital output from the ADCs can be digitally mixed with
the input to the DACs. Digital output from the ADCs going out
of the data port is unaffected by the digital mix. Along the
digital mix datapath, the 16-bit linear output from the ADCs
is attenuated by an amount specified with control bits. Both
channels of the digital mix datapath are attenuated by the same
amount. (Note that internally the AD1845 always works with
16-bit PCM linear data, digital mixing included; format conversions take place at the input and output.)
Sixty-four steps of –1.5 dB attenuation are supported to –94.5dB.
The digital mix datapath can also be completely muted. Note
that the level of the mixed signal is also a function of the input
PGA settings, since they affect the ADCs’ output.
The attenuated digital mix data is digitally summed with the
DAC input data prior to the DACs’ datapath attenuators. The
digital sum of digital mix data and DAC input data is clipped at
plus or minus full scale and does not wrap around. Because both
stereo signals are mixed before the output attenuators, mix data is
attenuated a second time by the DACs’ datapath attenuators.
In case the AD1845 is capturing data, but ADC output data is
not removed in time (“ADC overrun”), the last sample captured
before overrun will be used for the digital mix. In case the
AD1845 is playing back data, but input digital DAC data fails
to arrive in time (“DAC underrun”), a midscale zero will be
added to the digital mix data when the DACZ control bit is set
to 0; otherwise, the DAC will output the previous valid sample
in an underrun condition.
Analog Outputs
Stereo and mono line-level outputs are available at external
pins. Each channel of this output can be independently muted.
When muted, the outputs will settle to a dc value near V
REF
, the
midscale reference voltage. The output is selectable for 2.0 V
peak-to-peak or 2.8 V peak-to-peak. When selecting the LINE
output as an input to the ADC, the ADC automatically compensates for the output level selection.
Digital Data Types
The AD1845 supports five global data types: 16-bit twos complement linear PCM (little endian and big endian byte ordering),
8-bit unsigned linear PCM, companded µ-law, and 8-bit com-
panded A-law, as specified by control register bits. Data in all
formats is always transferred MSB first. All data formats that are
less than 16 bits are MSB-aligned to ensure the use of full
system resolution.
The 16-bit PCM data format is capable of representing 96 dB
of dynamic range. Eight-bit PCM can represent 48 dB of dynamic range. Companded µ-law and A-law data formats use
nonlinear coding with less precision for large amplitude signals.
The loss of precision is compensated for by an increase in dynamic range to 64 dB and 72 dB, respectively.
On input, 8-bit companded data is expanded to an internal
linear representation, according to whether µ-law or A-law was
specified in the codec’s internal registers. Note that when µ-law
compressed data is expanded to a linear format, it requires
14 bits. A-law data expanded requires 13 bits.
–10–
REV. C
AD1845
COMPRESSED
INPUT DATA
EXPANSION
DAC INPUT000/00
15
MSBLSB
15
MSBLSB
15
MSBLSB
8 7
3/2 2/1
3/2 2/1
0
0
0
Figure 2. µ-Law or A-Law Expansion
When 8-bit companding is specified, the ADCs’ linear output is
compressed to the format specified.
ADC OUTPUT
TRUNCATION
COMPRESSION
15
MSBLSB
MSBLSB
15
MSBLSB
3/2 2/1
8 7
00000000
0
015
0
Figure 3.µ-Law or A-Law Compression
Note that all format conversions take place at input or output.
Internally, the AD1845 always uses 16-bit linear PCM representations to maintain maximum precision.
Timer Registers
The timer registers are provided for system level synchronization, and for periodic interrupt generation. The 16-bit timer
time base is determined by the frequency of the connected input
clock source.
The timer is enabled by setting the Timer Enable bit, TE, in the
Alternate Feature Enable register. To set the timer, load the
Upper and Lower Timer Bits Registers. The timer value will
then be loaded into an internal count register with a value of
approximately 10 µs (the exact timer value is listed in the regis-
ter descriptions). The internal count register will decrement
until it reaches zero, then the Timer Interrupt bit, TI, is set and
an interrupt will be sent to the host. The next timer clock will
load the internal count register with the value of the Timer
Register, and the timer will be reinitialized. To clear the interrupt, write to the Status Register or write a “0” to TI.
Interrupts
The AD1845 supports interrupt conditions generated by DMA
playback count expiration, DMA capture count expiration, or
timer expiration. The INT bit will remain set, HI, until a write
has been completed to the Status Register or by clearing the TI,
CI, or PI bit (depending on the existing condition) in the Capture Playback Timer Register. The IEN bit of the Pin Control
Register determines whether the interrupt pin responds to an
interrupt condition and reflects the interrupt state on the
INT status bit.
Power Supplies and Voltage Reference
The AD1845 operates from a +5 V power supply. Independent
analog and digital supplies are recommended for optimal performance though excellent results can be obtained in single-supply
systems. A voltage reference is included on the codec and its
2.25 V buffered output is available on an external pin (V
REF
).
The reference output can be used for biasing op amps used in
dc coupling. The internal reference is externally bypassed to
analog ground at the V
REF_F
pin.
Clocks and Sample Rates
The AD1845 operates from a single external crystal or clock
source. From a single input, a wide range of sample rates can be
generated. The AD1845 default frequency source is a
24.576 MHz input. The AD1845 can also be driven from a
14.31818 MHz (OSC), 24 MHz, 25 MHz or 33 MHz input
frequency source. In MODE1, the input drives the internal
variable sample frequency generator to derive the following
AD1848 compatible sample rates: 5.5125, 6.615, 8, 9.6,
11.025, 16, 18.9, 22.05, 27.42857, 32, 33.075, 37.8, 44.1,
48 kHz. In MODE2, the AD1845 can be programmed to generate any sample frequency between 4 kHz and 50kHz with
1 Hz resolution. Note that it is no longer required to enter
Mode Change Enable (MCE) to change the sample rate. This
feature allows the user to change the AD1845’s sample rate “on
the fly.”
CONTROL REGISTERS
Control Register Architecture
The AD1845 SoundPort Stereo Codec accepts both data and
control information through its byte-wide parallel port. Indirect
addressing minimizes the number of external pins required to
access all 37 of its byte-wide internal registers. Only two external address pins, ADR1:0, are required to accomplish all data
and control transfers. These pins select one of five direct registers. (ADR1:0 = 3 addresses two registers, depending on
whether the transfer is for a playback or capture.)
ADR1:0Register Name
0Index Address Register
1Indexed Data Register
2Status Register
3PIO Data Register
Figure 4. Direct Register Map
REV. C
–11–
AD1845
A write to or a read from the Indexed Data Register will access the Indirect Register which is indexed by the value most recently
written to the Index Address Register. The Status Register and the PIO Data Register are always accessible directly, without
indexing. The 32 Indirect Register indexes are shown in Figure 5: