beautypg.com

Max9867 ultra-low power stereo audio codec – Rainbow Electronics MAX9867 User Manual

Page 48

background image

MAX9867

Ultra-Low Power Stereo Audio Codec

48

______________________________________________________________________________________

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 config-
ures 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 autoincre-
ment feature allows a master to write to sequential regis-
ters 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 initi-
ate 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 fol-
lowed by a read command resets the address pointer
to register 0x00.

The first byte transmitted from the MAX9867 is the con-
tent of register 0x00. Transmitted data is valid on the
rising edge of SCL. The address pointer autoincre-
ments 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 condi-
tion 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 autoincre-
ments 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 condi-
tion. 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.

1 BYTE

AUTOINCREMENT INTERNAL

REGISTER ADDRESS POINTER

ACKNOWLEDGE FROM MAX9867

ACKNOWLEDGE FROM MAX9867

B1 B0

B3 B2

B5 B4

B7 B6

A

A

0

ACKNOWLEDGE FROM MAX9867

R/W

S

A

1 BYTE

ACKNOWLEDGE FROM MAX9867

B1 B0

B3 B2

B5 B4

B7 B6

P

A

SLAVE ADDRESS

REGISTER ADDRESS

DATA BYTE 1

DATA BYTE n

Figure 13. Writing n Bytes of Data to the MAX9867

ACKNOWLEDGE FROM MAX9867

1 BYTE

AUTOINCREMENT INTERNAL

REGISTER ADDRESS POINTER

ACKNOWLEDGE FROM MAX9867

NOT ACKNOWLEDGE FROM MASTER

A

A

P

A

0

ACKNOWLEDGE FROM MAX9867

R/W

S

R/W

REPEATED START

Sr

1

SLAVE ADDRESS

REGISTER ADDRESS

SLAVE ADDRESS

DATA BYTE

Figure 14. Reading 1 Byte of Data from the MAX9867