AD1940/AD1941
Rev. B | Page 28 of 36
SERIAL DATA INPUT/OUTPUT PORTS
The AD1940/AD1941’s flexible serial data input and output
ports can be set to accept or transmit data in 2-channel formats
or in an 8- or 16-channel TDM stream. Data is processed in
twos complement, MSB first format. The left channel data field
always precedes the right channel data field in the 2-channel
streams. In the TDM modes, Slots 0 to 3 (8-channel TDM) or
Slots 0 to 7 (16-channel TDM) fall in the first half of the audio
frame, and Slots 4 to 7 (or Slots 8 to 15 in 16-channel TDM) are
in the second half of the frame. The serial modes are set in the
serial output and serial input control registers.
The input control register allows control of clock polarity and
data input modes. The valid data formats are I
2
S , left-justified,
right-justified (24-, 20-, 18-, or 16-bit), 8-channel, and
16-channel TDM. In all modes except for the right-justified
modes, the serial port accepts an arbitrary number of bits up to
a limit of 24. Extra bits do not cause an error, but they are trun-
cated internally. Proper operation of the right-justified modes
requires that there be exactly 64 BCLKs per audio frame. The
TDM data is input on SDATA_IN2 and SDATA_IN3 when in
2 × 8-channel TDM mode, and on SDATA_IN2 in 16-channel
TDM mode. The LRCLK in TDM mode can be input to the
AD1940/AD1941 as either a 50/50 duty cycle clock or as a bit-
wide pulse.
The two clock domains on the serial output ports can generate
two separate 8-channel TDM streams or one 16-channel TDM
stream. When in 16-channel TDM mode, the data is clocked by
LRCLK_OUT0 and BCLK_OUT0. The AD1940/AD1941 must
be in slave mode for 16-channel TDM mode, unless the data is
sampled at 48 kHz; the parts cannot generate a TDM bit clock
that is fast enough to support 96 kHz or 192 kHz. In 8-channel
TDM mode, the AD1940/AD1941 can be masters for 48 kHz
and 96 kHz data, but not for 192 kHz data. Table 36 displays the
modes in which the serial output port will function.
The output control registers give the user control of clock
polarities, clock frequencies, clock types, and data format. In all
modes except for the right-justified modes (MSB delayed by 8,
12, or 16), the serial port accepts an arbitrary number of bits up
to a limit of 24. Extra bits do not cause an error, but are
truncated internally. Proper operation of the right-justified
modes requires the LSB to align with the edge of the LRCLK.
The default settings of all serial port control registers
correspond to 2-channel I
2
S mode. LRCLK_OUT0 and
BCLK_OUT0 are clocks for Serial Output Ports 0 to 7, and
LRCLK_OUT1 and BCLK_OUT1 Clock Ports 8 to 15.
All registers default to being set as all 0s. All register settings
apply to both master and slave modes unless otherwise noted.
Table 37 shows the proper configurations for standard audio
data formats.
Table 36. Serial Output Port Master/Slave Mode Capabilities
f
S
2-Channel Modes (I
2
S, Left-Justified, Right-Justified) 8-Channel TDM 16-Channel TDM
48 kHz Master and slave Master and slave Master and slave
96 kHz Master and slave Master and slave Slave only
192 kHz Master and slave Slave only Slave only
Table 37. Data Format Configurations
Format LRCLK Polarity LRCLK Type BCLK Polarity MSB Position
I
2
S (Figure 23)
Frame begins on
falling edge
Clock Data changes on falling edge Delayed from LRCLK edge by one BCLK
Left-Justified
(Figure 24)
Frame begins on
rising edge
Clock Data changes on falling edge Aligned with LRCLK edge
Right-Justified
(Figure 25)
Frame begins on
rising edge
Clock Data changes on falling edge Delayed from LRCLK edge by 8, 12, or 16 BCLKs
TDM with Clock
(Figure 26)
Frame begins on
falling edge
Clock Data changes on falling edge Delayed from start of word clock by one BCLK
TDM with Pulse
(Figure 27)
Frame begins on
rising edge
Pulse Data changes on falling edge Delayed from start of word clock by one BCLK
AD1940/AD1941
Rev. B | Page 29 of 36
Table 38. Serial Output Control Register 1
(Channels 0–7) (2644)
Bits Function
15 Dither enable
0 = Diabled
1 = Enabled
14
Internally link TDM streams into single,
16-channel stream
0 = Indepenent
1 = Linked
13 LRCLK polarity
0 = Frame begins on falling edge
1 = Frame begins on rising edge
12 BCLK polarity
0 = Data changes on falling edge
1 = Data changes on rising edge
11 Master/Slave
0 = Slave
1 = Master
10:9 BCLK frequency (master mode only)
00 = core_clock/24
01 = core_clock/12
10 = core_clock/6
11 = core_clock/3
8:7 Frame sync frequency (master mode only)
00 = core_clock/1536
01 = core_clock/768
10 = core_clock/384
6 Frame sync type
0 = LRCLK
1 = Pulse
5 Serial output/TDM mode control
0 = 8 Serial data outputs
1 = Enable TDM (8- or 16-channel) on
SDATA_OUT0
4:2 MSB position
000 = Delay by 1
001 = Delay by 0
010 = Delay by 8
011 = Delay by 12
100 = Delay by 16
101 Reserved
111 Reserved
1:0 Output word length, Channels 0–7
00 = 24 bits
01 = 20 bits
10 = 16 bits
11 = Reserved
Table 39. Serial Output Control Register 2
(Channels 8–15) (2645)
Bits Function
15 Dither enable
0 = Disabled
1 = Enabled
14
Data capture serial out enable
(Uses SDATA_OUT7)
0 = Disable
1 = Enable
13 LRCLK polarity
0 = Frame begins on falling edge
1 = Frame begins on rising edge
12 BCLK polarity
0 = Data changes on falling edge
1 = Data changes on rising edge
11 Master/Slave
0 = Slave
1 = Master
10:9 BCLK frequency (master mode only)
00 = core_clock/24
01 = core_clock/12
10 = core_clock/6
11 = core_clock/3
8:7 Frame sync frequency (master mode only)
00 = core_clock/1536
01 = core_clock/768
10 = core_clock/384
6 Frame sync type
0 = LRCLK
1 = Pulse
5 Serial output/TDM mode control
0 = 8 serial data outputs
1 = Enable TDM on SDATA_OUT4 (8-channel)
or SDATA_OUT0 (16-channel)
4:2 MSB position
000 = Delay by 1
001 = Delay by 0
010 = Delay by 8
011 = Delay by 12
100 = Delay by 16
101 Reserved
111 Reserved
1:0 Output word length, Channels 8–15
00 = 24 bits
01 = 20 bits
10 = 16 bits
11 = Reserved
AD1940/AD1941
Rev. B | Page 30 of 36
SERIAL OUTPUT CONTROL REGISTERS
Dither Enable (Bit 15)
Setting this bit to 1 enables dither on the appropriate channels.
Internally Link TDM Streams into Single 16-Channel Stream
(Bit 14, Serial Output Control Register 1)
When this bit is set to 1, the TDM output stream is output in a
single 16-channel stream on SDATA_OUT0. When set to 0,
TDM data is output on two independent 8-channel streams on
Pins SDATA_OUT0 and SDATA_OUT4.
Data Capture Serial Out Enable (Bit 14, Serial Output
Control Register 2)
When set to 1, SDATA_OUT7 is set as the output of the data
capture digital output registers (2640–2641). See the Data
Capture Registers section for a full explanation of this mode.
LRCLK Polarity (Bit 13)
When set to 0, the left channel data is clocked when LRCLK is
low, and the right data clocked when LRCLK is high. When set
to 1, this is reversed.
BCLK Polarity (Bit 12)
This bit controls on which edge of the bit clock the output data
is clocked. Data changes on the falling edge of BCLK_OUTx
when this bit is set to 0, and on the rising edge when this bit is
set at 1.
Master/Slave (Bit 11)
This bit sets whether the output port is a clock master or slave.
The default setting is slave; on power-up, Pins BCLK_OUTx
and LRCLK_OUTx are set as inputs until this bit is set to 1, at
which time they become clock outputs.
BCLK Frequency (Bits 10:9)
When the output port is being used as a clock master, these bits
set the frequency of the output bit clock, which is divided down
from the internal 73.728 MHz core clock.
Frame Sync Frequency (Bits 8:7)
When the output port is used as a clock master, these bits set
the frequency of the output word clock on the LRCLK_OUTx
pins, which is divided down from the internal 73.728 MHz
core clock.
Frame Sync Type (Bit 6)
This bit sets the type of signal on the LRCLK_OUTx pins.
When set to 0, the signal is a word clock with a 50% duty cycle;
when set to 1, the signal is a pulse with a duration of one bit
clock at the beginning of the data frame.
Serial Output/TDM Mode Control (Bit 5)
Setting this bit to 1 changes the output port from multiple serial
outputs to a single TDM output stream on the appropriate
SDATA_OUTx pin. This bit must be set in both serial output
control registers to enable 16-channel TDM on SDATA_OUT0.
MSB Position (Bits 4:2)
These three bits set the position of the MSB of data with respect
to the LRCLK edge. The data outputs of the AD1940/AD1941
are always MSB first.
Output Word Length (Bits 1:0)
These bits set the word length of the output data-word. All bits
following the LSB are set to 0.
Table 40. Serial Input Control Register (2646)
Register Bits Function
5 8-/16-channel TDM input
0 = Dual 8-channel TDM
1 = 16-channel TDM input
4 LRCLK polarity
0 = Frame begins on falling edge
1 = Frame begins on rising edge
3 BCLK polarity
0 = Data changes on falling edge
1 = Data changes on rising edge
2:0 Serial input mode
000 = I
2
S
001 = Left-justified
010 = TDM
011 = Right-justified, 24-bit
100 = Right-justified, 20-bit
101 = Right-justified, 18-bit
110 = Right-justified, 16-bit
SERIAL INPUT CONTROL REGISTER
8-/16-Channel TDM Input (Bit 5)
Setting this bit to 0 puts the AD1940/AD1941 into dual
8-channel TDM input mode, with the two streams coming
in on SDATA_IN2/TDM_IN1 and SDATA_IN3/TDM_IN0.
Channels 0 to 7 are input on TDM_IN0 and Channels 8 to 15
come in on TDM_IN1. Setting this bit to 1 puts the part in
16-channel TDM input mode, input on TDM_IN1.
LRCLK Polarity (Bit 4)
When set to 0, the left channel data on the SDATA_INx pins is
clocked when LRCLK_IN is low; the right input data clocked
when LRCLK_IN is high. When set to 1, this is reversed. In
TDM mode, when this bit is set to 0, data is clocked in starting
with the next appropriate BCLK edge (set in Bit 3 of this
register) that follows a falling edge on the LRCLK_IN pin.
When set to 1 and running in TDM mode, the input data is
valid on the BCLK edge following a rising edge on the word
clock (LRCLK_IN). The serial input port can also operate with
a pulse input signal, rather than a clock. In this case, the first
edge of the pulse is used by the AD1940/AD1941 to start the
data frame. When this polarity bit is set to 0, a low pulse should
be used, and a high pulse should be used when the bit it set to 1.

AD1940YSTZ

Mfr. #:
Manufacturer:
Analog Devices Inc.
Description:
Audio DSPs IC 28-Bit Audio Processor
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union