Document
MCP23008/MCP23S08
8-Bit I/O Expander with Serial Interface
Features
• 8-Bit Remote Bidirectional I/O Port - I/O pins default to input
• High-Speed I2C Interface (MCP23008) - 100 kHz - 400 kHz - 1.7 MHz
• High-Speed SPI Interface (MCP23S08) - 10 MHz
• Hardware Address Pins - Three for the MCP23008 to allow up to eight devices on the bus - Two for the MCP23S08 to allow up to four devices using the same Chip Select
• Configurable Interrupt Output Pin - Configurable as active-high, active-low or open-drain
Block Diagram
MCP23S08 SCK
SI SO
MCP23008
SCL
MCP23S08
SDA
A1:A0
A2:A0
3
RESET INT
Serial Interface Decode
Interrupt Logic
VDD VSS
POR
• Configurable Interrupt Source - Interrupt-on-change from configured defaults or pin change
• Polarity Inversion Register to Configure the Polarity of the Input Port Data
• External Reset Input • Low Standby Current: 1 µA (max.) • Operating Voltage:
- 1.8V to 5.5V at -40°C to +85°C I2C at 100 kHz SPI at 5 MHz
- 2.7V to 5.5V at -40°C to +85°C I2C at 400 kHz SPI at 10 MHz
- 4.5V to 5.5V at -40°C to +125°C I2C at 1.7 kHz SPI at 10 MHz
Packages
• 18-pin PDIP (300 mil) • 18-pin SOIC (300 mil) • 20-pin SSOP • 20-pin QFN
Serializer/ Deserializer 8
Control
GPIO
8
Configuration/ Control Registers
GP0 GP1 GP2 GP3 GP4
GP5 GP6 GP7
2004-2019 Microchip Technology Inc.
DS20001919F-page 1
MCP23008/MCP23S08
Package Types
SCL SDA
A2 A1 A0
RESET NC INT
VSS
PDIP/SOIC
1
18
2
17
3
16
4
15
5
14
6
13
7
12
8
11
9
10
MCP23008 MCP23008
MCP23008
VDD GP7 GP6 GP5 GP4 GP3 GP2 GP1 GP0
SCL
SDA A2 A1 A0
RESET NC INT
VSS N/C
SSOP
1
20
2
19
3
18
4
17
5
16
6
15
7
14
8
13
9
12
10
11
VDD GP7 GP6 GP5 GP4 GP3
GP2 GP1
GP0 N/C
QFN
GP7
VSS
VDD
SCL
SDA
16
17
18
19
20
A2 A1
A0 RESET
NC
1
15
2
14
3
MCP23008
13
4
12
5
11
GP6 GP5 GP4 GP3 GP2
10
9
8
7
6
GP1
GP0
N/C
INT
N/C
2004-2019 Microchip Technology Inc.
DS20001919F-page 2
MCP23008/MCP23S08
Package Types: (Continued)
SCK
SI SO A1 A0
RESET CS INT
VSS
PDIP/SOIC
1
18
2
17
3
16
4
15
5
14
6
13
7
12
8
11
9
10
MCP23S08 MCP23S08
MCP23S08
VDD GP7 GP6 GP5 GP4 GP3 GP2 GP1 GP0
SCK
SI SO A1 A0 RESET
CS INT
VSS N/C
SSOP
1
20
2
19
3
18
4
17
5
16
6
15
7
14
8
13
9
12
10
11
VDD GP7 GP6 GP5 GP4 GP3
GP2 GP1 GP0 N/C
QFN
GP7
VSS
VDD
SCK
SI
16
17
18
19
20
SO A1
A0 RESET
CS
1
15
2
14
3
MCP23S08
13
4
12
5
11
GP6 GP5 GP4 GP3 GP2
10
9
8
7
6
GP1
GP0
N/C
INT
N/C
2004-2019 Microchip Technology Inc.
DS20001919F-page 3
MCP23008/MCP23S08
1.0 DEVICE OVERVIEW
The MCP23X08 device provides 8-bit, general purpose, parallel I/O expansion for I2C bus or SPI applications. The two devices differ in the number of hardware address pins and the serial interface:
• MCP23008 – I2C interface; three address pins
• MCP23S08 – SPI interface; two address pins
The MCP23X08 consists of multiple 8-bit Configuration registers for input, output and polarity selection. The system master can enable the I/Os as either inputs or outputs by writing the I/O Configuration bits. The data for each input or output is kept in the corresponding Input or Output register. The polarity of the Input Port register can be inverted with the Polarity Inversion register. All registers can be read by the system master.
The interrupt output can be configured to activate under two conditions (mutually exclusive):
1. When any input state differs from its corresponding Input Port register state, this is used to indicate to the system master that an input state has changed.
2. When an input state differs from a preconfigured register value (DEFVAL register).
The Interrupt Capture register captures port values at the time of the interrupt, thereby saving the condition that caused the interrupt.
The Power-on Reset (POR) sets the registers to their default values and initializes the device state machine.
The hardware address pins are used to determine the device address.
1.1 Pin Descriptions
TABLE 1-1: PINOUT DESCRIPTION
Pin Name
PDIP/ SOIC
QFN
SSOP
Pin Type
Function
SCL/SCK 1
SDA/SI
2
A2/SO
3
A1
4
A0
5
RESET
6
NC/CS
7
INT
8
VSS
9
GP0
10
GP1
11
GP2
12
GP3
13
GP4
14
GP5
15
GP6
16
GP7
17
VDD
18
N/C
—
19
1
I Serial clock input.
20
2
I/O Serial data I/O (MCP23008)/Serial data input (MCP23S08).
1
3
I/O Hardware address input (MCP23008)/
Serial data output (MCP23S08).
A2 must be biased externally.
2
4
I Hardware address input. Must be biased externally.
3
5
I Hardware address input. Must be biased externally.
4
6
I External Reset input. Must be biased externally.
5
7
I No connect (MCP23008)/External Chip Select input (MCP23S08).
7
8
O Interrupt output. Can be configured for active-high, active-low or
open-drain.
17
9
P Ground.
9
12
I/O Bidirectional I/O pin. Can be enabled for interrupt-on-change and/or
internal weak pull-up resistor.
10
.