GPIO expanders work like this: you have a board with a certain number of GPIOs, but it s not enough for your project - maybe you need more buttons or LEDs. You could upgrade to a board with a huge number of GPIOs, like the Grand Central, or you can install one of these boards. Attach it over I2C, and you can send/receive I2C commands to control the GPIO pins so you can write and read them. It s slower than a direct GPIO connection, but maybe that doesn t matter if it takes milliseconds instead of microseconds. You only need two I2C pins, and you can even share the I2C bus with other sensors and devices. Heck, you can even add more expanders for massive I/O control!
The AW9523 is a twist on the ordinary I2C expander:
First off it s very affordable - who wouldn t like that?
It has 16 I/O pins, which doubles the pin count of most boards.
Four I2C address options, so you can attach 4 expanders to one bus.
Each pin can be an input or an output
An IRQ output can alert you when input pins change value.
This chip does not support internal pull-ups or pull-downs, you ll need to add an external resistor if you need that.
It does however include an 8-bit linear constant-current LED dimming driver, so you can attach LEDs without resistors and get nice-looking dimming without PWM.
The first 8 pins can be configured as open-drain (as a group).
You can of course drive any buttons or other I/O with these pins - we think this board is especially well suited for LED driving. There is also an interrupt output; you can enable pin-change IRQ on any pin so you get notified when it s time to read the I/O states.
Note: You may receive a non-white or black JST connector.
AW9523 Features
16 multifunction I/O, each for LED drive (constant-current dimming) or GPIO state.
256-step linear dimming in LED drive mode
Any GPIO can be configured independently as an input or an output.
Interrupt support, 8us deglitch, active low.
Standard I2C interface, AD1/AD0 select the I2C device address.
SDA, SCL, SHDN and all GPIOs can accept 1.8V logic input.