English
Language : 

CS4228A_03 Datasheet, PDF (18/32 Pages) Cirrus Logic – 24-Bit, 96 kHz Surround Sound Codec
CS4228A
3.7 Control Port Signals
Internal registers are accessed through the control
port. The control port may be operated asynchro-
nously with respect to audio sample rate. However,
to avoid potential interference problems, the con-
trol port pins should remain static if no register ac-
cess is required.
The control port has 2 operating modes: SPI mode
and I2C mode. In both modes the CS4228A oper-
ates as a slave device. Mode selection is deter-
mined by the state of the SDOUT pin when RST
transitions from low to high: high for SPI, low for
I2C mode. SDOUT is internally pulled high to VL.
A resistive load from SDOUT to GND of less than
47 kΩ will enable I2C mode after a hardware reset.
3.7.1 SPI Mode
In SPI mode, CS is the CS4228A chip select signal,
CCLK is the control port bit clock input, and CDIN
is the input data line. There is no data output line,
therefore all registers are write-only in SPI mode.
Data is clocked in on the rising edge of CCLK.
Figure 13 shows the operation of the control port in
SPI mode. The first 7 bits on CDIN, after CS goes
low, form the chip address (0010000). The eighth
bit is a read/write indicator (R/W), which should al-
ways be low to write. The next 8 bits set the Mem-
ory Address Pointer (MAP) which is the address of
the register that is to be written. The following
bytes contain the data which will be placed into the
registers designated by the MAP.
The CS4228A has a MAP auto increment capabili-
ty, enabled by the INCR bit in the MAP register. If
INCR is zero, then the MAP will stay constant for
successive writes. If INCR is 1, then the MAP will
increment after each byte is written, allowing block
reads, or writes, of successive registers.
3.7.2 I2C Mode
In I2C mode, SDA is a bidirectional data line. Data
is clocked into and out of the port by the SCL clock.
The signal timing is shown in Figure 15 and 16. A
Start condition is defined as a falling transition of
SDA while the clock is high. A Stop condition is a
rising transition while the clock is high. All other
transitions of SDA occur while the clock is low.
The first byte sent to the CS4228A after a Start con-
dition consists of a 7 bit chip address field and a
R/W bit (high for a read, low for a write). The AD0
pin determines the LSB of the chip address field.
The upper 6 bits of the address field must be 00100
and the seventh bit must match AD0. If the opera-
tion is to be a write, the second byte is the Memory
Address Ponter (MAP), which selects the register
to be written. The succeeding byte(s) are data. If
the operation is to be a read, the second byte is sent
from the chip to the controller and contains the con-
tents of the register pointed to by the current value
of the MAP.
CS
(input)
CCLK
(input)
CDIN
(input)
18
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
CHIP ADDRESS (WRITE)
MAP BYTE
DATA
0 0 1 0 0 0 0 0 INCR 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
MSB
R/W
DATA +n
76 5 4 3 210
Figure 14. Control Port Timing, SPI Slave Mode Write