Datasheet
MCP23017/MCP23S17
DS20001952C-page 14 2005-2016 Microchip Technology Inc.
3.2.2.2 I
2
C Read Operation
I
2
C Read operations include the control byte sequence,
as shown in Figure 3-2. This sequence is followed by
another control byte (including the Start condition and
ACK) with the R/W bit set (R/W = 1). The MCP23017
then transmits the data contained in the addressed
register. The sequence is ended with the master
generating a Stop or Restart condition.
FIGURE 3-2: BYTE AND SEQUENTIAL READ
3.2.2.3 I
2
C Sequential Write/Read
For sequential operations (Write or Read), instead of
transmitting a Stop or Restart condition after the data
transfer, the master clocks the next byte pointed to by
the address pointer (see Section 3.2.1 “Byte Mode
and Sequential Mode” for details regarding sequential
operation control).
The sequence ends with the master sending a Stop or
Restart condition.
The MCP23017 Address Pointer will roll over to
address zero after reaching the last register address.
Refer to Figure 3-3.
FIGURE 3-3: MCP23017 I
2
C DEVICE PROTOCOL
SR ROP
D
OUT
D
OUT
....
P
S W
OP SR
R
OP
D
OUT
P
Byte
Sequential
S W
OP
S P
SR
W
R
OP ADDR
D
IN
D
IN
....
P
W
OP
ADDR
D
OUT
D
OUT....
P
SR WOP
D
IN
D
IN....
P
P
SR R
D
OUT
D
OUT
....
P
OP
....
P
SR OP
D
IN
....
P
D
IN
D
OUT
D
OUT
S ROP