Datasheet

© 2007 Microchip Technology Inc. DS21919E-page 7
MCP23008/MCP23S08
FIGURE 1-1: MCP23008 I
2
C™ DEVICE PROTOCOL
1.3.3.3 SPI Sequential Write/Read
For sequential operations, instead of deselecting the
device by raising CS, the master clocks the next byte
pointed to by the address pointer.
The sequence ends by the raising of CS
.
The MCP23S08 address pointer will roll over to
address zero after reaching the last register address.
1.4 Hardware Address Decoder
The hardware address pins are used to determine the
device address. To address a device, the correspond-
ing address bits in the control byte must match the pin
state.
MCP23008 has address pins A2, A1 and A0.
MCP23S08 has address pins A1 and A0.
The pins must be biased externally.
S
P
SR
w
R
OP
ADDR
DOUT
DIN
- START
- RESTART
- STOP
- Write
- Read
- Device opcode
- Device address
- Data out from MCP23008
- Data into MCP23008
S
P
SR
W
R
OP ADDR
DIN DIN
....
S
P
W
R
OP
ADDR
D
OUT
DOUT
....
P
SR WOP
D
IN
DIN
....
P
P
SR R
DOUT DOUT
....
P
OP
D
OUT
DOUT
....
P
SR OP
DIN
....
P
OP
D
IN
S PWOP ADDR
DIN
DIN
....
Byte and Sequential Write
S
W
OP SR R
OP
D
OUT
DOUT
....
P
Byte and Sequential Read
S WOP ADDR
DIN
P
S
W
OP SR ROP
D
OUT
P
Byte
Sequential
Byte
Sequential