09.08.2013 Views

MCP23008/MCP23S08 - Microchip

MCP23008/MCP23S08 - Microchip

MCP23008/MCP23S08 - Microchip

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FIGURE 1-1: <strong>MCP23008</strong> I 2 C DEVICE PROTOCOL<br />

S<br />

SR<br />

P<br />

w<br />

R<br />

OP<br />

ADDR<br />

DOUT<br />

DIN<br />

- START<br />

- RESTART<br />

- STOP<br />

- Write<br />

- Read<br />

- Device opcode<br />

- Device address<br />

- Data out from <strong>MCP23008</strong><br />

- Data into <strong>MCP23008</strong><br />

Byte<br />

Sequential<br />

Byte<br />

Sequential<br />

1.3.3.3 SPI Sequential Write/Read<br />

For sequential operations, instead of deselecting the<br />

device by raising CS, the master clocks the next byte<br />

pointed to by the address pointer.<br />

The sequence ends by the raising of CS.<br />

The <strong>MCP23S08</strong> address pointer will roll over to<br />

address zero after reaching the last register address.<br />

<strong>MCP23008</strong>/<strong>MCP23S08</strong><br />

S OP W ADDR DIN .... DIN<br />

P<br />

S<br />

OP<br />

R<br />

1.4 Hardware Address Decoder<br />

The hardware address pins are used to determine the<br />

device address. To address a device, the corresponding<br />

address bits in the control byte must match the pin<br />

state.<br />

• <strong>MCP23008</strong> has address pins A2, A1 and A0.<br />

• <strong>MCP23S08</strong> has address pins A1 and A0.<br />

The pins must be biased externally.<br />

© 2007 <strong>Microchip</strong> Technology Inc. DS21919E-page 7<br />

SR<br />

P<br />

OP<br />

R<br />

DOUT .... DOUT P<br />

SR OP W DIN .... DIN P<br />

DOUT .... DOUT<br />

SR OP R DOUT .... DOUT P<br />

SR OP W ADDR DIN .... DIN P<br />

Byte and Sequential Write<br />

S OP W ADDR DIN P<br />

P<br />

S OP W ADDR DIN .... DIN<br />

P<br />

Byte and Sequential Read<br />

S OP W SR OP R DOUT P<br />

S OP W SR OP R DOUT .... DOUT P<br />

P

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!