GPIO expander boards
Off-the-shelf I2C and SPI GPIO expander breakouts that the SDK and MCP server drive as extra pins.
Use one
More GPIOs than the pod's 14 pins, for LEDs, buttons, relays or a keypad: wire an off-the-shelf I2C or SPI GPIO expander breakout to two to five pod pins. The SDK attaches it with one call and names its pins EXT1, EXT2 and so on, which the usual GPIO calls take next to the pod's own pins. The MCP server has the same as its expansion tool.
bp.expansion("tca9555", addr=0x20, sda=1, scl=2) # EXT1..EXT16
led = bp.gpio("EXT1", "output")
led.high()
bp.set_gpio(["EXT2", "EXT3"], [1, 0]) # one bus transaction- Power the breakout from the pod's I/O voltage (1.8 or 3.3 V). An expander on 5 V does not read 3.3 V as a reliable high.
- The pod's pull-ups pull to 3.3 V and are on pins 1 to 6 only. At 1.8 V, or on other pins, the breakout needs its own pull-ups.
- Expander pins are as fast as one bus transaction (a few milliseconds over the network). Pulses, logic analyzer captures and triggers stay on the pod's own pins.
- The bus can be the DUT's own I2C bus: the expander and the DUT's chips share it.
Boards
Tested means we ran that chip on our own bench. Should work means the SDK drives it and its tests pass against a model of the chip, but we have not run it on a real board yet.
| Chip | Status | Bus | LA pins used | Pins gained | Voltage | Directions | Since | Notes |
|---|---|---|---|---|---|---|---|---|
tca9555also tca9535 | Should work | I2C, 0x20-0x27 | 2 | 16 | 1.8 V, 3.3 V | in/out | SDK / MCP 2.13.21 | The usual 16-pin breakout. Runs at 1.8 V too. |
pca9555also pca9535 | Should work | I2C, 0x20-0x27 | 2 | 16 | 3.3 V | in/out | SDK / MCP 2.13.21 | Needs 2.3 V or more: 3.3 V only. |
mcp23017 | Should work | I2C, 0x20-0x27 | 2 | 16 | 1.8 V, 3.3 V | in/out | SDK / MCP 2.13.21 | Common on maker breakouts. 400 kHz at 1.8 V. |
pcf8574 | Should work | I2C, 0x20-0x27 | 2 | 8 | 3.3 V | quasi | SDK / MCP 2.13.21 | A high output is a weak pull-up: fine for buttons and LEDs to ground, not for driving a load high. 100 kHz. |
pcf8574a | Should work | I2C, 0x38-0x3f | 2 | 8 | 3.3 V | quasi | SDK / MCP 2.13.21 | The PCF8574 at other addresses. |
pcf8575 | Should work | I2C, 0x20-0x27 | 2 | 16 | 3.3 V | quasi | SDK / MCP 2.13.21 | The 16-pin PCF8574. |
tca6416a | Should work | I2C, 0x20-0x21 | 2 | 16 | 1.8 V, 3.3 V | in/out | SDK / MCP 2.13.21 | Level-shifting: the I/O side can run at another voltage than the bus. |
tca6424a | Should work | I2C, 0x22-0x23 | 2 | 24 | 1.8 V, 3.3 V | in/out | SDK / MCP 2.13.21 | Level-shifting, 24 pins. |
mcp23s17 | Should work | SPI, hardware address 0-7 | 4 | 16 | 1.8 V, 3.3 V | in/out | SDK / MCP 2.13.21 | SPI version of the MCP23017. Up to eight on one chip select. |
74hc595 | Should work | SPI, chain | 4 | 8 per chip | 3.3 V | out | SDK / MCP 2.13.21 | Shift-register chain, outputs only. Chip select goes to the latch; the fourth pin is a free pin. |
74hc165 | Should work | SPI, chain | 5 | 8 per chip | 3.3 V | in | SDK / MCP 2.13.21 | Shift-register chain, inputs only. One more pin loads the inputs before each read. |