


PCA9555 is a 16 bit general purpose serial IO expander from NXP Semiconductors. It speaks I2C/TWI. PCA9555 gives your application 16 more IO pins. Up to eight devices can share the same I2C bus. Therefore you can add up to 128 (16*8) additional outputs and/or inputs, using just two microcontroller pins to control them. This version is DIP-24/600 mil shape, perfect for breadboarding.
Features
- Operating power supply voltage range of 2.3 V to 5.5 V
- 5 V tolerant I/Os
- Polarity Inversion register
- Active LOW interrupt output
- Low standby current
- Noise filter on SCL/SDA inputs
- No glitch on power-up
- Internal power-on reset
- 16 I/O pins which default to 16 inputs
- 0 Hz to 400 kHz clock frequency
- ESD protection exceeds 2000 V HBM per JESD22-A114, 200 V MM per JESD22-A115, and 1000 V CDM per ESD22-C101
Links
Schematics
BumbleB -> PCA9555 Schematic
ATtiny24 -> PCA9555 Schematic
ATmega168 -> PCA9555 Schematic
ATmega32 -> PCA9555 Schematic
Tips and Tricks
- The top four bits (bits 7 through 4) of the address of any i2c device are hard-wired into the device. On the PCA9555, those top bits make the value 0x40. The next three bits of the address are controlled by A0, A1 and A2 pins on the PCA9555. A2 is bit 3, A1 is bit 2, A0 is bit 1. The very bottom bit is the read/write flag. The driver handles these details for you. Just make sure that you pass the correct PCA9555_DEV_[xxx] that matches your A0-A2 settings.
- Need more than 128 IOs? One neat trick is that the internal address of i2c IO expanders will be different between manufacturers. So you can find another model of i2c expander and put 8 more on the bus. Repeat for as many models of IO expander as you can find. Of course, the driver published here will only work for PCA9555, but it should provide a template for other i2c IO expander devices.
- The INT pin of PCA9555 is optional. The demos show how to catch it using interrupts. However, each PCA9555 that you add to the bus would add another INT line to the microcontroller, this line cannot be shared between expanders. So if you have a lot of expanders and are doing input, you might need to scan them instead of waiting for interrupt.
Bumble-B Firmware / Userial Example
i2c init
IC64
port 0 output
IS40W0600P
bring port 0 high
IS40W02FFP
port 1 input
IS40W07FFP
read port 1
IS40W01S41R01P
Post new comment