English
Language : 

CS35L32 Datasheet, PDF (31/51 Pages) Cirrus Logic – Boosted Class D Amplifier with Speaker-Protection Monitoring and Flash LED Drivers
CS35L32
4.14 Control Port Operation
SCL
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 24 25 26 27 28
CHIP ADDRESS (WRITE)
MAP BYTE
DATA
DATA
DATA
SDA
100000x0
1xxxxxxx
76 10
76 10
START
Slave Address
ACK
MAP Addr
ACK
Data to ACK Data to
Addr X
Addr X+1
7610
Data to ACK
Addr X+n STOP
Pullup
SDA
Source
Master
Slave
Master
Slave
Master
Slave
Master
Master
Slave
Master
Slave Pullup
Figure 4-11. Control-Port Timing—I2C Writes with Autoincrement
The logic state of FLOUT2/AD0 configures the I²C device address upon a device power up, after RESET has been
deasserted. The bit labeled AD0 in the address byte in Fig. 4-11 reflects the logic state of pin FLOUT2/AD0.
If the I²C operation is a write, the next byte is the memory address pointer (MAP); the 7 LSBs of the MAP byte select the
address of the register to be read or written to next. The MSB of the MAP byte, INCR, selects whether autoincrementing
is to be used (INCR = 1), allowing successive reads or writes of consecutive registers.
Each byte is separated by an acknowledge bit, ACK, which the CS35L32 outputs after each input byte is read and is input
to the CS35L32 from the microcontroller after each transmitted byte.
Also for writes, bytes following the MAP byte are written to the CS35L32 register addresses pointed to by the last received
MAP address plus however many autoincrements have occurred. Fig. 4-11 shows a write pattern with autoincrementing.
If the operation is a read, the contents of the register pointed to by the last received MAP address plus however many
autoincrements have occurred, are output in the next byte. Fig. 4-12 shows a read pattern following the write pattern in
Fig. 4-11. Notice how read addresses are based on the MAP byte from Fig. 4-11.
SCL
0 1 2 3 4 5 6 7 8 9 16 17 18 25 27 34 35 36
CHIP ADDRESS (READ)
DATA
DATA
DATA
SDA
100000x1
70
70
70
START
Pullup
SDA
Source
Slave Address
Master
ACK
ACK
ANCOK
Data from Data from Data from
STOP
Addr X+n+1 Addr X+n+2 Addr X+n+3
Slave
Slave
Slave
Master
Master
Master Pullup
Figure 4-12. Control-Port Timing—I²C Reads with AutoIncrement
If a read address different from that based on the last received MAP address is desired, an aborted write operation can
be used as a preamble that sets the desired read address. This preamble technique is shown in Fig. 4-11, in which a write
operation is aborted (after the ACK for the MAP byte) by sending a stop condition.
SCL
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
CHIP ADDRESS (WRITE)
MAP BYTE
STOP
CHIP ADDRESS (READ)
DATA
DATA
DATA
SDA
100000x0
1xxxxxxx
100000x1
70
7 07 0
SDA
Source
START
Pullup
Slave Address
ACK
MAP Addr = Z
ACK
START
Slave Address
ACK
ACK
Data from
Addr Z
Data from
Addr Z+1
NO
Data fromACK STOP
Addr Z+n
Pullup
Master
Master
Master
Slave
Slave
Slave
Slave
Slave
Master
Master
Master
Figure 4-13. Control-Port Timing—I²C Reads with Preamble and Autoincrement
The following pseudocode illustrates an aborted write operation followed by a single read operation when the AD0 bit in
the slave address is 0. For multiple read operations, autoincrement would be set to ON (as shown in Fig. 4-13).
Send start condition.
Send 10000000 (chip address and write operation).
Receive acknowledge bit.
Send MAP byte, autoincrement off.
DS963F5
31