Need more I/O's on your microcontroller? You need an MCP23017 port expander chip! It uses two i2c pins (which can be shared with other devices if required) and in exchange gives your microcontroller another 16 GPIO's! Each I/O pin can be configured as an in input, output or an input with a pullup. The chip can also be configured for interrupts for when an input changes, so you don't need to keep polling the chip! This one comes in a DIP package, so it's great for breadboarding! You can also set the i2c address for up to 8 unique chips on the same i2c bus, which means you can daisy-chain these IC's to give you up to 128 I/O's!
16 bit remote bidirectional I/O port
High speed I2C interface
Three hardware address pins to allow up to eight devices on the bus
Configurable interrupt output pins
INTA and INTB can be configured to operate independently or together
Configurable interrupt source
Polarity Inversion register to configure the polarity of the input port data